function initit(list, img)
{
  	/*var show = GetCookie(list);
	var listElementStyle=document.getElementById(list).style;
    
	if (show == "true")
		listElementStyle.display="block";
    
    else
		listElementStyle.display="none";*/
}


function switchit(list,img,titlista){
	var listElementStyle=document.getElementById(list).style;
	var EstilTitLlista=document.getElementById(titlista);
	var Titlista2=document.getElementById('p2');
	var Titlista3=document.getElementById('p3');
	var Titlista4=document.getElementById('p4');

	
	if (listElementStyle.display=="none"){
		listElementStyle.display="block";
		SetCookie(list,"true");
	}
	else{
		listElementStyle.display="none";
		SetCookie(list,"false");
	}
	
	if (titlista == 'p2')
	Titlista2.className='FondoLiSelec';
	else
	Titlista2.className='FondoLiNoSelec';
	
	if (titlista == 'p3')
	Titlista3.className='FondoLiSelec';
	else
	Titlista3.className='FondoLiNoSelec';
	
	if (titlista == 'p4')
	Titlista4.className='FondoLiSelec';
	else
	Titlista4.className='FondoLiNoSelec';
	

}


function SetCookie(name, value, expires, path, domain){
	document.cookie = name + "=" + escape(value) + 
	((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
	((path == null)    ? "" : "; path=" + path) +
	((domain == null)  ? "" : "; domain=" + domain);
}


function GetCookie(name){
	var cname = name + "=";               
	var dc = document.cookie;             

	if (dc.length > 0){
		begin = dc.indexOf(cname);       
		
		if (begin != -1){
			begin += cname.length;       
			end = dc.indexOf(";", begin);
	
			if (end == -1) end = dc.length;
				return unescape(dc.substring(begin, end));
		
		} 
	}
return null;
}


function DelCookie (name,path,domain){
	
	if (getCookie(name)){
		document.cookie = name + "=" +
	    ((path == null) ? "" : "; path=" + path) +
    	((domain == null) ? "" : "; domain=" + domain) +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}