
   function down(brand)
{
      var brandName = "littlewoods" + brand + "g2";
      OpenAndDownload('1882', brandName);
}

function open_casino()
{
      OpenDownCasino('2323');
}

function OpenDownCasino(location)
{ 
        OpenAndDownload(location,'littlewoodscasinog2');
}

function OpenDownPoker(location)
{ 
        OpenAndDownload(location,'littlewoodspokerg2');
}

function OpenAndDownload(location,brand)
{
    try {
        ntptAddPair("dl",location);
        ntptEventTag("ev=download_" + brand);
     }catch(err){}
    //this to avoid javascript errors in SWOT pages
     try {
     setDownloadStatus();
    }catch(err){} 
    var sURLreg = "/downloadclient.htm?"+ "&dl=" + location + "&DownloadBrand=" + brand;
    window.open(sURLreg,"popDown","width=1,height=1,top=0,left=0");
    document.location.href="/download.htm";
}

function setDownloadStatus()
{
    setCookie("downloaded","1","/");
}



function setCookie(name,value)
{
    var argv = setCookie.arguments;
    var argc = setCookie.arguments.length;
    var path = (argc > 2) ? argv[2] : null;
    var expires = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;

    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain))
}

function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) 
			return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
    
}

 function ShowPdfReport(Val,imgPath)
{
    if(Val != "0")
    {
        var tmpObj= document.getElementById("ReportImg");
        tmpObj.src= imgPath + "/pwc/pwc_" + Val + ".gif";
        tmpObj.height=800;
        tmpObj.width=580;   
    }
}

function openItechReport(Val)
{
   if (Val == 'Jun07' || Val == 'May07' || Val == 'Apr07' || Val == '043007' || Val == '033007' || Val == '023007')
        {
            var url="http://www.itechlabs.com.au/certificates/Cassava/CON_audit_report_" + Val + ".pdf";
            window.open(url,"itech","resizable=yes,status=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes");

            var tmpObj= document.getElementById("textLink");
            tmpObj.href="http://www.itechlabs.com.au/certificates/Cassava/CON_audit_report_" + Val + ".pdf";
        }
        else
        {
            var url="http://www.itechlabs.com.au/certificates/Cassava/Cassava_RTP_audit_report_" + Val + ".pdf";
            window.open(url,"itech","resizable=yes,status=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes");

            var tmpObj= document.getElementById("textLink");
            tmpObj.href="http://www.itechlabs.com.au/certificates/Cassava/Cassava_RTP_audit_report_" + Val + ".pdf";     
        }
}


function openItechQReport(Val)
{
    if(Val != "0") {

    var url="http://www.itechlabs.com.au/certificates/Cassava/RNG_report_" + Val + ".pdf";
    window.open(url,"itech","resizable=yes,status=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes");

    var tmpObj= document.getElementById("textLink");
    tmpObj.href="http://www.itechlabs.com.au/certificates/Cassava/RNG_report_" + Val + ".pdf";    
    }
}



       function openLangs() {
         if(document.getElementById){
          var el = document.getElementById('langs');
          if(el.style.display != "block"){    
             el.style.display = "block";
             el.style.top = "23px";
             el.style.left = "138px";
          }else{
             el.style.display = "none";
           }
        }
    }
    
    function changeColor(obj,status) {
        if (status=="on") {
            obj.style.background = '#333333';
            obj.style.color = '#ffffff';
        } else {
             obj.style.background = '#444444';
            obj.style.color = '#989898';
         }
     }    
     
                       
     function closeList() {
        var langs = document.getElementById('langs');
        langs.style.display = "none";
      }



   function open_flash(filename) 
{   
    var w = 800;
    var h = 590;
    var l = (window.screen.width-w)/2;
    var t = (window.screen.height-h)/2; 
    window.open(filename,"flash","height=" + h + ",width=" + w + ",status=no,toolbar=no,menubar=no,location=no,resize=no,left="+l+",top="+t);
}


   /* Nav Menu Script for IE browsers */
sfHover = function TopNavMenuPatch (){	
	var sfEls = document.getElementById("siteNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


   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 showFlash(flashPath,imgPath,imgHref ,imgWidth, imgHeight)
{
    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="' + imgWidth + '" height="' + imgHeight + '" id="main_lw" 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="wmode" VALUE="transparent" />');
        document.write('<param name="allowScriptAccess" value="always" />');
       
        document.write('<embed src="'+ flashPath + '"  wmode="transparent" quality="high" bgcolor="#000000" width="' + imgWidth + '" height="' + imgHeight + '" name="main_lw" allowScriptAccess="always" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
        document.write('<a  href="' + imgHref + '"><img alt="Littlewoods Casino" width="' + imgWidth + '" height="' + imgHeight + '" border="0" src="' + imgPath + '"></a>');
    }
}


function showOnlyFlash(flashPath,flashWidth, flashHeight)
{
    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="flashWidth" height="flashHeight" hspace="30" id="main_lw" align="middle" VIEWASTEXT>');
        document.write('<param name="movie" value="' + flashPath + '" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="allowScriptAccess" value="always" />');
       
        document.write('<embed src="'+ flashPath + '" width="flashWidth" height="flashHeight" hspace="30" quality="high" name="main_lw" allowScriptAccess="always" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
}

