/*
	This is the configuration JavaScript file.  Change the settings
	in the following section to match your affiliate tracking information.
	Old: affiliate_profileus = "1234"; affiliate_usernamewor = "27000000";
	affiliate_profilewor = "105060";
*/
affiliate_usernameus = "38889";
affiliate_profileus = "";
affiliate_username = "fiskur";
affiliate_profile = "gpconet";
affiliate_profilep = "gpco";
affiliate_usernameFr = "38889";
affiliate_profileFr = "";
affiliate_usernamewor = "38889";
affiliate_profilewor = "";
  ////////////////////////////////////////////////////////////////
 //                DO NOT EDIT BELOW THIS LINE                 //
////////////////////////////////////////////////////////////////
strSubAffLink = "http://adv.casinoblasters.com/index.php?" + affiliate_username;
strEuroLink = "http://banner.goldenpalace.com/cgi-bin/redir.cgi?id=N&member=" + affiliate_username + "&profile=thineuro";
strPoundLink = "http://banner.goldenpalace.com/cgi-bin/redir.cgi?id=N&member=" + affiliate_username + "&profile=thinpound";
strFrenchLink = "http://banner.goldenpalace.com/cgi-bin/redir.cgi?id=N&member=" + affiliate_username + "&profile=thinfr";
strSpanishLink = "http://banner.goldenpalace.com/cgi-bin/redir.cgi?id=N&member=" + affiliate_username + "&profile=thines";
function CasinoAffiliateProgram(){
	document.location= "http://adv.casinoblasters.com/index.php?" + affiliate_username;
	if (affiliate_profile != "") document.write += "&profile=" + affiliate_profile;
	document.location = document.write;
}
function downloadCasinoSoft(){
	strDownloadURL = "http://banner.goldenpalace.com/cgi-bin/SetupCasino.exe?member=" + affiliate_username;
	if (affiliate_profile != "") strDownloadURL += "&profile=" + affiliate_profile;
	document.location = strDownloadURL;
}
function downloadCasinoSoftUS(){
	strDownloadURL = "http://www.winpalace.com/en/download/.aspx?affid=" + affiliate_usernameus;
	if (affiliate_profile != "") strDownloadURL += "&profile=" + affiliate_profileus;
	document.location = strDownloadURL;
}
function downloadCasinoSoftFr(){
	strDownloadURL = "http://www.winpalace.com/fr/download/.aspx?affid=" + affiliate_usernameFr;
	if (affiliate_profile != "") strDownloadURL += "&profile=" + affiliate_profileFr;
	document.location = strDownloadURL;
}
function downloadCasinoSoftWor(){
	strDownloadURL = "http://www.winpalace.com/en/download/.aspx?affid=" + affiliate_usernamewor;
	if (affiliate_profile != "") strDownloadURL += "&profile=" + affiliate_profilewor;
	document.location = strDownloadURL;
}
function startFlashGames(){
	strFlashURL = "http://banner.goldenpalace.com/flashcasino.php?&member=" + affiliate_username;
	if (affiliate_profile != "") strFlashURL += "&profile=" + affiliate_profile;
	document.location = strFlashURL;
}
function startFlashGamesUS(){
	strFlashURL = "http://www.goldenpalace.com/global/_v3/gateway.php?game=flashcasino&member=" + affiliate_username;
	if (affiliate_profile != "") strFlashURL += "&profile=" + affiliate_profile;
	document.location = strFlashURL;
}
function downloadPokerSoft(){
	strDownloadURL = "http://banner.goldenpalacepoker.com/cgi-bin/SetupCasino.exe?member=" + affiliate_username;
	if (affiliate_profile != "") strDownloadURL += "&profile=" + affiliate_profilep;
	document.location = strDownloadURL;
}
function PopWindow(Url) {
	var WindowWidth = 500;
	var WindowHeight = 400;
	var WindowTop = (screen.availHeight/2) - (WindowHeight/2);
	var WindowLeft = (screen.availWidth/2) - (WindowWidth/2);
	var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=yes,resizable,width='+WindowWidth+',height='+WindowHeight+',left='+WindowLeft+',top='+WindowTop+',screenx='+WindowLeft+',screeny='+WindowTop;
	PoppedWindow = window.open(Url,"PoppedWindow",WindowProps);
	return;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/*
	ExitOverlay
*/
/*
var doExit = false;
document.getElementById('tiExitAnchor').href="http://www.goldenpalacecasinoonline.net/popular-casinos/win-palace-overlay.html";
document.getElementById('tiExitAnchor').innerHTML = '<img src="http://banner.affactive.com/RESOURCES/WinPalace/2009112508404841/wp_screenshot_lobby_800x600.jpg" width="800" height="600" border="0" />';

function getBodySize(){
	if (document.body.scrollHeight>document.body.offsetHeight) return {x:document.body.scrollWidth,y:document.body.scrollHeight}; // all but Explorer Mac
	return {x:document.body.offsetWidth,y:document.body.offsetHeight}; // Explorer Mac;
}

function getPageScroll(){
	var offsetX=0, offsetY=0;
	if(!window.pageYOffset){
		if(!(document.documentElement.scrollTop == 0)){
			offsetY = document.documentElement.scrollTop;
			offsetX = document.documentElement.scrollLeft;
		}else{
			offsetY = document.body.scrollTop;
			offsetX = document.body.scrollLeft;
		}
	}else{
		offsetX = window.pageXOffset;
		offsetY = window.pageYOffset;
	}
	return {x:offsetX,y:offsetY};
}

function getWindowSize() {
	var myWidth=0, myHeight=0;
	if(typeof(window.innerWidth) == 'number'){
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if(document.body && (document.body.clientWidth || document.body.clientHeight)){
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return {x:myWidth,y:myHeight};
}

function showDHTMLExitPop(){
		if (doExit==true && document.getElementById('dhtmlExitOverlay') && document.getElementById('dhtmlExit')){
		// the overlay and exit pop are on the page
		var objExitOverlay = document.getElementById('dhtmlExitOverlay');
		var objExit = document.getElementById('dhtmlExit');

		if ((getCookie('tx_unique_flash') != 1) && (getCookie('tx_unique_dl') != 1) && (getCookie('tx_unique_dhtmlexit') != 1)){
			// no flash click, download click, and previous dhtml exit pop - don't but our customers :)
			setCookie('tx_unique_dhtmlexit','1',1);
			var winSize = getWindowSize();
			var pageScroll = getPageScroll();
			var bodySize = getBodySize();
			var totalPageHeight = bodySize.y;
			if (winSize.y > totalPageHeight) totalPageHeight = winSize.y;
			if (pageScroll.y > 0) totalPageHeight = totalPageHeight + pageScroll.y;
			objExitOverlay.style.height = totalPageHeight+'px';
			objExitOverlay.style.display = '';
			objExit.style.display = '';
			objExit.style.top = (winSize.y / 2) - (objExit.offsetHeight / 2) + pageScroll.y +'px';
			objExit.style.left = (winSize.x / 2) - (objExit.offsetWidth / 2)+'px';
		}
	}
}

function hideDHTMLExitPop(){
	document.getElementById('dhtmlExitOverlay').style.display = 'none';
	document.getElementById('dhtmlExit').style.display = 'none';
}

function updateExitNets(){
	if (document.getElementById('exitNetLeft') && document.getElementById('exitNetRight') && document.getElementById('exitNetCenter')){
		var pageScroll = getPageScroll();
		var winSize = getWindowSize();
		
		var objNetLeft = document.getElementById('exitNetLeft');
		var objNetRight = document.getElementById('exitNetRight');
		var objNetCenter = document.getElementById('exitNetCenter');
		
		objNetLeft.style.left = '0px';
		objNetLeft.style.top = pageScroll.y +'px';
		objNetRight.style.right = '0px';
		objNetRight.style.top = pageScroll.y +'px';
		objNetCenter.style.left = '0px';
		objNetCenter.style.top = pageScroll.y +'px';
	}
	setTimeout(updateExitNets,100);
}

function setCookie(name, value, days, path, domain, secure) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	
	var curCookie = name + "=" + escape(value) + expires +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
	document.cookie = curCookie;
}

function getCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for (var i=0;i < ca.length;i++){
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function allowExit(){
	
	doExit = true;	
}

setTimeout("allowExit()",5000);
updateExitNets();*/
