
function pager_hide(id)
{
	var temp  = document.getElementById(id);
	if(temp && temp !="undefined")
	{
		temp.style.display="none";
	}
}
function pager_show(id)
{
	var temp  = document.getElementById(id);
	if(temp && temp !="undefined")
	{
		temp.style.display="block";
	}
}
function frontend_hide(id)
{
	document.getElementById(id).style.display = "none";
}
function frontend_show(id)
{
	document.getElementById(id).style.display = "block";
}
function videolist_hide(id){
	document.getElementById(id).style.display = "none";
}
function videolist_show(id){
	document.getElementById(id).style.display = "block";
}



function openStaticPage(stringId){
 	 	window.open("/frontend.php/staticpage/showByStringId?string_id="+stringId,
 		"test","menubar=0, resizable=0, scrollbars=1; status=0, left=100, top=100, width=720,height=400");
 	}


function openStaticCategory(id){
	 	new Ajax.Updater('wrap', 
	 					 '/frontend.php/contentcategory/show?category_id='+id, 
	 					 {
	 					 	asynchronous:true,
	 					 	evalScripts:true, 
	 					 	onComplete:function(request, json){showCategory('wrap')}, 
	 					 	onLoading:function(request, json){loadingCategory('wrap')}
	 					 }
	 					 ); return false;
 	 }





  	function showCategory(updateDiv){
		//document.getElementById(updateDiv).innerHTML = "";
		document.getElementById(updateDiv+"_loader").style.display = "none";
		document.getElementById(updateDiv).style.display="block";
	}
	function loadingCategory(updateDiv){
		//document.getElementById(updateDiv).innerHTML = "";
		document.getElementById(updateDiv).style.display="none";
		document.getElementById(updateDiv+"_loader").style.display = "block";
	}
	
	var selected = "cat_0";
	function changeCSSClass(active){
		if (active != selected){
			document.getElementById(selected).className = "";
			document.getElementById(active).className = "active";
			selected = active;
		}
	}
	
	function openPage(url){
		new Ajax.Updater('highlight_container', url, {asynchronous:true, evalScripts:true, onComplete:function(request, json){frontend_hide('highlight_container_loader');videolist_show('highlight_container')}, onLoading:function(request, json){videolist_hide('highlight_container'); frontend_show('highlight_container_loader')}}); return false;
	
	}
	
	function openInfo(){
		new Ajax.Updater('test_01', '/frontend.php/frontend_user/userinfo', {asynchronous:true, evalScripts:true }); return false;
	
	}
	
	function MarkoKid(){
		document.getElementById('login_error').innerHTML = 'Area riservata per gli utenti registrati!'; 
		return false;
	}