
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}

function centerPopup (div_name,html)
{
	var tmp ='<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%"><tr><td align="center">'+html+'</td></tr></table>';

	var scrollPos = f_scrollTop();
	if (scrollPos)
		document.getElementById(div_name).style.top = (scrollPos)+'px';
	else
		document.getElementById(div_name).style.top = '0px';
	
	document.getElementById(div_name).innerHTML = tmp;

	showDiv(div_name)		

}

function showDiv (div_name)
{
	if (document.getElementById(div_name))
	{
		if (document.getElementById(div_name).tagName == 'SPAN')
			document.getElementById(div_name).style.display  = "";	
		else
			document.getElementById(div_name).style.display  = "block";		
	}
}

function hideDiv (div_name)
{
	if (document.getElementById(div_name))
	{
		document.getElementById(div_name).style.display  = "none";		
	}
}


function displayHowToEnter (language)
{
	var html		= '';
	html			+= '<table border=0 cellpadding=0 cellspacing=0 width=500 height=500>';
	html			+= '<tr>';
	html			+= 		'<td valign=top style="border:1px solid black;background-color:#f9f8f8">';
	if (language == 'fr')
	{
		html		+=		'<div style="float:left"><strong>Comment participer</strong></div>';		
	}
	else
	{
		html		+=		'<div style="float:left"><strong>How To Enter</strong></div>';
	}
	html			+=		'<div style="float:right">[<a href="javascript:void(null)" onclick="hideDiv (\'overlay_holder\')">close</a>]</div>';
	html			+= 		'</td>';
	html			+= '</tr>';
	html			+= '</table>';
	centerPopup ('overlay_holder',html);	
}


function displayRules (language)
{
	var html		= '';
	html			+= '<table border=0 cellpadding=0 cellspacing=0 width=500 height=500>';
	html			+= '<tr>';
	html			+= 		'<td valign=top style="border:1px solid black;background-color:#f9f8f8">';
	if (language == 'fr')
	{
		html		+=		'<div style="float:left;color:#707070;font-size:11px;"><strong>R&egrave;gles et r&egrave;glements</strong></div>';		
		html		+=		'<div style="float:right"><a href="javascript:void(null)" onclick="hideDiv (\'overlay_holder\')" style="color:#707070;text-decoration:none"><strong>fermer X</strong></a></div>';		

		html		+=		'<div style="clear:both;padding-top:35px;padding-left:41px;text-align:left;padding-right:41px;padding-bottom:35px;color:#000000;font-size:12px;">';
		html		+=		'<strong style="color:#e5372f">R&egrave;glement officiel du concours du design du masque</strong><br><br>';

		html		+=		'Le dessin peut &ecirc;tre fait &agrave; la main ou par ordinateur et doit &ecirc;tre en couleur.<br><br>';

		html		+=		'Le design doit &ecirc;tre le travail d\'origine de l\'artiste.<br><br>';

		html		+=		'Le contenu du dessin ne doit pas &ecirc;tre particulier &agrave; une marque de commerce.<br><br>';

		html		+=		'Le contenu du dessin ne doit pas &ecirc;tre particulier au Canada, p. ex. au drapeau canadien, etc.<br><br>';

		html		+=		'Le dessin ne doit pas contenir de connotation pornographique ou de nudit&eacute; class&eacute;e X, de langage explicite ou de violence excessive.<br><br>';

		html		+=		'Le dessin n\'a pas besoin d\'&ecirc;tre associ&eacute; au soudage.<br><br>';

		html		+=		'Le dessin doit &ecirc;tre celui d\'un masque de soudage complet qui doit comprendre les parties gauche, droite, sup&eacute;rieure et inf&eacute;rieure et comprendre une couleur de fond pour le masque.<br><br>';

		html		+=		'Le design du masque doit porter les couleurs primaires de Lincoln Electric, soit le rouge, le noir et le gris. <br><br>';

		html		+=		'Le dessin doit &ecirc;tre not&eacute; sur une &eacute;chelle de 1 &agrave; 10 pour les caract&eacute;ristiques<br>suivantes :<br>';

		html		+=		'<ul><li>Originalit&eacute;</li>';
		html		+=		'<li>Utilisation des couleurs de Lincoln Electric</li>';
		html		+=		'<li>Attrait g&eacute;n&eacute;ral</li></ul>';

		html		+=		'Un nom doit &ecirc;tre donn&eacute; au masque de soudage.<br><br>';

		html		+=		'Concours ouvert &agrave; tous les groupes d\'&acirc;ge.<br><br>';

		html		+=		'Le concours d&eacute;bute le 15 Février 2010.<br><br>';

		html		+=		'La date limite des inscriptions est le 15 Marche 2010 &agrave; 17 h HNE.<br><br>';

		html		+=		'Les laur&eacute;ats seront affich&eacute;s sur le site web le 31 Marche 2010.<br><br>';

		html		+=		'Les laur&eacute;ats seront avertis par t&eacute;l&eacute;phone ou par courriel.<br><br>';

		html		+=		'Il est n&eacute;cessaire que tous les participants soient engag&eacute;s en tant qu\'&eacute;tudiant au moment de l\'inscription et ils devront pr&eacute;senter un num&eacute;ro d\'&eacute;tudiant valide &agrave; l\'inscription.';


		html		+=		'</div>';		
	}
	else
	{
		html		+=		'<div style="float:left;color:#707070;font-size:11px;"><strong>Rules and Regulations</strong></div>';
		html		+=		'<div style="float:right"><a href="javascript:void(null)" onclick="hideDiv (\'overlay_holder\')" style="color:#707070;text-decoration:none"><strong>close X</strong></a></div>';		

		html		+=		'<div style="clear:both;padding-top:35px;padding-left:41px;text-align:left;padding-right:41px;padding-bottom:35px;color:#000000;font-size:12px">';
		html		+=		'<strong style="color:#e5372f">Official Helmet Design Contest Rules</strong><br><br>';
		html		+=		'Artwork may be hand drawn or digital, and must be in colour.<br><br>';
		html		+=		'Design submissions must be the artist\'s original work.<br><br>';
		html		+=		'Content of the artwork should not be specific to anything that is trademarked.<br><br>';
		html		+=		'Content of the artwork should not be specific to Canada, the Canadian flag etc.<br><br>';
		html		+=		'Content shall not contain any pornographic or X-rated nudity, explicit language, or excessive violence.<br><br>';
		html		+=		'Content of artwork does not have to be welding related.<br><br>';
		html		+=		'The artwork should be the design for a full welding helmet, which should include artwork for the left, right, top and bottom and include a background colour for the helmet.<br><br>';
		html		+=		'The helmet design should incorporate Lincoln Electric primary colours that are red, black and grey.<br><br>';
		html		+=		'The artwork will be judged on a 10 point scale for the following:<br>';

		html		+=		'<ul><li>Originality</li>';
		html		+=		'<li>Use of Lincoln Electric colours</li>';
		html		+=		'<li>Overall appeal</li></ul>';

		html		+=		'A name must be included for the welding helmet.<br><br>';

		html		+=		'Contest open to all age groups.<br><br>';

		html		+=		'Contest starts November 15, 2010.<br><br>';

		html		+=		'Deadline for final entries is 5:00 PM EST on March 15, 2010.<br><br>';

		html		+=		'Winners will be posted to the website on March 31, 2010.<br><br>';

		html		+=		'Winners will be notified via phone or email.<br><br>';

		html		+=		'It is required that all entrants must be enrolled as a student at the time of entry, and will be asked to provide a valid student number upon entry.';

		html		+=		'</div>';
	}	

	html			+= 		'</td>';
	html			+= '</tr>';
	html			+= '</table>';
	centerPopup ('overlay_holder',html);	
}

function doRating (div_name,value)
{
	document.getElementById(div_name).className = 'star'+value;	
}