﻿// Download link
function gotoDownload() {
    gaPokerDownload();
    var rStatus = $.cookie('rStatus');
    if(rStatus == null || rStatus == 1) {
        var popupUrl = '/t/customer/registrationpopup.aspx?submit=downloadForm';
        SB.base.deferWindowCommand(popupUrl, 'popup', false);
    } else {
        document.downloadForm.submit();
    }
}

// BOSS PIN
function savePIN(value)
{	
	document.cookie = "paradisePokerPin=" + escape(value) + ";path=/;expires=Thu, 31-Dec-2099 23:59:59 GMT";	
}

function loadPIN()
{
	var elem = document.getElementById("statsIframe");	
	var value = getCookie("paradisePokerPin");
	elem.src = elem.src + value;
	elem.refresh;
}

function getQueryStringValue(name)
{
	var args = new Object();
	var query = location.search.substring(1);
	var pairs = query.split('&');
	for (var i = 0; i < pairs.length; i++)
	{
		var pos = pairs[i].indexOf('=');
		if (pos == -1)
			continue;
		else
		{
			var argname = pairs[i].substring(0, pos);
			var argvalue = pairs[i].substring(pos + 1);
			if (argname == name)
				return argvalue;
		}
	}
	return "";
}

// Shows or hides HallofFame contents
function expandHallofFame(ID)
{
	document.getElementById('item'+ID).style.display = 'block';
	document.getElementById('expander'+ID).href = "javascript:collapseFaq("+ ID + ")";
	document.getElementById('expander'+ID).title = "Collapse";
	
}
function collapseHallofFame(ID)
{
	document.getElementById('item'+ID).style.display = 'none';
	document.getElementById('expander'+ID).href = "javascript:expandFaq("+ ID + ")";
        document.getElementById('expander'+ID).title = "Expand";
}

