//Pop Up Functions
var swfId = "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 launchLatino( ) 
{

mcf.mcAVBypass('http://www.millerlitelatino.com/index.html','blank');
//  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
//  var win = window.open("http://www.millercoors.com/terms-conditions.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/terms-conditions.aspx" ); }
//  else { winNew.focus( ); }
}

function launchTalk( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("https://www.millertalk.com/TalkToUs/default.aspx","FooterLinks" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "https://www.millertalk.com/TalkToUs/default.aspx" ); }
  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 { winNew.focus( ); }
  
}

function launchPeelRules( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("peel.html","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "peel.html" ); }
  else { winNew.focus( ); }
}


function launchPeelRules1( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("peel_minnesota.html","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "peel_minnesota.html" ); }
  else { winNew.focus( ); }
}

function launchPeelRules2( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("peel_greenbay.html","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "peel_greenbay.html" ); }
  else { winNew.focus( ); }
}

function grandSlamRelease( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("content/grandslam_release.html","grandSlamRelease" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "content/grandslam_release.html" ); }
  else { winNew.focus( ); }
}

function launchPackersPromo( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("content/grandslam_terms.html","grandSlamTerms" + name,"toolbar=0,menubar=0,width=800,height=600,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "packers.html" ); }
  else { winNew.focus( ); }
}


function launchBearsPromo( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("content/grandslam_terms.html","grandSlamTerms" + name,"toolbar=0,menubar=0,width=800,height=600,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "bears.html" ); }
  else { winNew.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 { winNew.focus( ); }
}

function launchGrabBOSWidget( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("widgets/bestofsummer/launchpad/bosWidget.html","BestOfSummer" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "widgets/bestofsummer/launchpad/bosWidget.html" ); }
  else { win.focus( ); }
}

function launchGrabCountWidget( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("widgets/countdown/launchpad/countdownWidget.html","Countdown" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "widgets/countdown/launchpad/countdownWidget.html" ); }
  else { win.focus( ); }
}

function launchGrabCapShotWidget( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("widgets/capshot/launchpad/capShotWidget.html","CapShot" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "widgets/capshot/launchpad/capShotWidget.html" ); }
  else { win.focus( ); }
}

function launchGrabPubDartsWidget( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("widgets/pubdarts/launchpad/pudDartsWidget.html","PubDarts" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "widgets/pubdarts/launchpad/pudDartsWidget.html" ); }
  else { win.focus( ); }
}

function launchConnectionsWidget( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("widgets/connections/launchpad/connectionsWidget.html","Connections" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "widgets/connections/launchpad/connectionsWidget.html" ); }
  else { win.focus( ); }
}

function launchSummerSoundsWidget( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("widgets/summersounds/launchpad/summerSoundsWidget.html","Connections" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "widgets/summersounds/launchpad/summerSoundsWidget.html" ); }
  else { win.focus( ); }
}

function launchBearsRules( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("bears_rules.html","bears_rules" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "bears_rules.html" ); }
  else { win.focus( ); }
}

function launchPackersRules( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("packers_rules.html","packers_rules" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "packers_rules.html" ); }
  else { win.focus( ); }
}

function launchPackers( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("/mLink.action?targetURL=http://www.millerlite.com/packers.html","packers" + name,"toolbar=0,menubar=0,width=800,height=625,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "/mLink.action?targetURL=http://www.millerlite.com/packers.html" ); }
  else { win.focus( ); }
}

function launchBears( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("/mLink.action?targetURL=http://www.millerlite.com/bears.html","bears" + name,"toolbar=0,menubar=0,width=800,height=625,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "/mLink.action?targetURL=http://www.millerlite.com/bears.html" ); }
  else { win.focus( ); }
}

function launchRulesHoliday( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("content/rules_holiday.html","FooterLinks" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "content/rules_holiday.html" ); }
  else { winNew.focus( ); }
}

function launchTermsHolidayCA( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("content/terms_holiday_ca.html","terms_holiday" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "content/terms_holiday_ca.html" ); }
  else { winNew.focus( ); }
}

function launchPhoto( ) 
{
	self.location.href = "holiday_photo.html";
}

function launchPopupPhoto( $url ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( $url ,"holidayPhoto" + name,"toolbar=0,menubar=0,width=1024,height=768,status=0,resizable=1,scrollbars=1" );
    if( !win ) { getSwf(swfId).openWindowFromSwf( $url ); }
}

function launchOnPremiseRules( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "/hoops/rules_on_premise.html","ruleson" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "/hoops/rules_on_premise.html" ); }
  else { winNew.focus( ); }
}

function launchOffPremiseRules( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "/hoops/rules_off_premise.html","rulesoff" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "/hoops/rules_off_premise.html" ); }
  else { winNew.focus( ); }
}

function launchCollectRules( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "/hoops/rules_collect_and_win.html","rulescollect" + name,"toolbar=0,menubar=0,width=640,height=500,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "/hoops/rules_collect_and_win.html" ); }
  else { winNew.focus( ); }
}

function launchAMOEForm( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "http://hoops.millerlite.com/ml-forms/amoe_form.html","amoe" + name,"toolbar=0,menubar=0,width=800,height=800,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "http://hoops.millerlite.com/ml-forms/amoe_form.html" ); }
  else { winNew.focus( ); }
}

function launchFulfillmentForm( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "http://hoops.millerlite.com/ml-forms/fulfillment_form.html","fulfill" + name,"toolbar=0,menubar=0,width=800,height=800,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "http://hoops.millerlite.com/ml-forms/fulfillment_form.html" ); }
  else { winNew.focus( ); }
}

// http://www.textrules.com/MLHoopsUTC/
function launchTextAMOE( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "/hoops/text_amoe.html","textAMOE" + name,"toolbar=0,menubar=0,width=800,height=600,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "/hoops/text_amoe.html" ); }
  else { winNew.focus( ); }
}

// http://www.textrules.com/MLHoops/
function launchScratchAMOE( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open( "/hoops/scratch_amoe.html","scratchAMOE" + name,"toolbar=0,menubar=0,width=800,height=600,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf( swfId ).openWindowFromSwf( "/hoops/scratch_amoe.html" ); }
  else { winNew.focus( ); }
}

function launchBrewersRules( ) 
{
  var name = Math.round( 9999*Math.random( ) ) + new Date( ).getTime( );
  var win = window.open("vikings-rules.html","vikings_rules" + name,"toolbar=0,menubar=0,width=420,height=400,status=0,resizable=1,scrollbars=1" );
  if( !win ) { getSwf(swfId).openWindowFromSwf( "vikings-rules.html" ); }
  else { win.focus( ); }
}

