<!-- Begin
function get_random() {
    var ranNum= Math.floor(Math.random()*5) * Math.floor(Math.random()*5);
    return ranNum;
}

function popUp(url) {
	window.open(url, "WELCOME", "scrollbars=1,resizable=1,width=400,height=500")
}

function customPopUp(url, settings) {
	window.open(url, "", settings)
}

function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}

function mOver(tdId){
	var tdId2 = tdId + "a";
	var tdcol = "#eeeeee";
	if(document.getElementById){
  		//document.getElementById(tdId2).style.backgroundColor = tdcol;
  		document.getElementById(tdId).style.backgroundColor = tdcol;
	}else if(document.all){ 
		//document.all.item(tdId2).style.backgroundColor = tdcol;
		document.all.item(tdId).style.backgroundColor = tdcol;
	}
}

function mOut(tdId){
	var tdId2 = tdId + "a";
	var tdcol = "#ffffff";
	if(document.getElementById){
		//document.getElementById(tdId2).style.backgroundColor = tdcol;
		document.getElementById(tdId).style.backgroundColor = tdcol;
	}else if(document.all){ 
		//document.all.item(tdId2).style.backgroundColor = tdcol;
		document.all.item(tdId).style.backgroundColor = tdcol;
	}
}

function chkNFSignup() {
	var form = document.forms.genForm;
	var err_msg = "Veuillez corriger les champs suivants\n";
	var submit_ok = 1;
	
	if (form.name.value == "") {
		submit_ok = 0;
		err_msg = err_msg + "\n- Nom de compagnie absent";
	}
	if (form.email.value == "") {
		submit_ok = 0;
		err_msg = err_msg + "\n- Nom de la personne ressource absent";
	}
	if ((form.email.value == "") 
		|| (form.email.value.indexOf("@") == -1) 
		|| (form.email.value.indexOf(".") == -1) ){
		
		submit_ok = 0;
		//err_msg = err_msg + "\n- Addresse de courriel valide absente";
		err_msg = err_msg + "\n- Addresse courriel valide absente";
	}
	if ((form.url.value == "") || (form.url.value == "yourwebsite.com")) {
		submit_ok = 0;
		err_msg = err_msg + "\n-  URL de la compagnie absent";
	}
	if (!form.agree_to_terms.checked) {
		submit_ok = 0;
		err_msg = err_msg + "\n- Vous devez accepter les conditions d'utilisation";
	}
	
	//form.np_name.value = form.np_url[form.np_url.selectedIndex].text;
	
	if (submit_ok == 1) {
		return true;
	} else {
		alert(err_msg);
		return false;
	}
}

function breakout_of_frame()
{ 
  var loc = top.location;
  
  if(loc.indexOf('canoe.ca') >= 0 )
  {
    //do nothing
  }
  else if (loc != location) {
    top.location.href = document.location.href ;
  }
}

function redirect( e, url, status )
{
    if (!e) var e = window.event;
    e.cancelBubble = true;
    if (e.stopPropagation) e.stopPropagation();
    var win;
       
    if (status == 'pop')
    {
        win = window.open(url,status);
        win.focus();
        //win = window.open( url, "win" );
    }
    else if( status == 'pvpop')
    {
        win = window.open(url,status,'width='+screen.width+',height='+screen.height+',top='+0+',left='+0+','+'scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=yes,dependent=no');
        win.focus();
    }
    else
    {
        window.location.href=url;
    }
}

function WriteDate() {
    var today = new Date();
    var months = new Array("janvier", "février", "mars", "avril",
                            "mai", "juin", "juillet", "août", "septembre",
                            "octobre", "novembre", "décembre");
    var days = new Array("dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi");
    
    var m = today.getMonth();
    var d = today.getDate();
    var y = today.getFullYear();
    var day = today.getDay();
    document.write(days[day] + " " + d + " " + months[m] + " " + y);
}
// End -->

