var nImgCnt=0;
function imgLoad(cImage){
	nImgCnt++;
	eval('oImgDecor'+nImgCnt+'=new Image();');
	eval('oImgDecor'+nImgCnt+'.src=cImage;');
}

function imgCache(eId, cImage, cImageAct){
	eval('oImg'+eId+'=new Image();');
	eval('oImg'+eId+'.src=cImage;');
	eval('oImg'+eId+'Act=new Image();');
	eval('oImg'+eId+'Act.src=cImageAct;');
}
function imgOver(eId, oImg){
	oImg.src=eval('oImg'+eId+'Act.src;');
}
function imgOut(eId, oImg){
	oImg.src=eval('oImg'+eId+'.src;');
}

function makePopup(href, target, w, h, ext){
w=(w?w:parseInt((screen.availWidth)/2))+20
h=(h?h:parseInt((screen.availHeight)/2))+30
l=parseInt((screen.availWidth-w)/2),
t=parseInt((screen.availHeight-h)/2)-10;
if (typeof(target)!="string"||(!target)) target="_blank";
window.open(href, target, 'location=no,menubar=no,resizable=no,status=no,toolbar=no,width='+w+',height='+h+',left='+l+',top='+t+(ext?','+ext:''));
}

function makePopupSBno(href, target, w, h, ext){
makePopup(href, target, w, h, "scrollbars=no"+(ext?','+ext:''))
}
function makePopupSByes(href, target, w, h, ext){
makePopup(href, target, w+20, h, "scrollbars=yes"+(ext?','+ext:''))
}

function forgotPass(){
    window.open("forgot.aspx", "", "scrollbars=no, width=300, height=170");
	return false;
}
function Clear_f1()
{
	document.forms[0].reset();
	//document.forms[0].elements['f1_wt_s'].innerHTML='';
	//document.forms[0].elements['f1_wt_h'].value='';	
}

/* для маленького баскета */
function GetCSS(flag)
{
    var obj=document.getElementById("SmallCartDiv");
    var img=document.getElementById("Img");

    if(!flag)
    {
    var cook=GetCookie("class");
    if(cook!=null&&cook!="")
    {
        obj.className=cook;
        if(cook=="block")
           img.src="App_Themes/Default/images/close.jpg";
    }
    }
}

function GetCookie(sName)
{
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    var cook= aCookie[i].split("=");
    if (sName ==cook[0]) 
      return cook[1];
  }
	return null;
}

function OpenCart(img)
{
    var obj=document.getElementById("SmallCartDiv");
    if(obj.className=="block")
    {
        obj.className="none";
        img.src="App_Themes/Default/images/open_on.jpg";
        document.cookie="class=none";
    }
    else
    {
        obj.className="block";
        img.src="App_Themes/Default/images/close.jpg";
        document.cookie="class=block";
    }
}

function DisplayNB(ID,n)
        {          
            if (n == "DotFfalse") 
            {
                document.getElementById(ID).style.display="none";
                document.getElementById("DotFfalse").className="DotFtrue";           
                document.getElementById("DotFtrue").className="DotFfalse";           
            }
            else
            {
                document.getElementById(ID).style.display="block";         
                document.getElementById("DotFfalse").className="DotFfalse";           
                document.getElementById("DotFtrue").className="DotFtrue"; 
            }               
        }
