﻿    var agt=navigator.userAgent.toLowerCase();
    var appVer = navigator.appVersion.toLowerCase();
    var is_major = parseInt(navigator.appVersion);
    
    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    
    function flashFix(o){

     document.write(o)
    }
    
   

function openInviteFriend(ss)
		{

			var height;
    		var width;
			height = 550;
			width = 520;
			PopupScroll("/accro-de-frolic/SendAFriend.aspx?conid="+ss, 'SendAFriend',width,height,'yes','no');			
		}
		
function openCredits()

{
            var height;
			var width;
			height = 340;
			width = 450;					
			PopupScroll("/accro-de-frolic/PasswordRemainder.aspx", 'Credits',width,height,'no','no');	
}		

function openLeagalNotes()
{
      
			 window.open("http://www.mars.com/global/policies/privacy/ld_french.html");
    		
}
function openRules()
 {
//           var height;
//			var width;
//		 height = 0;
//	     width = 0;				
//			PopupScroll("/accro-de-frolic/MailContents/reglement.pdf", 'Rules',width,height,'no','no');	
        window.open("/accro-de-frolic/MailContents/reglement.pdf");
}
function openForgotPassword()
{
            var height;
			var width;
			height = 340;
			width = 450;
			PopupScroll("/accro-de-frolic/PasswordRemainder.aspx", 'PasswordRemainder',width,height,'no','no');	
}

function openRegisteration()
{
            var height;
			var width;
		 height = 750;
			width = 525;
	PopupScroll("/accro-de-frolic/inscription.aspx", 'Registration',width,height,'yes','no');	
}


function PopupScroll(mypage, myname, w, h, scroll, toolbar) {
 	//scroll = 'yes';
	if (toolbar == 'no')
		{	toolbar = 'no';	}
	else
		{	toolbar = 'yes'; 	}
	
	if (scroll == 'no')
		{	scroll = 'no';		}
	else
		{	scroll = 'yes';		}
		
    if (navigator.appVersion.indexOf("AOL") != -1)
    {
      newHeight = h + 25;
      newWidth = w + 25;
      winprops = 'height=' + newHeight + ',width=' + newWidth+',scrollbars='+scroll+',toolbar='+toolbar
      win = window.open(mypage, myname, winprops);
    }
    else if (appVer.indexOf("mac") != -1 && is_ie5up )
    {
      newHeight = h;
      newWidth = w - 16;
      winprops = 'height=' + newHeight + ',width=' + newWidth+',scrollbars='+scroll+',toolbar='+toolbar
      win = window.open(mypage, myname, winprops);
    }
    else
    {
     if (parseInt(navigator.appVersion) >= 4)
     {
      var offsetW = (screen.width - w) / 2;
      var offsetH = (screen.height - h) / 2;
      winprops = 'height='+ h +',width='+ w +',top='+ offsetH +',left='+ offsetW+',scrollbars='+scroll+',toolbar='+toolbar
      win = window.open(mypage, myname, winprops)
      win.window.focus();
     }
     else
     {
      newHeight = h + 25;
      newWidth = w + 25;
      winprops = 'height=' + newHeight + ',width=' + newWidth+',scrollbars='+scroll+',toolbar='+toolbar
      win = window.open(mypage, myname, winprops);
     } 
    }
   }
    // Hover Over style
   
   function MouseOver(DivID)
{

   document.getElementById(DivID).className="btnhover";
   
}
function MouseOut(DivID)
{
   document.getElementById(DivID).className="btnnormal";
}  
