<!--

function iTshowImage(iobj,iname) {
  if (iobj.src.indexOf(iname)!=-1) {
    iobj.src=iobjsrc;
  } else {
    iobjsrc = iobj.src;
    iobj.src=iname;
  }
}

function jsinsertSelected(form,returnto) {
  form = eval(form);
  rValue = "";
  for (i = 0; i < form.elements.length; i++)
   {
    var item = form.elements[i];
    if (item.name == "aga_multi" && item.checked == true)
     {
      rValue += item.value+",";
     };
   }  
  
  
  returnto.value=rValue;
} 




function SelectAll(form,mark)
{ 
  for (i = 0; i < form.elements.length; i++)
   {
    var item = form.elements[i];
    if (item.name == "aga_multi[]")
     {
      item.checked = mark;
     };
   }
}
//-------------------------------------------------------------------------------------
function confirmLink(theLink,confirmMsg)
{
    if (confirmMsg == '') {
       confirmMsg="Вы Уверены?";
    }
    var is_confirmed = confirm(confirmMsg);
    if (is_confirmed) {
    window.location.href=theLink; 
    }
    return is_confirmed;
} 

function isFormExist(searchForm) {
    for (fn in document.forms) {
      if (fn == searchForm) {
        return true;
      }
    }
}

function actMulti(form,act) {
    form.cmd.value=act;
    form.submit();
}



function showWin(winName,theURL,features) {
//alert(theURL);
//if (features=="") features = 'Width:800px;Height:500px;status:no;help:no;resizable:1';
winName = open(theURL,winName,features)  

}


function Add2Cart(prodid,catprod) {
  var win=window.open("?cat=basket&cmd=addbasket&catprod="+catprod+"&prodid="+prodid,"","width=250, height=100, top="+(screen.height/2-30)+", left="+(screen.height/2)+",resizable=1,status=1");
}
function Add2Compare(cat,prodid) {
  var win=window.open("?cat=products/compare&cmd=addcompare&prodid="+prodid,"","width=350, height=150, top="+(screen.height/2-30)+", left="+(screen.height/2)+",resizable=1,status=1");
}


function AgaDialog(what,field,features,args){ 
if (features=="") { features = 'dialogWidth:600px;dialogHeight:300px;status:no;help:no;resizable:1'}
    var retField;
    retField=window.showModalDialog("/asp/AGADialogs.asp?what="+what,args,features); 
    if (retField) eval(field).value = retField;
} 

function itDisplayInfo(elementID){ 
  document.getElementById(elementID).style.display = document.getElementById(elementID).style.display == "block" ? "none":"block"; 
} 

//-->
