
function setVerticalCenter(){
        var lstElt = $A(document.getElementsByClassName('vCenter'));
        lstElt.each(function(elt){
                var pN = elt.up();
                if(pN.tagName=='BODY'){
                        var layoutOffsets = document.viewport.getHeight();
                        elt.style.marginTop = (layoutOffsets[1]/2)-(elt.getHeight()/2)+'px';
                }else{
                        if(elt.getHeight()<pN.getHeight()){elt.style.marginTop = (pN.getHeight()/2)-(elt.getHeight()/2)+'px';}
                }
        });
}

function drop_apply_check(field_name,action_text,lang)
{
selectedOptionValue = field_name.options[field_name.selectedIndex].value;
selectedOptionText = field_name.options[field_name.selectedIndex].text;
if(lang=='fr')
 {
 if(confirm("Etes-vous sûr(e) de vouloir propager le paramètre : \n"+action_text+"\n à :\n"+selectedOptionText+" ?")){field_name.blur()}else{field_name.selectedIndex=0;field_name.blur()}
 }
if(lang=='eng')
 {
 if(confirm("Are you sure you wish to propagate the setting : \n"+action_text+"\n to :\n"+selectedOptionText+" ?")){field_name.blur()}else{field_name.selectedIndex=0;field_name.blur()}
 }
}

var GoErase1=true;var GoErase2=true;var GoErase3=true
function erase(th,dh){if (GoErase1 && dh==0){th.value='';GoErase1=false}if (GoErase2 && dh==1){th.value='';GoErase2=false;}if (GoErase3 && dh==2){th.value='';GoErase3=false;}}

function addtolightbox(photo_id,png_size) {
	if(photo_id != "" )
		
		var httprequest = new Image();
		httprequest.src = "update_lightbox.asp?photo_id="+photo_id+"&step=add";
		if(document['addtolightbox_img'+photo_id].src != 'img/Tasks'+png_size+'dp.png'){
			document.getElementById('menu_nb_lightbox').innerHTML=eval(document.getElementById('menu_nb_lightbox').innerHTML)+1;
			swap_addtolightbox_img(photo_id,png_size);
		}
}

function removefromlightbox(photo_id,png_size) {
	if(photo_id != "" )
		//swap_addtolightbox_img(photo_id,png_size);
		var httprequest = new Image();
		httprequest.src = "update_lightbox.asp?photo_id="+photo_id+"&step=del";
		if(document['addtolightbox_img'+photo_id].src != 'img/Tasks'+png_size+'dp.png'){
			if(eval(document.getElementById('menu_nb_lightbox').innerHTML)!=0){
				document.getElementById('menu_nb_lightbox').innerHTML=eval(document.getElementById('menu_nb_lightbox').innerHTML)-1;
				swap_addtolightbox_img(photo_id,png_size);
			}
		}
}

function swap_addtolightbox_img(imgId,png_size) {
	//var fn;
	//fn =  "swapOnTimeout('" + imgId + "','" + document['addtolightbox_img'+imgId].src + "')";
	document['addtolightbox_img'+imgId].style.display = 'none';
	//document['row'+imgId].style.display = 'none';
	//document['addtolightbox_img'+imgId].src = 'img/Tasks'+png_size+'dp.png';
	//setTimeout(fn, 250 );
}

function swapOnTimeout(imgId,imageSrc){
	document['addtolightbox_img'+imgId].src = imageSrc;
}

function openMaxWindow(url) {
    image = window.open(url,"truc",'fullscreen=yes,maximized=yes,outerHeight=' + screen.availHeight + ',outerWidth=' + screen.availWidth + ',location=no,menubar=no,resizable=yes,scrollbars');
}

<!--            sendform           -->
//It can be done but not in all browsers. Netscape Navigator 3+ or Internet Explorer 4+ is required, as in earlier browsers the action property is read only. Hence the quick and dirty check for the image object (irt.org : http://www.irt.org/script/378.htm) 
function sendform(form_name,action,target) {
    if (document.images) {
        document[form_name].action = action;
//        document[form_name].encoding = encoding;
		if (target=="_blank") {target='';document[form_name].target = "_blank";}
		document[form_name].submit();
    }
    return true;
}

<!--            selectall           -->

var checkFlag;
checkFlag = false;

function selectall(form_name,form_part) {
	if (checkFlag==false){
		checkFlag=true
	}else if (checkFlag==true){
		checkFlag=false	
	}
	var var0 = document[form_name]
	for (var i=0; i<var0.length; i++) {
	    var element = var0[i];
	    element.checked = checkFlag;
	}
}

<!--            insertAtCursor           -->

function insertAtCursor(myField, tag, enclose) {
var closeTag;
if ( enclose ) {
closeTag = '[/'+tag.substring ( 1, tag.length );
}
else closeTag='';
//IE support
if (document.selection) {
myField.focus();
sel = document.selection.createRange();
sel.text = tag+sel.text+closeTag;
var leng = myField.value.indexOf(closeTag)-myField.value.indexOf(tag)+tag.length;
if ( enclose ) {sel.moveStart('character', -leng-1);}
else {sel.moveStart('character', -tag.length);}
sel.select();
myField.focus();
}
//MOZILLA/NETSCAPE support
else if (myField.selectionStart || myField.selectionStart == '0') {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
myField.value = myField.value.substring(0, startPos)
+ tag + myField.value.substring(myField.selectionStart, myField.selectionEnd)
+ closeTag +myField.value.substring(endPos, myField.value.length);
myField.selectionStart = startPos;
if ( enclose ) {myField.selectionEnd = endPos + tag.length + tag.length + 1;}
else {myField.selectionEnd = endPos + tag.length;}
myField.focus();
} else {
myField.value += tag+closeTag;
}
}

<!--            textCounter           -->
function textCounter( field, countfield, maxlimit ) {
  if ( field.value.length > maxlimit )
  {
    field.value = field.value.substring( 0, maxlimit );
    alert( 'Ce champ text ne peut contenir que '+maxlimit+' caractères\nThis text field can only contain '+maxlimit+' characters' );
    return false;
  }
  else
  {
    countfield.value = maxlimit - field.value.length;
  }
}

<!--            watermark_endis           -->

function watermark_endis(form_name) {
  var currentState = document[form_name].watermark_string.disabled;
  var newState = !document[form_name].watermark.checked;
  if (newState != currentState)
  {
    document[form_name].watermark_string.disabled = newState;
    document[form_name].watermark_font.disabled = newState;
    document[form_name].watermark_size.disabled = newState;
    document[form_name].watermark_angle.disabled = newState;
    document[form_name].watermark_bold.disabled = newState;
    document[form_name].watermark_italic.disabled = newState;
    document[form_name].watermark_underline.disabled = newState;
    document[form_name].watermark_couleur.disabled = newState;
  }
}

<!--            menu_width_endis           -->

function menu_width_endis(form_name) {
  var newState = document[form_name].menu_width_disable.checked;
    document[form_name].menu_css_WIDTH.disabled = newState;
}

<!--            menu_rollover_endis           -->

function menu_rollover_endis(form_name) {
  var newState = document[form_name].menu_rollover_disable.checked;
    document[form_name]["menu_css_hover_BACKGROUND-IMAGE"].disabled = newState;
    document[form_name]["menu_css_hover_BACKGROUND-POSITION1"].disabled = newState;
    document[form_name]["menu_css_hover_BACKGROUND-POSITION2"].disabled = newState;
    document[form_name].menu_css_hover_COLOR.disabled = newState;
    document[form_name]["menu_css_hover_FONT-WEIGHT"].disabled = newState;
    document[form_name]["menu_css_hover_FONT-STYLE"].disabled = newState;
    document[form_name]["menu_css_hover_FONT-SIZE"].disabled = newState;
    document[form_name]["menu_css_hover_LETTER-SPACING"].disabled = newState;
    document[form_name]["menu_css_hover_TEXT-DECORATION"].disabled = newState;
    document[form_name]["menu_css_hover_TEXT-ALIGN"].disabled = newState;
    document[form_name].menu_css_hover_BACKGROUND.disabled = newState;
    document[form_name].menu_css_hover_BORDER_WIDTH.disabled = newState;
    document[form_name].menu_css_hover_BORDER_COLOR.disabled = newState;
}

<!--            liens_rollover_endis           -->

function links_rollover_endis(form_name) {
  var newState = document[form_name].links_rollover_disable.checked;
    document[form_name].links_css_hover_COLOR.disabled = newState;
    document[form_name]["links_css_hover_TEXT-DECORATION"].disabled = newState;
    document[form_name].links_css_hover_BACKGROUND.disabled = newState;
}

<!--            numvalidate           -->
function numvalidate(field,minvar,maxvar)
{
var valid = "0123456789";
var ok = "yes";
var temp;
if (field.value=="")
  {
   ok="no"
  }
else
  {
  for (var i=0; i<field.value.length; i++)
    {
    temp = "" + field.value.substring(i, i+1);
    if (valid.indexOf(temp) == "-1") ok = "no";
    }
  }
if (ok=="yes")
  {
  if (parseInt(field.value)<minvar || parseInt(field.value)>maxvar) ok = "no";
  }
if (ok=="no")
  {
  alert("Veuillez saisir une valeur numérique entre "+minvar+" et "+maxvar+"\nPlease enter a numeric value between "+minvar+" and "+maxvar);
  field.focus()
  return false;
  }
else return true; 
}

<!--            numvalidate           -->
function hexa_color_name_validate(field)
{
var valid = "0123456789ABCDEF";
var ok = "yes";
var temp;
if (field.value=="")
  {
   ok="no"
  }
else
  {
  for (var i=0; i<field.length; i++)
    {
    temp = "" + field.substring(i, i+1);
    if (valid.indexOf(temp) == "-1") ok = "no";
    }
  }
if (ok=="yes")
  {
  if (field.length!=6) ok = "no";
  }
if (ok=="no")
  {
  alert("Veuillez saisir une valeur hexadécimale de couleur correcte (6 caractères entre 000000 et FFFFFF) ou choisissez une couleur disponible plus bas\nPlease enter a correct hexa color code (6 chars between 000000 and FFFFFF) or pick a color available below");
  field.focus()
  return false;
  }
else return true; 
}

<!--            pastecolor           -->
function pc(form_name,color_name)
{
if (document[form_name].paste_color_destination.value!='')
  {
  myel = document.getElementsByName("paste_color_destination")
  myval = myel.item(0).value
  document[form_name][myval].value = color_name;
  document[form_name][myval].style.backgroundColor=color_name;
  prev_css_bg = color_name;
  document[form_name][myval].focus();
  }
}

function changeopac(cur)
{
if (cur.style.MozOpacity)
   {
   if (cur.style.MozOpacity==1){cur.style.MozOpacity=0.5;}
   else if (cur.style.MozOpacity==0.5){cur.style.MozOpacity=1;}
   }
else if (cur.filters)
   {
   if (cur.filters.alpha.opacity==100){cur.filters.alpha.opacity=50;}
   else if (cur.filters.alpha.opacity==50){cur.filters.alpha.opacity=100;}
   }
}
function rightclick(e){
         if(document.all){
            if(event.button==2 || event.button==3){
               alert('Interdit : Les images visibles ici sont la seule propriété de leur auteur, et ne doivent pas être téléchargées.\nForbidden : all the images on this page are the sole copyright of the photographer and should not be downloaded.');
               return false;
            }
         }
         if(document.layers){
            if(e.which == 3){
               alert('Interdit : Les images visibles ici sont la seule propriété de leur auteur, et ne doivent pas être téléchargées.\nForbidden : all the images on this page are the sole copyright of the photographer and should not be downloaded.');
               return false;
            }
         }
}
if(document.layers){
   document.captureEvents(Event.MOUSEDOWN);
}
<!--            incrdate           -->
function incrdate(digit,op,form_name,field_name,hidden_field_name){
		var actdate = new Date(document[form_name][hidden_field_name].value);
		switch (digit){
		case 'd':
		if(op == 'a'){actdate.setTime(actdate.getTime() + 1 * 24 * 60 * 60 * 1000);}
		if(op == 's'){actdate.setTime(actdate.getTime() - 1 * 24 * 60 * 60 * 1000);}
		break;
		case 'm':
		if(op == 'a'){actdate.setTime(actdate.getTime() + 30 * 24 * 60 * 60 * 1000);}
		if(op == 's'){actdate.setTime(actdate.getTime() - 30 * 24 * 60 * 60 * 1000);}
		break;
		case 'y':
		if(op == 'a'){actdate.setTime(actdate.getTime() + 365 * 24 * 60 * 60 * 1000);}
		if(op == 's'){actdate.setTime(actdate.getTime() - 365 * 24 * 60 * 60 * 1000);}
		break;
		case 'h':
		if(op == 'a'){actdate.setTime(actdate.getTime() + 60 * 60 * 1000);}
		if(op == 's'){actdate.setTime(actdate.getTime() - 60 * 60 * 1000);}
		break;
		case 'min':
		if(op == 'a'){actdate.setTime(actdate.getTime() + 60 * 1000);}
		if(op == 's'){actdate.setTime(actdate.getTime() - 60 * 1000);}
		break;
		case 's':
		if(op == 'a'){actdate.setTime(actdate.getTime() + 1000);}
		if(op == 's'){actdate.setTime(actdate.getTime() - 1000);}
		break;
		}
		document[form_name][hidden_field_name].value = (actdate.getMonth()+1) + '/' + actdate.getDate() + '/' + actdate.getFullYear() +  ' ' + actdate.getHours() + ':' + actdate.getMinutes() + ':' + actdate.getSeconds()
		document[form_name][field_name].value = actdate.getDate() + '/' + (actdate.getMonth()+1) + '/' + actdate.getFullYear() + ' ' + actdate.getHours() + ':' + actdate.getMinutes() + ':' + actdate.getSeconds() 
		return false;
	}

<!--           check_user_profil_form            -->
function check_user_profil_form()
{
if (checkcivilite() && checknom() && checkprenom() && checkemail() && checkpwd() && form_carcheck("user_profil_form")){return true;}
else return false;
}

<!--          checkcivilite             -->
function checkcivilite()
{
var civilitechecked = 0; 
for (i=0;i<3;i++) { 
if (document.user_profil_form.user_civilite[i].checked) civilitechecked=1; 
} 
if (civilitechecked==0) { 
    alert("\nVeuillez saisir votre civilité\nPlease enter your title") 
    return false; 
	}
else return true;	
}

<!--          checknom             -->
function checknom()
{
if (document.user_profil_form.user_nom.value == "") { 
    alert("\nVeuillez saisir votre nom\nPlease enter your surname") 
    document.user_profil_form.user_nom.focus(); 
	document.user_profil_form.user_nom.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--           checkprenom            -->
function checkprenom()
{
if (document.user_profil_form.user_prenom.value == "") { 
    alert("\nVeuillez saisir votre prénom\nPlease enter your first name") 
    document.user_profil_form.user_prenom.focus(); 
	document.user_profil_form.user_prenom.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--          checkemail             -->
function checkemail()
{
if (document.user_profil_form.user_email.value == "") { 
    alert("\nVeuillez saisir votre adresse email\nPlease enter your email address") 
    document.user_profil_form.user_email.focus(); 
	document.user_profil_form.user_email.style.backgroundColor=highlightcolor
    return false; 
	}
else {
	 if (isEmail(document.user_profil_form.user_email.value))
	 	return true;
	else {
    alert("\nVeuillez saisir une adresse email valide\nPlease enter a valid email address")
    document.user_profil_form.user_email.focus(); 
	document.user_profil_form.user_email.style.backgroundColor=highlightcolor
	return false;
	} 
	 }
}

<!--          isEmail             -->
function isEmail(str) {
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

<!--           checklogin            -->
function checklogin()
{
if (document.user_profil_form.user_login.value == "") { 
    alert("\nVeuillez saisir votre login\nPlease enter your login") 
    document.user_profil_form.user_login.focus(); 
	document.user_profil_form.user_login.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--           checkpwd            -->
function checkpwd()
{
if (document.user_profil_form.user_pwd.value == "") { 
    alert("\nVeuillez saisir votre mot de passe\nPlease enter your password") 
    document.user_profil_form.user_pwd.focus(); 
	document.user_profil_form.user_pwd.style.backgroundColor=highlightcolor
    return false; 
	}
else
  {
  if (document.user_profil_form.user_pwd2.value != document.user_profil_form.user_pwd.value) { 
    alert("\nVeuillez confirmer votre mot de passe\nPlease confirm your password") 
    document.user_profil_form.user_pwd2.focus(); 
	document.user_profil_form.user_pwd2.style.backgroundColor=highlightcolor
    return false; 
	}
  return true;
  }	
}

<!--           check_gallery_form            -->
function check_gallery_form()
{
if (check_gallery_titre() && form_carcheck("gallery_form")) {return true;}
else return false;
}

<!--           check_gallery_titre         -->
function check_gallery_titre()
{
if (document.gallery_form.gallery_titre.value == "") { 
    alert("\nVeuillez saisir le titre de la gallerie\nPlease enter the title for the gallery")
    return false; 
	}
else return true;	
}

<!--           check_gallery_thumb_next_prev_str1         -->
function check_gallery_thumb_next_prev_str1()
{
if ((document.gallery_form.gallery_thumb_next_prev_str1.value != "" && document.gallery_form.gallery_thumb_next_prev_str1.value.indexOf("/") == -1) && document.gallery_form.gallery_layout[0].checked==true) { 
    alert("\nVeuillez saisir deux expressions séparées par le signe / pour la disposition n°1\nPlease enter two statements separated by sign / for layout n°1") 
    document.gallery_form.gallery_thumb_next_prev_str1.focus(); 
	document.gallery_form.gallery_thumb_next_prev_str1.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--           check_gallery_corps_images_switch         -->
function check_gallery_corps_images_switch()
{
if (document.gallery_form.gallery_corps_images_switch.value != "" && document.gallery_form.gallery_corps_images_switch.value.indexOf("/") == -1) { 
    alert("\nVeuillez saisir deux expressions séparées par le signe / ou laisser vide\nPlease enter two statements separated by sign / or leave mepty") 
    document.gallery_form.gallery_corps_images_switch.focus(); 
	document.gallery_form.gallery_corps_images_switch.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--           check_rubrique_form            -->
function check_rubrique_form()
{
if (check_rubrique_titre() && form_carcheck("rubrique_form")) {document.rubrique_form.submit();}
else return false;
}

<!--           check_rubrique_titre         -->
function check_rubrique_titre()
{
if (document.rubrique_form.rubrique_titre.value == "") { 
    alert("\nVeuillez saisir le titre de la rubrique\nPlease enter the title for the section") 
    document.rubrique_form.rubrique_titre.focus(); 
	document.rubrique_form.rubrique_titre.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--           check_url_form            -->
function check_url_form()
{
if (check_url_url() && check_url_description() && form_carcheck("url_form")) {document.url_form.submit();}
else return false;
}

<!--            check_url_url           -->
function check_url_url()
{
if (document.url_form.url_url.value == "" || document.url_form.url_url.value == "http://") { 
    alert("\nVeuillez saisir l'adresse url du lien\nPlease enter the url address of the link") 
    document.url_form.url_url.focus(); 
	document.url_form.url_url.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--           check_url_description            -->
function check_url_description()
{
if (document.url_form.url_description.value == "") { 
    alert("\nVeuillez saisir la description du lien\nPlease enter the description of the link") 
    document.url_form.url_description.focus(); 
	document.url_form.url_url.description.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--           check_produit_form            -->
function check_produit_form()
{
if (check_produit_nom() && check_numeric(produit_form.produit_prix) && check_numeric(produit_form.produit_prix_port)) {document.produit_form.submit();}
else return false;
}

<!--           check_produit_nom            -->
function check_produit_nom()
{
if (document.produit_form.produit_nom.value == "") { 
    alert("\nVeuillez saisir le nom du produit\nPlease enter the name of the product") 
    document.produit_form.produit_nom.focus(); 
	document.produit_form.produit_nom.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}


function check_numeric(formpart)
{
if (formpart.value.replace(/\D/g,'') == ""){alert("Veuillez saisir une valeur numérique (entier)\nPlease enter a numeric value (integer)");formpart.focus();}
else return true;
}

<!--          check_caddie_form             -->
function check_caddie_form()
{
if (check_caddie_email() && check_caddie_nom() && check_caddie_adresse()) {return true;}
else return false;
}

<!--           check_caddie_nom            -->
function check_caddie_nom()
{
if (document.caddie_form.caddie_nom.value == "") { 
    alert("\nVeuillez saisir votre nom/prénom\nPlease type your name/surname") 
    document.caddie_form.caddie_nom.focus(); 
	document.caddie_form.caddie_nom.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--           check_caddie_adresse            -->
function check_caddie_adresse()
{
if (document.caddie_form.caddie_adresse.value == "") { 
    alert("\nVeuillez saisir votre adresse\nPlease type your address") 
    document.caddie_form.caddie_adresse.focus(); 
	document.caddie_form.caddie_adresse.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--         check_caddie_email              -->
function check_caddie_email()
{
if (document.caddie_form.caddie_email.value == "") { 
    alert("\nVeuillez saisir votre adresse email\nPlease enter your email address") 
    document.caddie_form.caddie_email.focus(); 
	document.caddie_form.caddie_email.style.backgroundColor=highlightcolor
    return false; 
	}
else {
	 if (isEmail(document.caddie_form.caddie_email.value))
	 	return true;
	else {
    alert("\nVeuillez saisir une adresse email valide\nPlease enter a valid email address")
    document.caddie_form.caddie_email.focus(); 
	document.caddie_form.caddie_email.style.backgroundColor=highlightcolor
	return false;
	} 
	 }
}

<!--          check_message_form             -->
function check_message_form()
{
if (check_message_nom() && check_message_email_ou_site_internet() && check_message_titre() && check_message_corps() && form_carcheck("message_form")) {document.message_form.submit();}
else return false;
}

<!--          check_message_form2 (pour tellafriend)             -->
function check_message_form2()
{
if (check_message_nom() && check_message_email() && check_message_email2() && check_message_titre() && check_message_corps() && form_carcheck("message_form2")) {document.url_form.submit();}
else return false;
}

<!--          check_message_nom             -->
function check_message_nom()
{
if (document.message_form.message_nom.value == "") { 
    alert("\nVeuillez saisir votre nom\nPlease enter your surname") 
    document.message_form.message_nom.focus(); 
	document.message_form.message_nom.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--          check_message_titre             -->
function check_message_titre()
{
if (document.message_form.message_titre.value == "") { 
    alert("\nVeuillez saisir le titre de votre message\nPlease enter the title of your message") 
    document.message_form.message_titre.focus(); 
	document.message_form.message_titre.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--         check_message_corps              -->
function check_message_corps()
{
if (document.message_form.message_corps.value == "") { 
    alert("\nVeuillez saisir le corps de votre message\nPlease enter the body of your message") 
    document.message_form.message_corps.focus(); 
	document.message_form.message_corps.style.backgroundColor=highlightcolor
    return false; 
	}
else return true;	
}

<!--         check_message_email              -->
function check_message_email()
{
if (document.message_form.message_email.value == "") { 
    alert("\nVeuillez saisir votre adresse email\nPlease enter your email address") 
    document.message_form.message_email.focus(); 
	document.message_form.message_email.style.backgroundColor=highlightcolor
    return false; 
	}
else {
	 if (isEmail(document.message_form.message_email.value))
	 	return true;
	else {
    alert("\nVeuillez saisir une adresse email valide\nPlease enter a valid email address")
    document.message_form.message_email.focus(); 
	document.message_form.message_email.style.backgroundColor=highlightcolor
	return false;
	} 
	 }
}

<!--         check_message_email              -->
function check_message_email_ou_site_internet()
{
if (document.message_form.message_email.value == "") { 
    alert("\nVeuillez saisir votre adresse email ou de site internet\nPlease enter your email or website address") 
    document.message_form.message_email.focus(); 
	document.message_form.message_email.style.backgroundColor=highlightcolor
    return false; 
	}
else {
	 if (isEmail(document.message_form.message_email.value) || document.message_form.message_email.value.indexOf('http://')==0)
	 	return true;
	else {
    alert("\nVeuillez saisir une adresse email ou de site internet valide (en incluant http://)\nPlease enter a valid email or website address (including http://)")
    document.message_form.message_email.focus(); 
	document.message_form.message_email.style.backgroundColor=highlightcolor
	return false;
	} 
	 }
}

<!--         check_message_email2              -->
function check_message_email2()
{
if (document.message_form.message_email2.value == "") { 
    alert("\nVeuillez saisir l'adresse email de votre correspondant\nPlease enter the email address of your correspondant") 
    document.message_form.message_email2.focus(); 
	document.message_form.message_email2.style.backgroundColor=highlightcolor
    return false; 
	}
else {
	 if (isEmail(document.message_form.message_email2.value))
	 	return true;
	else {
    alert("\nVeuillez saisir une adresse email valide\nPlease enter a valid email address")
    document.message_form.message_email2.focus(); 
	document.message_form.message_email2.style.backgroundColor=highlightcolor
	return false;
	} 
	 }
}

<!--vérif des caractères interdits inférieur et supérieur-->
function carcheck(formpart)
{
var car1=">"
var car2="<"
if (formpart.value.search(car1)==-1 && formpart.value.search(car2)==-1)
    return true
else
    alert("Les tags HTML et les caractères < > sont interdits\nHTML tags and < > characters are forbidden") 
    formpart.focus();
	formpart.style.backgroundColor=highlightcolor
    return false; 
}

<!--vérif de tous les caractères interdits inférieur et supérieur d'un formulaire-->
function form_carcheck(form_name) {
    gotrue=true;
	for (var i=0; i<document[form_name].elements.length; i++)
	  {
	  if (document[form_name].elements(i).name=='custom_htm_head' || document[form_name].elements(i).name=='custom_htm1' || document[form_name].elements(i).name=='gallery_thumb_next_prev_str1' || carcheck(document[form_name].elements(i))){}
	  else
        {
	    gotrue=false;
	    break;
	    }
	  }
	  return gotrue;
}

<!--vérif des caractères interdits inférieur et supérieur et guillemets simples et doubles-->
function carcheck2(formpart)
{
var car1=">"
var car2="<"
var car3="\""
var car4="\'"
var car5="\%"
if (formpart.value.search(car1)==-1 && formpart.value.search(car2)==-1 && formpart.value.search(car3)==-1 && formpart.value.search(car4)==-1 && formpart.value.search(car5)==-1)
    return true
else
    alert("\tVous avez tapé un caractère interdit (< >  \" \' \% )\n\t\tRecommencez. Merci\n\n (Le curseur va se placer dans la boîte de texte correspondante)") 
    formpart.focus(); 
    return false; 
}

<!--

/******************************************
* Contractible Headers Script- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/

var ns6=document.getElementById&&!document.all?1:0
var head="display:''"
var folder=''
function expandit(curobj){
//folder=ns6? curobj.nextSibling.nextSibling : curobj.all.tags("SPAN")[0]
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style
if (folder.display=="none"){
folder.display="";
//curobj.style.listStyleImage="url(../pics/mastercard.gif)";
}
else{
folder.display="none";
//curobj.style.listStyleImage="url(../pics/cb.gif)";
}
}

//-->
