var fTimer;
var toHide = 0;
var toShow = 0;


function opwin (id,obj) {
		//var rndnum = Math.round(Math.random() * 10000);
		params = 'height=620,width=680,toolbar=no,menubar=no,scrollbars=yes,location=no,statusbar=no,resizable=yes';	
		window.open("/item.php?iid="+id+"&obj="+obj,id,params);
	}


function show_menu(num){
	/*if (document.all&&document.getElementById("submenu"+num)) {
		if (document.getElementById("submenu"+num).style.display == "block"){
			document.getElementById("submenu"+num).style.display = "none";
			document.getElementById("m"+num).style.zIndex = "1";
		}
		else{
			document.getElementById("submenu"+num).style.display = "block";
			document.getElementById("m"+num).style.zIndex = "5";
		}
	}*/
	window.clearTimeout(fTimer);
	toShow = num;
	if (toShow == toHide) {toHide = 0;}
	fTimer = window.setTimeout("show_menu_timer()", 0);
}

function hide_menu(num){
	window.clearTimeout(fTimer);
	toHide = num;
	if (toShow == toHide) {toShow = 0;}
	fTimer = window.setTimeout("show_menu_timer()", 0);
}

function show_menu_timer(){
	
	if (document.all&&document.getElementById("submenu"+toShow)) {
			document.getElementById("submenu"+toShow).style.display = "block";
			document.getElementById("m"+toShow).style.zIndex = "5";
			document.getElementById("str"+toShow).className="hover";
		}

	if (document.all&&document.getElementById("submenu"+toHide)) {
			document.getElementById("submenu"+toHide).style.display = "none";
			document.getElementById("m"+toHide).style.zIndex = "1";
			document.getElementById("str"+toHide).className="";
		}
}

function show_answer(elem){
	if (elem.parentNode.className == 'answ') elem.parentNode.className = '';
	else elem.parentNode.className = 'answ';
}

function chkfaq_fmr() {
	var frm = document.forms[0];
	if (frm.fio.value=="" || frm.msg.value=="" || frm.email.value=="") {
		alert('Зполните обязательные поля');
	} else {
		frm.submit();
	}	
}