/* Marque page et favoris */
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
//Contact//
function ValiderContact()
{
	var errorMsg = "";
	if(document.formmail.votre_email.value.indexOf('@') == -1) {
		alert("Entrez une adresse email valable");
		document.formmail.votre_email.focus();
		return false;
	}
	
	if (document.formmail.nom.value==""){
		errorMsg += "\n\t- Entrez votre pseudo";	
	}
	
	if (document.formmail.message.value==""){
		errorMsg += "\n\t- Entrez un message";	
	}
	if (document.formmail.sujet.value==""){
		errorMsg += "\n\t- Entrez un sujet";	
	}
	if(document.getElementById("retour_code").innerHTML!="Code bon") {
		errorMsg += "\n\t- Le code du cryptogramme est érroné";
	}	
	if (errorMsg != ""){
		msg = "________________________________________________________________\n\n";
		msg += "Des erreurs ont été détectées.\n";
		msg += "________________________________________________________________\n\n";
		msg += "\n";
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	
	return true;
}
function refreshcode() {
	captcha.location.href="captcha.php?code="+formmail.code.value;
}
function stopthepop(){
if (top.console){
  top.console.stopit();
}
}
function gotonewpage(what) {
  value = what.options[what.selectedIndex].value;
  if (value == "") return;
  window.location.href = value;
}
var winhandle = null;

function popUp(aURL, aImageWidth, aImageHeight) {

  if ((winhandle != null) && (! winhandle.closed)) {

    winhandle.document.images["arlesimage"].src = aURL;

    var isNS = (navigator.appName == "Netscape")? true: false;

    if (isNS) {
      deltaWidth  = aImageWidth  - winhandle.innerWidth;
      deltaHeight = aImageHeight - winhandle.innerHeight;
    }
    else {
      deltaWidth  = aImageWidth  - winhandle.document.body.clientWidth;
      deltaHeight = aImageHeight - winhandle.document.body.clientHeight;
    }

    winhandle.resizeBy(deltaWidth, deltaHeight);
  }
  else
  {
    winhandle=window.open("", "imagewin", 'width=' + aImageWidth + ', height=' + aImageHeight);

    with (winhandle.document){

      writeln('<html><head>');
      writeln('<title>Image<\/title>');
      writeln('<meta http-equiv="imagetoolbar" content="no">');
      writeln('<\/head>');
      writeln('<body bgcolor="#000000" topmargin="0" leftmargin="0" style="margin:0px;">');
      writeln('<img name="arlesimage" src="' + aURL + '" style="display:block">');
      writeln('<\/body><\/html>');
      close();
    }
  }

  winhandle.focus();

}

// Fin JS contact//