function riddle(riddlerarray)
{
/***********************************************
* Encrypt Email script- Please keep notice intact
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/

//var emailriddlerarray=[121,111,117,64,121,111,117,114,100,111,109,97,105,110,46,99,111,109]
var encryptedemail_id32='' //variable to contain encrypted email 
for (var i=0; i<riddlerarray.length; i++)
 encryptedemail_id32+=String.fromCharCode(riddlerarray[i])

//document.write('<a href="mailto:'+encryptedemail_id32+'">Contact Us</a>')
document.write(encryptedemail_id32)
}

function riddle2(riddlerarray)
{
/***********************************************
* Encrypt Email script- Please keep notice intact
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/

//var emailriddlerarray=[121,111,117,64,121,111,117,114,100,111,109,97,105,110,46,99,111,109]
var encryptedemail_id32='' //variable to contain encrypted email 
for (var i=0; i<riddlerarray.length; i++)
 encryptedemail_id32+=String.fromCharCode(riddlerarray[i])

//document.write('<a href="mailto:'+encryptedemail_id32+'">Contact Us</a>')
window.location.assign(encryptedemail_id32)
}

function imprimer(lang){
	if (window.print) { window.print(); } 
	else if (lang == "fr") { alert("Votre navigateur n'est pas compatible avec l'impression directe.\n\nPour imprimer, allez dans le menu Fichier de votre navigateur et choisissez \"Imprimer\"."); }
	else { alert("Your browser does not support direct printing.\n\nTo print, go to the File menu of your browser and select \"Print\"."); }
}

/***********************************************
* ShowHide layer/
* **********************************************/

function multiClass(eltId) {
	arrLinkId = new Array('_0','_1','_2');
	intNbLinkElt = new Number(arrLinkId.length);
	arrClassLink = new Array('current','ghost');
	strContent = new String()
	for (i=0; i<intNbLinkElt; i++) {
		strContent = "menu"+arrLinkId[i];
		if ( arrLinkId[i] == eltId ) {
			document.getElementById(arrLinkId[i]).className = arrClassLink[0];
			document.getElementById(strContent).className = 'on content';
		} else {
			document.getElementById(arrLinkId[i]).className = arrClassLink[1];
			document.getElementById(strContent).className = 'off content';
		}
	}	
}

/***********************************************
* ShowHide layer/
* **********************************************/

function ShowHideControl(ControlID){
    var divLoading=document.getElementById(ControlID);
    if(divLoading.style.display == "block"){
        ShowControl(ControlID);
    }else{
        HideControl(ControlID);
   }
   return false;
}
 
function ShowControl(ControlID){
    var divLoading=document.getElementById(ControlID);
    divLoading.style.display = "none";
}
 
function HideControl(ControlID){
    var divLoading=document.getElementById(ControlID);
    divLoading.style.display = "block";
}


/***********************************************
* ShowHide textfield/
* **********************************************/

    function hideDefaultText(field, password) {
    alert(field.value);
}

function hideDefaultText(field, password) {
    if (field.value == password) {
        field.value = "";
    }
}

function showDefaultText(field, password) {
    if (field.value == "") {
        field.value = password;
    }
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* DoInsertImage() - Insère la photo dans le frame principal
*/
function DoInsertImage(iImgName,iImgDesc,iImgPhotographe)
{
	var ObjCadre=document.getElementById("CadrePhoto");

	ObjCadre.src = iImgName;
	ObjCadre.alt = iImgDesc;

}


function popupMapFiche(typeFiche, id) { 
	window.open("/popupmap.php?TypeFiche=" + typeFiche + "&FicheID="+id,"","width=930,height=700"); 
}

function popupMapCircuit(id) { 
	window.open("/popupmapCircuit.php?ID="+id,"","width=930,height=700"); 
}

function changePage(page) {
	document.frmGalerie.curPage.value = page;
	document.frmGalerie.submit(); 
}


function expandImage(photoID, categoryID, langue) {
	url="/visionneuse.php?ID=" + photoID + "&GalerieID=" + categoryID + "&amp;L=" + langue;
	window.open(url, "", "width=534,height=630");
}


var strTitle = encodeURIComponent(document.title);
var strUrl = encodeURIComponent(document.location.href);

function imprimer() {
	if (window.print) { window.print(); }
    else if (lang == "fr") { alert("Votre navigateur n'est pas compatible avec l'impression directe.\n\nPour imprimer, allez dans le menu Fichier de votre navigateur et choisissez \"Imprimer\"."); }
    else { alert("Your browser does not support direct printing.\n\nTo print, go to the File menu of your browser and select \"Print\"."); }
}

function printPage() {
	imprimer();
}

function ajouterDestination(type, ID) {
	document.PlannedMap.itineraireAction.value = 1;
	document.PlannedMap.itineraireType.value = type;
	document.PlannedMap.itineraireID.value = ID;
	document.PlannedMap.submit();
}

function retirerDestination(type, ID) {
	document.PlannedMap.itineraireAction.value = 2;
	document.PlannedMap.itineraireType.value = type;
	document.PlannedMap.itineraireID.value = ID;
	document.PlannedMap.submit();
}

function ajouterCarnet(type, ID) {
	document.FormCarnetVoyage.carnetAction.value = 1;
	document.FormCarnetVoyage.carnetType.value = type;
	document.FormCarnetVoyage.carnetID.value = ID;
	document.FormCarnetVoyage.submit();
}

function retirerCarnet(type, ID) {
	document.FormCarnetVoyage.carnetAction.value = 2;
	document.FormCarnetVoyage.carnetType.value = type;
	document.FormCarnetVoyage.carnetID.value = ID;
	document.FormCarnetVoyage.submit();
}

/* bannières */
function feedBan(flash, image, alt, link, banWidth,banHeight, target) {
    var ctnr = document.getElementById("ftrBann");
    var img = '';
    if (target != '') {
        img = '<a href="' + link + '" target="' + target + '"><img src="' + image + '" alt="' + alt + '" />';
    } else {
        img = '<a href="' + link + '"><img src="' + image + '" alt="' + alt + '" />';
    }
    
    if (flash == "") {
        ctnr.innerHTML = img;
    } else {
        var so = new SWFObject(flash, "banner", banWidth, banHeight, "7.0.0", "#FEFCF1");
        so.addVariable("lien", escape(link));
        so.write("ftrBann");
        if (so.write("ftrBann") == false) ctnr.innerHTML = img;
    }
    ctnr.style.display = "block";
}


/***********************************************
* ShowHide boutique/
* **********************************************/

function layerSetup(id,visibility){
if(document.getElementById){
this.obj = document.getElementById(id).style;
this.obj.visibility = visibility;
return this.obj;}
else if(document.all){
this.obj = document.all[id].style;
this.obj.visibility = visibility;
return this.obj;}
else if(document.layers){
this.obj = document.layers[id];
this.obj.visibility = visibility;
return this.obj;}
}
function visVisible(param){
new layerSetup(param,'visible');
}

function visHidden(param){
new layerSetup(param,'hidden');
}

/***********************************************
* switch image layer/
* **********************************************/

    function ToggleFAQ(QuestionID, AnswerID) {
        var Answer = document.getElementById(AnswerID);
        var Question = document.getElementById(QuestionID);

        if (Question != null && Answer != null) {
            if (Answer.style.display == "block") {
                Answer.style.display = "none";
                Question.className = "dlinactif";
            }
            else {
                Answer.style.display = "block";
                Question.className = "dlactif";
            }
        }
    }

/***********************************************
* show hide mot de passe oublié/
* **********************************************/

    function ItemHideShow(id, cloaking) {
        if (document.getElementById) {
            obj = document.getElementById(id);
            if (obj != null) {
                if (obj.style.visibility == "")
                    ItemHide(id, cloaking);
                else
                    ItemShow(id, cloaking);
            }
        }
    }

    function ItemShow(id, cloaking) {
        if (document.getElementById) {
            obj = document.getElementById(id);
            if (obj != null) {
                obj.style.visibility = "";
                if (cloaking == true) cloak("viewer");
            }
        }
    }

    function ItemHide(id, cloaking) {
        if (document.getElementById) {
            obj = document.getElementById(id);
            if (obj != null)
                obj.style.visibility = "hidden";
            if (cloaking == true) cloak("normal");
        }
    }

