<!--
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->

function position_layer(){
if(document.body.clientWidth > 760)
{
	layerpos=566+((document.body.clientWidth - 760)/2);
}

else{
	layerpos=566;
}
Layer1.style.left=layerpos;
}

function change_language(arg){
window.location.href='?language_choice='+arg;
}

function goto_program(arg){
window.location.href='../other/top_programs.php?category_id='+arg;
}


function how_much()
{

	var nb_part 	= parseInt(Form1.participants.value);
	var price = 20;
	
	if (nb_part >= 1 && nb_part < 50)
	{
		price = 20;
	}
	else if (nb_part >= 100)
	{
		price = 10;
	}
	else
	{
		price = 15;
	}



if (nb_part > 0)

	{

	pot_profit   	= eval("nb_part*100");
	
	

	free_cards   	= eval("nb_part/10");

	var free_cards  = parseInt(free_cards);

	free_amount  	= eval("free_cards*100");

	var free_amount	= parseInt(free_amount);



	total_profit 	= eval("pot_profit+free_amount");

	payment      	= eval("price*nb_part");

	grand_total	= eval("total_profit-payment");

	Form1.raise.value = pot_profit;
	
	Form1.profit.value = grand_total;

	}

else

	{

	window.alert('You must enter a valid value');

	} 
}
// -->

function image(){
	if (this.coupon.value == "usa"){
		MM_swapImage('coupon_image','','../../../images/efundraising/en/txt/scratchcard/coupons/usa_coupon.gif',1);
	} else if (this.coupon.value == "canada"){
		MM_swapImage('coupon_image','','../../../images/efundraising/en/txt/scratchcard/coupons/can_coupon.gif',1);
	} else if (this.coupon.value == "quebec"){
		MM_swapImage('coupon_image','','../../../images/efundraising/en/txt/scratchcard/coupons/quebec_coupon.gif',1);
	} else if (this.coupon.value == "world"){
		MM_swapImage('coupon_image','','../../../images/efundraising/en/txt/scratchcard/howworks_page/free_infokit.gif',1);
	}
}

function image_popup() {
	if (this.coupon.value == "usa"){
		window.open('../../../templates/efundraising/en/scratchcard/bcoupons/show_big_img_usa.html','','height=600,width=400',true);
	} else if(this.coupon.value == "canada"){
		window.open('../../../templates/efundraising/en/scratchcard/bcoupons/show_big_img_can.html','','height=490,width=325',true);
	} else if(this.coupon.value == "quebec"){
		window.open('../../../templates/efundraising/en/scratchcard/bcoupons/show_big_img_qc.html','','height=500,width=300',true);
	} else if(this.coupon.value == "world"){
		//
	}
}

function image_popup_usa_hockey() {
	// Should be the same as image_popup() ** still there to avoid errors **
	image_popup();

	/*  
	if (this.coupon.value == "usa"){
		window.open('../../../templates/en_usa_hockey/en/scratchcard/bcoupons/show_big_img_usa.html','','height=543,width=360',true);
	} else if(this.coupon.value == "canada"){
		window.open('../../../templates/en_usa_hockey/en/scratchcard/bcoupons/show_big_img_can.html','','height=446,width=293',true);
	} else if(this.coupon.value == "quebec"){
		window.open('../../../templates/en_usa_hockey/en/scratchcard/bcoupons/show_big_img_qc.html','','height=423,width=291',true);
	} else if(this.coupon.value == "world"){
		//
	} */
}

function open_card_efund(card,w,h) {
	window.open('../../../images/efundraising/en/notxt/scratchcard/card_page/big2side/'+card+'.jpg','','height='+h+',width='+w+'',true);
}

function open_card_usa_hockey(card,w,h) {
	window.open('../../../images/usa_hockey/en/notxt/scratchcard/card_page/big2side/'+card+'.jpg','','height='+h+',width='+w+'',true);
}

function getArgs() {
	var args = new Object();
	var query = location.search.substring(1);
	var pairs = query.split(",");
	for(var i=0;i<pairs.length;i++) {
		var pos = pairs[o].indexOf('=');
		if(pos == -1)
			continue;
		var argname = pairs[i].substring(pos+1);
		var value = pairs[i].substring(pos+1);
		args[argname] = unescape(value);
	}
	return args;
}

function image_usa_hockey(){
	if (this.coupon.value == "usa"){
		MM_swapImage('coupon_image','','../../../images/en_usa_hockey/en/txt/scratchcard/coupons/usa_coupon.gif',1);
	}
	else if (this.coupon.value == "canada"){
		MM_swapImage('coupon_image','','../../../images/en_usa_hockey/en/txt/scratchcard/coupons/can_coupon.gif',1);
	}
	else if (this.coupon.value == "quebec"){
		MM_swapImage('coupon_image','','../../../images/en_usa_hockey/en/txt/scratchcard/coupons/quebec_coupon.jpg',1);
	}
	else if (this.coupon.value == "world"){
		MM_swapImage('coupon_image','','../../../images/en_usa_hockey/en/txt/scratchcard/howworks_page/free_infokit.gif',1);
	}
}

<!--
function popUp(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function close_popup(){
	window.close();
}

function envoi(URL){
	opener.location.href=URL;
	self.close();
}

function NewWindow(mypage, h, w, myname){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+', scrollbars=no'
	win = window.open(mypage,myname,settings)
	
}

function open_card(card,w,h) {
	// window.open('../../../images/efundraising/en/notxt/scratchcard/card_page/big2side/'+card+'.jpg','','height='+h+',width='+w+'',true);
	NewWindow('resources/images/_efund_/_classic_/en-us/scratchcards/cards/big2side/'+card+'.jpg',h,w,'');
}

function bigImage(image,title,wid,hgt){
sw=(screen.width-wid)/2;
sh=(screen.height-hgt)/2;
newwin=window.open('','newwin','width='+wid+',height='+hgt+',scrollbars=0,menubars=0,toolbars=0,loca tion=0,directories=0,status=0,top='+sh+',left='+sw+'');
newwin.document.open();
newwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n');
newwin.document.write('"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
newwin.document.write('\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n');
newwin.document.write('<meta http-equiv="Imagetoolbar" content="no" />\n');
newwin.document.write('<title>'+title+'</title>\n');
newwin.document.write('</head>');
newwin.document.write('<body style="margin:0;padding:0">\n<img src="'+image+'" width="'+wid+'" height="'+hgt+'" />');
newwin.document.write('\n</body></html>');
newwin.document.close();
newwin.focus();
}