// JavaScript Document

function centerwindow(theurl,wname,width,height,options) {
    x = (640 - width)/2, y = (480 - height)/2;

    if (screen) {
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }
        if (screen.availWidth > 1800) { 
        x = ((screen.availWidth/2) - width)/2; 
    } 

	theurl = theurl + location.search ;

	if (options != ""){
		options = "," + options ;
	}
	openWin = window.open(theurl, wname, 'width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x + options); 
	if(openWin.window.focus){openWin.window.focus();}

}

function sendCoordForm(nform){
	name = nform.name.value;
	last_name = nform.last_name.value;
	email = nform.email.value;
	subject = nform.subject.value;
	message = nform.message.value;
	nform.sent.value = 1;

	if ((name == "") || (last_name == "") || (email == "") || (email == "@") || (subject == "") || (message == "")){
		window.alert("Les champs marqué d'un * sont obligatoire !");
		return false;
	
	}else {
		//centerwindow("confirmation.php","popup",400,180,"scrollbars=no,menubar=no,resizable=no,status=no,toolbar=no, location=no");
		nform.submit();
	}

}
