window.isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
window.isOpera  = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
window.isFirefox  = (navigator.userAgent.indexOf("Firefox") != -1) ? true : false;
window.Loaded=0;
window.rzTables=new Array();

function StartPage()
 {
   window.Loaded=1;
 };

function optionString (w,h) {
  nwL = (screen.width - w) / 2;
  nwT = (screen.height - h) / 2;
  opt = '"toolbar=no,titlebar=no,resizable=yes,menubar=no,scrollbars=yes,status=no,location=no,left=' + nwL + ',top=' + nwT + ',width=' + w + ',height=' + h + '"';
  return opt;
}
function openURL (href,w,h,wn) {
//  if(href=='') href=window.demo_warn;
  if((w==undefined)||(h==undefined))
   {

     w=screen.width/1.5;
     h=screen.height/1.5;
   }
  newWin = window.open (href,wn, optionString (w,h));
  newWin.focus ();
}

function optionString1 (w,h) {
  nwL = (screen.width - w) / 2;
  nwT = (screen.height - h) / 2;
  opt = 'toolbar=yes,titlebar=no,resizable=yes,menubar=no,scrollbars=yes,status=yes,location=no,left=' + nwL + ',top=' + nwT + ',width=' + w + ',height=' + h;
  return opt;
}
function openURL1 (href,w,h,wn) {
//  if(href=='') href=window.demo_warn;
  if((w==undefined)||(h==undefined))
   {
     w=screen.width/1.5;
     h=screen.height/1.5;
   }
  newWin = window.open (href,wn, optionString1 (w,h));
  newWin.focus ();
}

function optionString0 (w,h) {
  nwL = (screen.width - w) / 2;
  nwT = (screen.height - h) / 2;
  opt = 'toolbar=yes,titlebar=yes,resizable=yes,menubar=yes,scrollbars=yes,status=yes,location=yes,left=' + nwL + ',top=' + nwT + ',width=' + w + ',height=' + h;
//  opt = 'left=' + nwL + ',top=' + nwT + ',width=' + w + ',height=' + h;
  return opt;
}

function openURL0 (href,w,h,wn) {
//  if(href=='') href=window.demo_warn;
  if((w==undefined)||(h==undefined))
   {

     w=screen.width/1.5;
     h=screen.height/1.5;
   }
  newWin = window.open (href,wn, optionString0 (w,h));
  newWin.focus ();
}

window.rsWindow=function(){};

  function FlashImgOn(id,key)
    {
       if(Loaded!=1) return;
       document.images[id].src=img[key].swap.src;
    };
   function FlashImgOff(id,key)
    {
       if(Loaded!=1) return;
       document.images[id].src=img[key].org.src;

    };

  function FlashSbmOn(sbm,id)
   {
      if(Loaded!=1) return;
      sbm.src=window.img[id].swap.src;

   };
  function FlashSbmOff(sbm,id)
   {
      if(Loaded!=1) return;
      sbm.src=window.img[id].org.src;

   };

window.isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;

function MakeArray()
  {
    this.maxlen=window.num_preload;
    this.len=0;
    return this;
  };

window.img=new MakeArray();

function Images(org,swap)
  {
    this.org=new Image();
    this.org.src=org;
    this.swap=new Image();
    this.swap.src=swap;
  };

function preload_img(Name,first, second)
{
  // предварительная загрузка изображений и размещение их в хеше ;-)
   window.img[Name]=new Images(first,second)
};

function ExtraWidth(table,prc,minLen)
{
  var w=770;
  var newW=0;
  if (window.document.all) {
    w = window.document.body.clientWidth;
    newW=(w*prc/100);
    if((minLen>0)&&(newW<minLen)) return;
    else   window.document.all[table].width=newW;
    //window.document.all.test.innerText=newW;
  }
};

function ExtraWidthWin()
{
  var i;
  if (window.document.all) {
    for(i=0;i<window.rzTables.length;i++)
     {
       ExtraWidth(window.rzTables[i]['tID'],window.rzTables[i]['prc'],window.rzTables[i]['minLen']);
     };
  };
};

function RadioValue(oRadio) {
  for (var i=0; i<oRadio.length;i++) {
      if (oRadio[i].checked)
          return oRadio[i].value;
  };
  return false;
};