//
// NEW functions
//

function openNewWindow(url,x,y) {
  var rnd = Math.round(Math.random()*1000000);
  //var newName = 'Equipment Description. Request: '+rnd;
  var newName = 'newWindow'+rnd;
//  url = 'http://localhost/my_da/' + url;
//alert(url);
  newWindow = window.open(url,newName,'menubar=yes,scrollbars=yes,status=yes,resizable=yes,location=yes,width=' + x + ',height=' + y);
  newWindow.focus();
  return false;
} // endof openNewWindow













//
// OLD functions
// may be deleted after development
//

function setUpSelect(fld,vl) {
 if((eval("document."+fld))&&(vl != "")) {
   var ln = eval("document."+fld+".length;");
   for(i=0;i<ln;i++) {
     if(eval("document."+fld+".options[i].value")==vl) {
       eval("document."+fld+".selectedIndex = i;");
       break;
     }
   }
 }
} // end of setUpSelect
function openEqDesc(url,x,y,scrolling) {
  var rnd = Math.round(Math.random()*1000000);
  //var newName = 'Equipment Description. Request: '+rnd;
  var newName = 'newWindow'+rnd;
//  url = 'http://localhost/my_da/' + url;
//alert(url);
  newWindow = window.open(url,newName,'menubar=no,scrollbars='+scrolling+',status=no,resizable=yes,location=no,width=' + x + ',height=' + y);
  newWindow.focus();
  return false;
} // end of openResWindowRoll1

function openWeaponDesc(wid) {
alert ('hi');
openEqDesc('./index.php?SACTION=shop_actions&to_view='+wid,500,200,'yes');
return false;  
}
