
function goto(link)
{
	window.location.href = 'http://'+ window.location.host + link;
}

function option(id)
{
	if(document.getElementById(id).style.display == 'none') document.getElementById(id).style.display='block'; 
	else document.getElementById(id).style.display='none';
}

function chowaj(id)
{
	document.getElementById(id).style.display='none';
}

function pokaz(id)
{
	document.getElementById(id).style.display='block';
}

function user_alert_left(){
	var w = document.body.clientWidth;
	w = (w/2)-150;
	document.getElementById('user_alert').style.left = w+'px';
	h = document.documentElement.scrollTop + 250;
	document.getElementById('user_alert').style.top = "45%";
	user_alert_check();
}

function user_alert_check(){
	var url = "/inc/ajax_user_alert_check.php";
	var params = "alert=1";
	startPOSTRequest(url, params, user_alert_check_onComplete, user_alert_check_onEnd);     
}

function user_alert_check_onComplete(responseText, responseXML){
	if(responseText!='') user_alert(responseText);
}

function user_alert_check_onEnd(){
}

function user_alert_clear(){
	var url = "/inc/ajax_user_alert_clear.php";
	var params = "alert=0";
	startPOSTRequest(url, params, user_alert_clear_onComplete, user_alert_clear_onEnd);     
}

function user_alert_clear_onComplete(responseText, responseXML){
}

function user_alert_clear_onEnd(){
}

function user_alert(content){
	if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
		jQuery("body","html").css({height: "100%", width: "100%"});
		jQuery("html").css("overflow","hidden");
		if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
			jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
			jQuery("#TB_overlay").click(tb_remove);
		}
	}else{//all others
		if(document.getElementById("TB_overlay") === null){
			jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
			jQuery("#TB_overlay").click(tb_remove);
		}
	}
	if(tb_detectMacXFF()){
		jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
	}else{
		jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
	}	
	document.getElementById('user_alert_cont').innerHTML = content;
	document.getElementById('user_alert').style.display = 'block';
}

function user_alert_exit(){
	document.getElementById('user_alert').style.display = 'none';
	user_alert_clear();
	jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
	jQuery("#TB_load").remove();
	if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
		jQuery("body","html").css({height: "auto", width: "auto"});
		jQuery("html").css("overflow","");
	}
	document.onkeydown = "";
	document.onkeyup = "";
	return false;
}



