<!--
	function OpenLaunchWindow(){
		var url = "https://www.virgingames.com/casino/frames/GameLaunch.aspx?";
		
		if (arguments.length > 0) {
			//arguments are key/value pairs, to be converted into representing querystring key/value pairs
			for (var i=0; i < arguments.length; i=i+2){
				url += arguments[i] + "=" + arguments[i+1] + "&";	
			}
			
			//remove trailing &
			url = url.substring(0, url.length-1);
		}
		
		var w = 505;
		var h = 600;
		var left = screen.availWidth/2-(w/2);
		var top = screen.availHeight/2-(h/2);
		window.open(url,"GameLaunch","status,width="+w+",height="+h+",left="+left+",top="+top+",scrollbars=no,resizable=yes");
		//window.open(url,"GameLaunch");
		//window.open(url, "GameLaunch", "status, width=473, height=600, screenX=30,screenY=100,left=30,top=100, scrollbars=yes, resizable=yes");
	}
	
	function VgmRefreshParent(){
		try 
		{
			document.domain = "virgingames.com";
			if ((window.opener && !window.opener.closed) == false){
			
			}
			else
			{
				//get wagerworks page
				var ww = self.opener.parent;
				
				//refresh page
				ww.location.replace(unescape(self.opener.parent.location.href));
				
				//reset opener				
				self.opener = ww;	
			}
		}
		catch (e) {}
	}
	
	function ForceParentSsl()
	{
		try {
			var url = window.parent.location.href;
			if (url.indexOf("logoff") > -1) {
				return;
			}
				
			if (window.parent.location.protocol != 'https:'){ 
				window.parent.location.replace('https://' + window.parent.location.host + window.parent.location.pathname + window.parent.location.search); 
			} 
		}
		catch (e) {}
	}
	
	function DepositGuide(){
	
		try {
			//close current window and redirect to desposit page
			self.opener.location = "https://casino.virgingames.com/payment/deposit.do";
			window.close();
		}
		catch (e) {}
		
	}
	
	function CheckWrapper(vgmPage, wwUrl){
	
		var url = window.parent.location.href;
		if (url.toLowerCase().indexOf(vgmPage) > -1) {
			window.location = wwUrl + window.parent.location.search;
		}
	}
	
    //Browser Detect
    var BrowserDetect = {
    init: function()
    {
        this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
        this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
        this.OS = this.searchString(this.dataOS) || "an unknown OS";
    },
    searchString: function(data)
    {
        for (var i = 0; i < data.length; i++)
        {
            var dataString = data[i].string;
            var dataProp = data[i].prop;
            this.versionSearchString = data[i].versionSearch || data[i].identity;
            if (dataString)
            {
                if (dataString.indexOf(data[i].subString) != -1)
                    return data[i].identity;
            }
            else if (dataProp)
                return data[i].identity;
        }
    },
    searchVersion: function(dataString)
    {
        var index = dataString.indexOf(this.versionSearchString);
        if (index == -1) return;
        return parseFloat(dataString.substring(index + this.versionSearchString.length + 1));
    },
    dataBrowser: [
		{
		    string: navigator.userAgent,
		    subString: "Chrome",
		    identity: "Chrome"
		},
		{ string: navigator.userAgent,
		    subString: "OmniWeb",
		    versionSearch: "OmniWeb/",
		    identity: "OmniWeb"
		},
		{
		    string: navigator.vendor,
		    subString: "Apple",
		    identity: "Safari",
		    versionSearch: "Version"
		},
		{
		    prop: window.opera,
		    identity: "Opera"
		},
		{
		    string: navigator.vendor,
		    subString: "iCab",
		    identity: "iCab"
		},
		{
		    string: navigator.vendor,
		    subString: "KDE",
		    identity: "Konqueror"
		},
		{
		    string: navigator.userAgent,
		    subString: "Firefox",
		    identity: "Mozilla&nbsp;Firefox",
		    versionSearch: "Firefox"
		},
		{
		    string: navigator.vendor,
		    subString: "Camino",
		    identity: "Camino"
		},
		{		// for newer Netscapes (6+)
		    string: navigator.userAgent,
		    subString: "Netscape",
		    identity: "Netscape"
		},
		{
		    string: navigator.userAgent,
		    subString: "MSIE",
		    identity: "Internet&nbsp;Explorer",
		    versionSearch: "MSIE"
		},
		{
		    string: navigator.userAgent,
		    subString: "Gecko",
		    identity: "Mozilla",
		    versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
		    string: navigator.userAgent,
		    subString: "Mozilla",
		    identity: "Netscape",
		    versionSearch: "Mozilla"
		}
	],
    dataOS: [
		{
		    string: navigator.platform,
		    subString: "Win",
		    identity: "Windows"
		},
		{
		    string: navigator.platform,
		    subString: "Mac",
		    identity: "Mac"
		},
		{
		    string: navigator.userAgent,
		    subString: "iPhone",
		    identity: "iPhone/iPod"
		},
		{
		    string: navigator.platform,
		    subString: "Linux",
		    identity: "Linux"
		}
	]

    };
    BrowserDetect.init();
-->