function NewWindow(mypage, myname, w, h, scroll) {

var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) {win.window.focus(); }
}

function OpenAnunci() {
var w_width = (screen.width - 150) / 2;
var w_heihgth = (screen.height - 150) / 2;
window.open('resultats/anunci.asp','anunci','top=,'+w_width+',left='+w_heihgth+'width=150,height=150');
}

function hidestatus(){
window.status='Portal del Roc @ 2006'
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus

//Formulari de contacte
function validar_mail(){

if (window.FRMmail.nom.value=="") {
	window.alert("Nom en blanc | Nombre en blanco | Name needed");
	window.FRMmail.nom.focus();		
	return false;
	}

if (window.FRMmail.mail.value!="") {
	if (validaEmail(window.FRMmail.mail.value)==false) {
		window.alert("e-mail incorrecte | e-mail incorrecto | invalid e-mail");
		window.FRMmail.mail.focus();		
		return false;
		}
return true;
}

if (window.FRMmail.telf.value=="") {
	window.alert("Telèfon en blanc | Teléfono en blanco | Phone needed");
	window.FRMmail.telf.focus();		
	return false;
	}

if (window.FRMmail.texte.value=="") {
	window.alert("Consulta en blanc | Consulta en blanco | Request needed");
	window.FRMmail.texte.focus();		
	return false;
	}
	
return true;
}