var MM_contentVersion = 6;
var MM_FlashCanPlay;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
function OpenLink()
{
	window.open("http://promo.888.com/888day_winner/it");
}
function showFlash(flashPath,altImgPath)
{
     if (MM_FlashCanPlay)
    {             
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="614" height="175" id="780x141_flash_spa_main888" align="middle" VIEWASTEXT>');
        document.write('<param name="movie" value="' + flashPath + '" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#000000" />');
        document.write('<param name="allowScriptAccess" value="always" />');        
        document.write('<param name="wmode" VALUE="transparent" />');
        document.write('<PARAM NAME="FlashVars" Value="clickTag=javascript:OpenDownCasino(\'1275\');" />');

        document.write('<embed src="'+ flashPath + '" FlashVars="clickTag=javascript:OpenDownCasino(\'1275\');"  wmode="transparent" quality="high" allowScriptAccess="always" bgcolor="#000000" width="614" height="175" name="780x141_flash_spa_main888" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
     document.write(' <a href="javascript:OpenDownCasino(\'1275\');" name="rotate" id=""><img id="" src="' + altImgPath + '" border=0/>');    
  
    }
}

function flashCasino()
{
     OpenDownCasino('1275');
}


function activateFlash() {
    window.open("http://it.888.com/holidays_"+brand+"/it/?"+sCut);
}

function opensoperhero()
{
    try{
           ntptEventTag("ev=dl_888hp_main_image_IT");
         }
     catch(err){}
    OpenDownCasino('1275');
}

function showXmassFlash(flashPath,altImgPath)
{
     if (0)//(MM_FlashCanPlay)
    {
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="614" height="173" id="blond_legend" align="middle" VIEWASTEXT>');
        document.write('<param name="movie" value="' + flashPath +'" />');
        document.write('<param name="wmode" value="transparent" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#ffffff" />');
        document.write('<embed src="' + flashPath +'" wmode="transparent" FlashVars="clickTag="javascript:activateFlash();" quality="high" bgcolor="#ffffff" width="614" height="173" name="mov_slide" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
        document.write(' <a href="javascript:activateFlash();"><img src="' + altImgPath + '" border=0/></a>       ');        
    }
}
function open888dayPoker()
{
    try{
                  ntptEventTag("888_tabPoker_EN");
         }
     catch(err){}
     window.open("https://emails.888.com/888day/poker/it/?" + sCut);
}

function open888dayCasino()
{
    try{
                  ntptEventTag("888_tabCasino_EN");
         }
     catch(err){}
     window.open("https://emails.888.com/888day/casino/it/?" + sCut);
}

function open888dayHomePage()
{
    try{
                  ntptEventTag("888_main_image_EN ");
         }
     catch(err){}
     window.open("http://promo.888.com/888day/it/?"+sCut);
}

function open_xmass()
{
    try{
      ntptEventTag("ev=promo_xmass_888_IT");
     }
     catch(err){}
     window.open("http://promo.888.com/santacruise/it/?"+sCut );
}

