<!--

cm=null;
hide_delay=500;
tstat=0;

isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;

function switchDiv(objElement,bolVisible){
if(isNS4||isIE4){
     if(!bolVisible) {
       objElement.visibility ="hidden"
     } else {
       objElement.visibility ="visible"
     }     
 } else if (isIE5 || isNS6) {
      if(!bolVisible){
         objElement.style.display = "none";
         
      } else {
        objElement.style.display = "";
        
        }

      }

return 1;
}


function getPos(el,sProp) {
	var iPos = 0;
	while (el!=null) {
		iPos+=el["offset" + sProp]
		el = el.offsetParent
	}
	return iPos

}

function gTintingPaint(myid) {
   if (isNS4){
        objElement = document.layers[myid];
     }else if (isIE4) {
        objElement = document.all[myid];
     }else if (isIE5 || isNS6) {
             objElement = document.getElementById(myid);
     }
return(objElement);
}

function showEquipment(el,m) {

 if (cm!=null) {
 switchDiv(cm,false);
 }

 if (m!=null) {
 m=gTintingPaint(m);
 m.style.left = getPos(el,"Left")+el.offsetWidth+"px";
 m.style.top =  getPos(el,"Top")+"px";
 switchDiv(m,true);
 cm=m;
 }

}

function hidemenuTinting() {
timer1=setTimeout("showEquipment(null,null)",hide_delay);
tstat=1;
return 1;
}

function cancelhideTinting() {
 if (tstat==1) {
 clearTimeout(timer1);
 tstat=0;
 }
return 1;
}

function formPaint (nm) {

if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
	fnm = gTintingPaint(nm);
}
else {
	fnm = document.forms[nm];
}

if(!(/^[a-zA-Z0-9](([a-z0-9\-._\+\&]?)+[a-z0-9])?\@((\w([a-zA-Z0-9\-._]+\w)?\.[a-z]{2,6})|(([01]?\d\d|2[0-4]\d|25[0-5])\.([01]?\d\d|2[0-4]\d|25[0-5])\.([01]?\d\d |2[0-4]\d|25[0-5])\.([01]?\d\d|2[0-4]\d|25[0-5])))$/i.test(fnm.email.value)))
	{
	alert('Пожалуйста, введите действительный e-mail адрес.');
	fnm.email.focus();
	return false;
	}
}


defaultStatus = "Зарабатывайте с помощью колеровочного оборудовани\я Строймаш!";

function EmailPaint(name, address, link, subject, body, aParams) {
    document.write("<a href='ma" + "i" + "lto:" + name + "@" + address + "?subject=" + subject + "&body=" + body + "' " + aParams + ">" + link + "</a>");
}

function overPaint(n) {
ob = gTintingPaint('Equipment'+n);
ob.style.backgroundColor = '#ebebeb';
ob = gTintingPaint('Paint'+n);
ob.style.color = '#FF8400';
}

function outPaint(n) {
ob = gTintingPaint('Equipment'+n);
ob.style.backgroundColor = '';
ob = gTintingPaint('Paint'+n);
ob.style.color = '#467B99';
}

function redir(url) {
document.location.href = url;
}

function OpenDetailsWindow(url,name,params) {height=470,width=500
	details = window.open(url,name,params+",toolbar=no,scrollbars=yes,directories=no,status=no,menubar=no,resizable=yes");
	details.window.focus();
	return false;
}



// -->