	var ie4 = false;
	if(document.all)ie4 = true;
contador=0;

function ocultarmenus(src){
	if(src.id!='catNosaltres')document.getElementById('mnuNosaltres').style.display='none';
	if(src.id!='catServeis')document.getElementById('mnuServeis').style.display='none';
	if(src.id!='catInfo')document.getElementById('mnuInfo').style.display='none';
}

function isDefined(variable)
{
    return (typeof(window[variable]) == "undefined")?  false: true;
}

//al mouseout
function amagar(obj){
//if(!isDefined('cenrere')){

if(contador==0){
	cenrere=setInterval(function(){
	contador++;
	if(contador==60){
		document.getElementById(obj).style.display='none';
		contador=0;
		clearInterval(cenrere);
	}




},1);

}


}








function colocarmenu(menu,categoria){
if(isDefined('cenrere')){
	clearInterval(cenrere);
	contador= 0;
	}





var obj=document.getElementById(menu);
//if(obj.style.display!=''){
obj.style.display='';

if(ie4)altura = document.getElementById(categoria).offsetHeight-16;
else altura = document.getElementById(categoria).offsetHeight;

obj.style.top=(altura+document.getElementById(categoria).offsetTop)+'px';
obj.style.left=document.getElementById(categoria).offsetLeft+'px';


//}else{
//obj.style.display='none';
//}
}




function AfegirPreferits() {
	var title = document.title;
	var url = document.location.href;
	
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,''); //Mozilla Firefox Bookmark
	}else if( window.external ) {
		window.external.AddFavorite( url, title); //IE Favorite
	}else if(window.opera && window.print) {
		return true; //Opera Hotlist
	}
}
