//Pop Up Functions
var swfId = "mbc_mainSwf";

function getSwf( id ) 
{
  if ( navigator.appName.indexOf( "Microsoft" ) != -1 ) { return window[ id ]; }
  else { return document[ id ]; }
}

function launchPrivacy( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "legal/privacy-policy.html","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "legal/privacy-policy.html" ); }
  else { winNew.focus( ); }
}

function launchTerms( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("legal/terms-conditions.html","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "legal/terms-conditions.html" ); }
  else { winNew.focus( ); }
}

function launchLive( ) 
{
  // removed mLink.action - as it is not currently working
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "http://www.millercoors.com/what-we-believe/true-responsibility.aspx","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "http://www.millercoors.com/what-we-believe/true-responsibility.aspx" ); }
  else { win.focus( ); }
  
}


function launchLive( ) 
{
  // removed mLink.action - as it is not currently working
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "http://www.millercoors.com/what-we-believe/true-responsibility.aspx","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "http://www.millercoors.com/what-we-believe/true-responsibility.aspx" ); }
  else { win.focus( ); }
  
}


function launchRules(sPath) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("rules.html","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "rules.html" ); }
  else { win.focus( ); }
}


function launchPopUp( sURL, sParams )
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( sURL,"PopUp" + name,'"' + sParams + '"' ) ;
  if( !win ) { getSwf( swfId ).openWindowFromSwf( sURL ); }
  else { win.focus( ); }
}
