function inhabilitar() {
    alert ("El contingut d'aquesta pàgina, incloent-hi les fotografies, és propietat del Col·legi d'Enginyers Industrials de Catalunya, Demarcació de Tarragona.  \n\nNo es pot reproduir sense consentiment explícit per part del Col·legi.");
    return false;
}


function CanviaIdioma( lang, origen ) {
//	var cadena = "canvia.php?lang=" + lang + "&origen=" + origen;
//	document.location.href="/eicdt/libs/canvia.php?lang=" + lang + "&origen=" + origen;
	document.location.href="/includes/canvia.php?lang=" + lang + "&origen=" + origen;
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}


function uno(src,c1) { 
    src.bgColor=c1; src.style.cursor='default';
} 


function dos(src,c2) { 
    src.bgColor=c2; src.style.cursor='default';
}


function openWindow( URL, nombre ) {
	window.open( URL, nombre, "width=450,height=350,scrollbars=YES,menubar=NO,location=NO,toolbar=NO,statusbar=NO,resizable=yes");
}


function NovaFinestra(URLStr) {
	window.open(URLStr,'','menubar=no,scrollbars=yes,status=no,dependent=yes,toolbar=yes,left=100,top=100,height=500,width=700');
}


function NovaFinestra2(URLStr, nom, left, top, width, height) {
	window.open(URLStr,nom,'menubar=no,scrollbars=yes,resizable=yes,status=yes,dependent=yes,toolbar=no,height='+height+',width='+width+',left='+left+',top='+top);
}


function afegir_favorits() {
	window.external.AddFavorite("http://www.enginyerstarragona.com","Enginyers Industrials - Tarragona");
}


function checkEmail(myForm, myMissatge) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.mail.value)){
		return (true);
	}
	alert( myMissatge );
	return (false);
}


startMenu = function() {
	if (document.all&&document.getElementById) {
		cssmenu = document.getElementById("csstopmenu");
		for (i=0; i<cssmenu.childNodes.length; i++) {
			node = cssmenu.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function(){                  
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}