function open_win( pageToLoad, winname, width, height ) {
        pageToLoad=pageToLoad.replace (/\+/,"%2B");
        args = "width=620,height=500,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0";
        popup_win = window.open( pageToLoad,winname,args);
        popup_win.name = "info";
        popup_win.window.focus();
        popup_win.window.moveTo(0,0);
        //return ;
}

function open_skidka( pageToLoad, winname, width, height ) {
        pageToLoad=pageToLoad.replace (/\+/,"%2B");
        args = "width=620,height=340,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0";
        popup_win = window.open( pageToLoad,winname,args);
        popup_win.name = "info";
        popup_win.window.focus();
        popup_win.window.moveTo(0,0);
        //return ;
}


function reg_win( pageToLoad, winname, width, height ) {
        pageToLoad=pageToLoad.replace (/\+/,"%2B");
        args = "width=533,height=440,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0";
        popup_win = window.open( pageToLoad,winname,args);
        popup_win.name = "info";
        popup_win.window.focus();
        popup_win.window.moveTo(0,0);
        //return ;
}

function busket_win( pageToLoad, winname, width, height ) {
        args = "width=620,height=500,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0";
        popup_win = window.open( pageToLoad,winname,args );
        popup_win.name = "basket";
        popup_win.window.focus();
        popup_win.window.moveTo(0,0);
        //return ;
}

function isEmail(string)
{
        if (string.search(/^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/) != -1) return true;
        return false;
}




  if (parseInt(navigator.appVersion)>= 4)
  {
    if (navigator.appName == "Netscape")
    {
        layerStyleRef="layer.";
        layerRef="document.layers";
        styleSwitch="";
    }
    else
    {
    layerStyleRef="layer.style.";
    layerRef="document.all";
    styleSwitch=".style";
    }
}

function show(layerName)
{
    if (parseInt(navigator.appVersion)>= 4)
    {
      eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="block"');
//      alert(document.all[document.all["text1"].sourceIndex+2].tagName);
    }
}

function cls(layerName){
  if (parseInt(navigator.appVersion)>= 4)
  {
   eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="none"');
  }
}


function jump(targ,selObj,restore) {
  eval(targ+".location='"+"/?an=drivers&group_taken="+document.change.group_taken.value+"&series="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function jump_items(targ,selObj,restore) {
  eval(targ+".location='"+"/?an=drivers&group_taken="+document.change.group_taken.value+"&series="+document.change.item_series.value+"&articul="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
