function white (id) {
	document.getElementById(id).style.backgroundColor = "#374A08";
}

function whiteOFF (id) {
	document.getElementById(id).style.backgroundColor = "";
}

	function hide_elem (obj) {
	   obj.style.display = "none";
	} 
	function FadeIn(id) {
		document.getElementById(id).style.display='block';
	    mint.fx.Fade(id, 100, 20, 500);
	}
	
	function FadeOut(id) {
		//alert(hideMenu);
	    mint.fx.Fade(id, 0, 40, 1000, null, hide_elem);
	    
	}  

	function main_menu_on(localiz) {
		//if (hideMenu) clearInterval(hideMenu);
		var object = document.getElementById("main_"+localiz);
		var object_div = document.getElementById(localiz);
		if (object && object.style.backgroundImage!='url(gfx/!lay_back_top.jpg)' ) {
				object.style.backgroundImage = "url(gfx/!lay_back_top_on.jpg)";
				if (object_div) FadeIn(localiz);
		}
	}
	
	function main_menu_off(localiz) {
		var object = document.getElementById("main_"+localiz);
		var object_div = document.getElementById(localiz);
		if (object && object.style.backgroundImage!='none' ) {
				object.style.backgroundImage = "none";
				if (object_div) {
					
					//clearInterval(hideMenu);
					//var hideMenu = setInterval (function(){FadeOut(localiz);},500);
					//var hideMenu = setInterval (FadeOut(localiz),500);
					FadeOut(localiz);
				}
		}
	
	}	
	
	function main_submenu_on(localiz) {
		
		var object = document.getElementById(localiz);
		//var object_div = document.getElementById(localiz);
		if (object.style.backgroundImage!='url(gfx/!lay_back_top_on_submenu.jpg)' ) {
				object.style.backgroundImage = "url(gfx/!lay_back_top_on_submenu.jpg)";
				//if (object_div) FadeIn(localiz);
		}
	}
	
	function main_submenu_off(localiz) {
	//alert (localiz);
		var object = document.getElementById(localiz);
		//var object_div = document.getElementById(localiz);
		if (object.style.backgroundImage!='none' ) {
				object.style.backgroundImage = "none";
				//if (object_div) FadeOut(localiz);
		}
	
	}	
function LoadSite(site, where, link1, link2) {
	//alert (where);
	var req = mint.Request();
	req.OnSuccess = function() {
	}
	req.OnLoading = function() {
	    	//$(where).innerHTML = "checking ...";
	    	//document.getElementById(frm_id).disabled = true;
	}
	//req.Send(site, where);
	if (where) {
		req.AddParam("link1", link1);
		req.AddParam("link2", link2);
		req.AddParam("dzial_main", site);
		req.Send("ajax_show_navig.php", where);
	}
	//if (site2) req.Send(site2, where2);
}

function SendRequest(where, what, ans, param, param2) {
	var req = mint.Request();
	req.OnSuccess = function() {
		$(ans).innerHTML = this.responseText;
	}
	if (param || param2) {
		req.SendForm(what, where+"?par1="+param+"&par2="+param2);
	}
	else {
		req.SendForm(what, where);
	}
}
