function showVoit()
{
var voiting = window.open('cgi-bin/voiting/voiting.cgi?Operation=Result', 'VOITING', config='height=280, width=400')
}

function preVoit(name)
{
formname = "forma" + String(name);
how = document.forms[formname].Test.length;

active=-1;
for (var i = 0; i < how; i++)
{
if (document.forms[formname].Test[i].checked)
{
active=i;
}
}
if (active>-1)
{
var voiting = window.open('cgi-bin/voiting/voiting.cgi?Operation=Voit&Bals='+active, 'VOITING', config='height=280, width=400')
}
else
{
alert('Выберите ответ!!!');
}
}

function preAdd(name)
{
formname = "forma" + String(name);
email = document.forms[formname].Email.value;
flag=true;
if (email=="@")
{
alert("Введите адрес!!!");
flag=false;
}
if (!check(email, "@"))
{
alert("Это точно не почтовый ящик!!!");
flag=false;
}
if (flag) { location.href="cgi-bin/mailing/subscribe.cgi?Operation=Preadd&Email="+email; }
}
function check(input)
{
var ok = false;

for (var i = 0; i < input.length; i++) {  if (input.charAt(i) == "@") { ok = true;} }
return ok;
}
function openWin(optia)
{
  w=window.screen.availWidth-10;
  h=window.screen.availHeight-100;
  adress='cgi-bin/sale/finder.cgi?Category='+optia;
  window.open(adress, "SHOP", "width="+w+",height="+h+",left=0,top=0,status=yes,toolbar=no,menubar=yes, scrollbars=yes, resizable=yes, isRaised=yes, alwaysRaised=yes");
}
function findWin(name)
{
formname = "forma" + String(name);
stroka = document.forms[formname].Name.value;
if (stroka == "admin") {location.href="admin.htm";}
else
{
if (stroka == "")
{
alert("Введите строку для поиска!!!");
}
else
{
  w=window.screen.availWidth-10;
  h=window.screen.availHeight-100;
  adress='cgi-bin/sale/finder.cgi?Option=1&Page=1&Name='+stroka;
  window.open(adress, "SHOP", "width="+w+",height="+h+",left=0,top=0,status=yes,toolbar=no,menubar=yes, scrollbars=yes, resizable=yes, isRaised=yes, alwaysRaised=yes");
}
}
}
function openMap()
{
  var myMap = window.open('map.htm', 'MAP', config='height=480, width=410')
}
function openPhoto(url,name,width_real,height_real)
{
  adress='photo/'+url;
  width_blank=width_real+10;
  height_blank=height_real+30;
  myPhoto = open('', 'PHOTO', config='height='+height_blank+', width='+width_blank)
  myPhoto.document.write("<HTML><HEAD><TITLE>"+name+"</TITLE></HEAD>");
  myPhoto.document.write("<BODY marginheight='0' marginwidth='0' leftMargin='0' topMargin='0'>");
  myPhoto.document.write("<TABLE BORDER='0' CELLPADDING='0' WIDTH='100%' HEIGHT='100%'>");
  myPhoto.document.write("<TR><TD ALIGN='CENTER'>");
  myPhoto.document.write("<a href='Javascript:parent.close()'><img src='images/exit.gif' border='0' width='76' height='19'></a></TD>");
  myPhoto.document.write("</TR><TR><TD ALIGN='CENTER' VALIGN='MIDDLE'><img border='0' src='"+adress+"' width='"+width_real+"' height='"+height_real+"'></TD>");
  myPhoto.document.write("</TR></TABLE></BODY></HTML>");
}
function addFavorite()
{
 if (navigator.appName=="Netscape") {
   alert("К сожалению ваш браузер не поддерживает эту функцию. Нажмите клавиши 'Ctrl+D'");
 }
 else {
   window.external.AddFavorite('http://reagent.com.ua','= = РЕАГЕНТ = =');
 }
}

if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;

var id;
function bottom(){
window.status="http://reagent.com.ua"
id=setTimeout("bottom()",200);
}
bottom();
