// Pour contrer les robotsÉ

function mailit(name,domain) {
status="mailto:" + name + "@" + domain;
locationstring = "mailto:" + name + "@" + domain;
window.location = locationstring;
}

/* <a href="javascript:mailit('info','quebecartcite.com')">info&nbsp;&#64;&nbsp;quebecartcite.com</a> */


// ------------------------------------

if (document.images) {
accueil_mo = new Image
accueil_mo.src = "images/accueil_mo.jpg" 
accueil_ac = new Image
accueil_ac.src = "images/accueil_ac.jpg"
accueil_rt = new Image
accueil_rt.src = "images/accueil.jpg"
artistes_mo = new Image
artistes_mo.src = "images/artistes_mo.jpg" 
artistes_ac = new Image
artistes_ac.src = "images/artistes_ac.jpg"
artistes_rt = new Image
artistes_rt.src = "images/artistes.jpg"
liens_mo = new Image
liens_mo.src = "images/liens_mo.jpg" 
liens_ac = new Image
liens_ac.src = "images/liens_ac.jpg"
liens_rt = new Image
liens_rt.src = "images/liens.jpg"
contact_mo = new Image
contact_mo.src = "images/contact_mo.jpg" 
contact_ac = new Image
contact_ac.src = "images/contact_ac.jpg"
contact_rt = new Image
contact_rt.src = "images/contact.jpg"
corporations_mo = new Image
corporations_mo.src = "images/corporations_mo.jpg" 
corporations_ac = new Image
corporations_ac.src = "images/corporations_ac.jpg"
corporations_rt = new Image
corporations_rt.src = "images/corporations.jpg"
equipe_mo = new Image
equipe_mo.src = "images/equipe_mo.jpg" 
equipe_ac = new Image
equipe_ac.src = "images/equipe_ac.jpg"
equipe_rt = new Image
equipe_rt.src = "images/equipe.jpg"
mission_mo = new Image
mission_mo.src = "images/mission_mo.jpg" 
mission_ac = new Image
mission_ac.src = "images/mission_ac.jpg"
mission_rt = new Image
mission_rt.src = "images/mission.jpg"
performances_mo = new Image
performances_mo.src = "images/performances_mo.jpg" 
performances_ac = new Image
performances_ac.src = "images/performances_ac.jpg"
performances_rt = new Image
performances_rt.src = "images/performances.jpg"
box_1_mo = new Image
box_1_mo.src = "images/box_1.jpg"
box_1_rt = new Image 
box_1_rt.src = "images/box_0.jpg" 
box_2_mo = new Image
box_2_mo.src = "images/box_2.jpg"
box_2_rt = new Image
box_2_rt.src = "images/box_0.jpg" 
box_3_mo = new Image
box_3_mo.src = "images/box_3.jpg" 
box_3_rt = new Image
box_3_rt.src = "images/box_0.jpg"  
box_4_mo = new Image
box_4_mo.src = "images/box_4.jpg" 
box_4_rt = new Image
box_4_rt.src = "images/box_0.jpg"  
}
else {
document.accueil = ""
accueil_mo = ""
accueil_ac = ""
accueil_rt = ""
document.artistes = ""
artistes_mo = ""
artistes_ac = ""
artistes_rt = ""
document.liens = ""
liens_mo = ""
liens_ac = ""
liens_rt = ""
document.contact = ""
contact_mo = ""
contact_ac = ""
contact_rt = ""
document.corporations = ""
corporations_mo = ""
corporations_ac = ""
corporations_rt = ""
document.equipe = ""
equipe_mo = ""
equipe_ac = ""
equipe_rt = ""
document.mission = ""
mission_mo = ""
mission_ac = ""
mission_rt = ""
document.performances = ""
performances_mo = ""
performances_ac = ""
performances_rt = ""
document.box_1 = ""
box_1_mo = ""
box_1_rt = ""
document.box_2 = ""
box_2_mo = ""
box_2_rt = ""
document.box_3 = ""
box_3_mo = ""
box_3_rt = ""
document.box_4 = ""
box_4_mo = ""
box_4_rt = ""
}


// ------------------------------------

function verif()  {
  
if(document.formulaire.message.value == "") {
   alert("Veuillez inscrire votre message, s.v.p.\240\240\240\240\240\240\240");
   document.formulaire.message.focus();
return(false);
}

if(document.formulaire.nom.value == "")  {
   alert("Veuillez entrer votre nom, s.v.p.\240\240\240\240\240\240\240");
   document.formulaire.nom.focus();
return(false);
}

if((document.formulaire.telephone.value == "")&&(document.formulaire.email.value == "")) {
alert("Veuillez entrer un num\351ro de t\351l\351phone \nou une adresse courriel, s.v.p.\240\240\240\240\240\240\240");   
return(false);
}  

return(true);
}

function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){
return (true)
}
alert("L'adresse courriel fournie est invalide!")                
return (false)
}

// ------------------------------------

/*   -------------------------------   */
/* showhide.js - http://www.howtocreate.co.uk/jslibs/  */
/* var myalternative = "LOCATION OF ALTERNATIVE PAGE, JUST IN CASE THEIR BROWSER DOESN'T GET IT RIGHT";  */

window.onerror = null;      //initialise all variables

var olddiv = 0;   //this will become a reference to the object that is being shown or was last shown; in all cases, the object that is shown/hidden will be a <div ..> element

function getRefToDivNest( divID, oDoc ) {
	if( !oDoc ) { oDoc = document; }
	if( document.layers ) {
		if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
			for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
				y = getRefToDivNest(divID,oDoc.layers[x].document); }
			return y; } }
	if( document.getElementById ) { return document.getElementById(divID); }
	if( document.all ) { return document.all[divID]; }
	return document[divID];
}

function showdiv(thisdiv) {
	hidediv(); //this function shows the div; first, hide the last one; convert the name of the div into a reference to it. Basically, get a reference to the object
	olddiv = getRefToDivNest(thisdiv);
	if( !olddiv ) {
		notifyFail();  //Nothing found. This browser is not compliant with any!
		return;
	}
	if( olddiv.style ) {  //Make the object visible		
		olddiv.style.visibility = 'visible';  //DOM compliant
	} else {
		if( olddiv.visibility ) {
			olddiv.visibility = 'show';  //Netscape and old versions of Mozilla compliant
		} else {
			notifyFail();  //Nothing found, no known way of changing the style
			return;
		}
	}
	divshown = 1;
}

function hidediv() {
	if( olddiv ) {
		if( olddiv.style ) {  //DOM compliant
			olddiv.style.visibility = 'hidden';
		} else {  //Netscape and old versions of Mozilla compliant
			olddiv.visibility = 'hide';
		}  
//No need for else notifyFail(); if it was going to fail, it would have failed while it was being shown

	}
	olddiv = false;
}


function notifyFail() {  //oops, I guess nothing works in this browser
	if( window.myalternative ) {
		if( window.confirm( "You are having problems displaying some components of this page.\n"+
			"\nWould you like to try the other page design?" ) ) { location.href = myalternative; }
	} else {
		window.alert( "You are having problems displaying some components of this page.\n\n"+
			"Sorry, but there is not yet an alternative page." );
	}
}
