startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
   if(navRoot) {
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI") {
		node.onmouseover=function() {
			if(this.className=="mainmenu") this.className+=" over";
  		}
  		node.onmouseout=function() {
  		this.className=this.className.replace(" over", "");
   		}
   		}
  	}
   }
}
}
window.onload=startList;

//Узнаем ширину и высоту страницы
function bodySize() {
if(document.width && document.height) {
	w=document.width;
	h=document.height;
}
if(document.body.scrollWidth && document.body.scrollHeight) {
	w=document.body.scrollWidth;
	h=document.body.scrollHeight;
}
if(document.body.style.pixelWidth && document.body.style.pixelHeight) {
	w=document.body.style.pixelWidth;
	h=document.body.style.pixelHeight;
}
  return {"w":w, "h":h};
}

function openFormRequest() {
   $("#requestDivBack").css("height", $(document).height());
	var bodySizeWH=bodySize();
	obj=document.getElementById("requestDivBack");
	obj.style.width=bodySizeWH.w + 'px';
	/*obj.style.height=bodySizeWH.h + 'px';*/
	obj.style.display = "block";
	document.getElementById("requestDiv").style.display = "block";
}

function openFormRequestPrice() {
   $("#requestDivBack").css("height", $(document).height());
	var bodySizeWH=bodySize();
	obj=document.getElementById("requestDivBack");
	obj.style.width=bodySizeWH.w + 'px';
	/*obj.style.height=bodySizeWH.h + 'px';*/
	obj.style.display = "block";
	document.getElementById("request_price").style.display = "block";
}

function openFormRequestCatalog() {
   $("#requestDivBack").css("height", $(document).height());
	var bodySizeWH=bodySize();
	obj=document.getElementById("requestDivBack");
	obj.style.width=bodySizeWH.w + 'px';
	/*obj.style.height=bodySizeWH.h + 'px';*/
	obj.style.display = "block";
	document.getElementById("request_catalog").style.display = "block";
}

function closeFormRequest() {
   f = document.getElementById("requestDiv");
   if(f) {
      f.style.display = "none";
   }
   f2 = document.getElementById("request_price");
   if(f2) {
      f2.style.display = "none";
   }
   f3 = document.getElementById("request_catalog");
   if(f3) {
      f3.style.display = "none";
   }
	document.getElementById("requestDivBack").style.display = "none";
}