function popupWindow_new(url , w , h) {
 
	var wWidth = w;
	var wHeight = h;

	isSafari3 = false;
	if(window.devicePixelRatio) isSafari3 = true;

	if(isSafari3){			
		wWidth = wWidth + 0;
		wHeight = wHeight + 4;
	}
	

	var sb = 'no';
	if (wWidth > screen.width)
	{
		wWidth = screen.width - 100;
		sb = 'yes';
	}
	if (wHeight > screen.height)
	{
		wHeight = screen.height - 200;
		sb = 'yes';
	}



	var IE = navigator.userAgent.indexOf("MSIE") >= 0;
	if (IE){
		IE7 = navigator.userAgent.indexOf("MSIE 7.0") < 0;
	  if(IE7){
			window.open(url, "imgWin", 'width=' + wWidth + ',height=' + wHeight + ',resizable=no,scrollbars='+sb+',toolbar=no,menubar=no');
			return;
	  }
	}
	

	wnd=window.open("", "imgWin", 'width=' + wWidth + ',height=' + wHeight + ',resizable=no,scrollbars='+sb+',toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');
	wnd.document.write('<html><head><title></title></head><body style="margin:0; padding:0;">');
	//wnd.document.write('<div align="center" style="width:100%">');
	wnd.document.write('<a href="javascript:window.close();"><img src="' + url + '" width="' + w + '" height="' + h + '" border="0" alt="" /></a><br />');	
	//wnd.document.write('</div>');
	wnd.document.write('</body></html>');
	wnd.document.close();
	wnd.focus();
}





function submit_form(theform , val) {		
				
		 sr = eval("document."+theform);
		 if(val) sr.what.value = 'zakaz';
		 sr.submit();
	}


	function hidd(x1 , x2) {		
				
		document.getElementById(x1).style.display = "none";
		document.getElementById(x2).style.display = "block";
	}


	function subr(){
		
			var err = [];

			if(!document.getElementById('user[fio]').value)
				err[err.length] = "ERROR # <?=PLIASE_ENTER_FIO?>";


			if(!document.getElementById('user[customers_email_address]').value)
				err[err.length] = "ERROR # <?=PLIASE_ENTER_EMAIL?>";

			if(!document.getElementById('user[customers_telephone]').value)
				err[err.length] = "ERROR # <?=PLIASE_ENTER_CUSTOMERS_TELEPHONE?>";
			
			if(error1(err))
				document.create_account1.submit();
	}



function error1(err){
		if(err.length > 0){
			alert(err.join("\n\n"));
			return false;
		} else return true;
	}

function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}



/*##################################################################*/


var blink_speed=10000;
 var i=0;

function Blink(layerName){

	

	 if(i%2==0){
		 document.getElementById(layerName).style.visibility = "visible";		
	 }
	 else{
		document.getElementById(layerName).style.visibility = "hidden";
	 }

	if(i<4){
		setTimeout("Blink('"+layerName+"')",20);
	}
	else
		setTimeout("Blink('"+layerName+"')",blink_speed);
	 
	 //if(i<1){
		i++;
	// } 
	 if(i>4){
		i=0;
	 }

	
}






 var i1=0;
 

function Blink1(layerName){

	 if(i1%2==0){
		 document.getElementById(layerName).style.visibility = "visible";		
	 }
	 else{
		document.getElementById(layerName).style.visibility = "hidden";
	 }
	 
	 
	

	if(i1<4){
		setTimeout("Blink1('"+layerName+"')",20);
	}
	else
		setTimeout("Blink1('"+layerName+"')",blink_speed);

	i1++;
	 
	 if(i1>4){
		i1=0;
	 }
}

/*************************************************************************/

var menuids=["suckertree1"]


function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
		if (ultags[t].parentNode.parentNode.id==menuids[i])
			ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px"
		else
		  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px"
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
		for (var t=ultags.length-1; t>-1; t--){
		ultags[t].style.visibility="visible"
		ultags[t].style.display="none"
		}
  }
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)