/* Fonctions de menus */

menu_status = new Array();

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}



function switchLanguagePage(){

	var url = window.location.href;
	// split the url into an array
	arrayOfurl = url.split("/");

	// last element is the page name (array length minus one)
	var curPage = arrayOfurl[arrayOfurl.length - 1];
	var folderCount = arrayOfurl.length;
	//alert(folderCount);
	//alert(curPage);

    if  (url.indexOf('eng')> 0)  
    {
		if (folderCount > 6)
		{
			document.write('<a class="menu-video" href="../index.htm">Français</a>');
		}
		else
		{
			document.write('<a class="menu-video" href="../'+curPage+'">Français</a>');		
		}
	}
	else
	{
        if (folderCount > 5) 
        {
           document.write('<a class="menu-video" href="eng/index.htm">English</a>');
        }
        else
        {
           document.write('<a class="menu-video" href="eng/'+curPage+'">English</a>');
        }
    }
}



/* Fonctions de menus */

function openvideo(url)
{
window.open(url,'wclose',
'width=360,height=340,toolbar=no,status=no,left=20,top=30,resizable=yes');
}
function openengvideo(url)
{
window.open(url,'wclose',
'width=380,height=450,toolbar=no,status=no,left=20,top=30,resizable=yes');
}
function openpage(url)
{
window.open(url,'wclose',
'width=500,height=600,toolbar=no,status=no,scrollbars=yes,left=20,top=30,resizable=yes');
}
function trainingEmail() {
// protected email script by Joe Maller
// JavaScripts available at http://www.joemaller.com
// this script is free to use and distribute
// but please credit me and/or link to my site

emailE=('formation@' + 'guyvoyer.com');
	mail_str = "?subject= Tailor-made Training Request" ;
	mail_str += "&body=Please provide the following information :%0A%0A- desired program (please give a detailed description) :%0A- number of seminars (1 to 6 per year) : %0A" ;
	mail_str += "- duration of each seminar (2 to 5 days) : %0A- number of students (no limit, but costs may vary) :%0A" ;
	mail_str += "- proposed training location  :%0A- available teaching material (overhead projector, black board, white board, powerpoint, etc.) :%0A";
	mail_str += "- desired period (approximate dates of the beginning and the end of the training) : %0A";
	mail_str += "- attendees prerequisites : %0A- proposed training cost for students (no limit - the cost has no effect on teachers retribution) :%0A- teachers lodging :";

document.write('<a class="red" href="mailto:' + emailE +  mail_str + '">' + 'Click here to request a tailor-made training</a>');

}

function formationEmail() {

emailE=('formation@' + 'guyvoyer.com');
	mail_str = "?subject= Demande de formation sur mesure" ;
	mail_str += "&body=SVP Pr&eacute;ciser%0A%0A- le programme souhait&eacute; (le plus d&eacute;taill&eacute; possible) :%0A- le nombre de s&eacute;minaires (de 1 &agrave; 6 par an) : %0A" ;
	mail_str += "- la dur&eacute;e de chaque s&eacute;minaire (de 2 &agrave; 5 jours) : %0A- le nombre d'&eacute;tudiants (sans aucune limite, mais le co&ucirc;t en d&eacute;pendra) :%0A" ;
	mail_str += "- le lieu du cours et le mat&eacute;riel p&eacute;dagogique propos&eacute; (r&eacute;tro projecteur, tableau noir ou blanc, power point, etc.) :%0A";
	mail_str += "- la p&eacute;riode souhait&eacute;e (date approximative du d&eacute;but et de la fin de la formation) : %0A";
	mail_str += "- les pr&eacute;requis du public : %0A- le co&ucirc;t propos&eacute; aux &eacute;tudiants (sans limite car cela n'influence pas les r&eacute;tributions du ou des intervenants) :%0A- le lieu d'h&eacute;bergement de l'enseignant :";

document.write('<a class="red" href="mailto:' + emailE +  mail_str + '">' + 'Cliquer ici pour<br>faire une demande de<br>formation sur mesure</a>');
}