window.onerror = null;

//

function fnCheckFields(form_obj){
	for (var j = 0; form_obj_elem = form_obj.elements[j]; j++){
		if (form_obj_elem.type == "textarea" || form_obj_elem.type == "text"){
			str = form_obj_elem.name;
			if (str.charAt(0) == "_" && !form_obj_elem.value){
				alert("Не заполнены все обязательные поля!");
				return false;
			}
		}
	}
	return true;
}

//

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//

nn4 = document.layers;
ie4 = document.all;
nn6 = document.getElementById && !ie4;

function w(imgName, winWidth, winHeight){
	if (nn4 || ie4 || nn6){
		posX = Math.round((screen.width - winWidth) / 2);
		posY = Math.round((screen.height - winHeight) / 2);
		posCode = (nn4 || nn6)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;
	}else{
		posCode = "";
	}
	newWindow = window.open('','','menubar=no,toolbar=no,scrollbars=no,status=no,width='+winWidth+',height='+winHeight+','+posCode);

	newWindow.document.clear();
	newWindow.document.open('text/html');
	newWindow.document.write('<html><head><title>' + location.hostname + '</title><style type="text/css">body,html{margin:0px;padding:0px}</style></head><body><img src="' + imgName + '" alt="" width="' + winWidth + '" height="' + winHeight + '"></body></html>');
	newWindow.document.close();

	if (newWindow.focus()) newWindow.focus();
	return false;
}


// MENU
function hideObject(num) {
  var div_num = 'div'+num;
  document.getElementById(div_num).className = 'pop';
}

function showObject(num) {
  var div_num = 'div'+num;
  document.getElementById(div_num).className = 'go';
}