function lobbywin(){
window.open("https://www.galaxiworld.com/inside/index.html","_self")
}

function cashierwin(){
window.open("https://secure.gcash.com/jsp/gc/0/gcManageHome.jsp","_blank")
}

function gpointswin(){
window.open("https://www.galaxiworld.com/servlets/GalaxiPointsSummaryServlet","_self")
}

function gamehistwin(){
window.open("https://www.galaxiworld.com/servlets/ViewLastGame?alt=t&game=t","_self")
}

function contactwin(){
window.open("https://www.galaxiworld.com/inside/help/right_contact_us.html","_self")
}

function downloadLog(){
window.open("http://www.galaxiworld.com/downloadGalaxi.html","_self")
}

function pokerwin(){
window.open("#","_self")
}

function jackpots(){
window.open("http://www.galaxiworld.com/servlets/ListProgressive/?doorway=0&getform=../lobby/listjackpots.html","_self")
}

function play4money(){
window.open("http://www.galaxiworld.com/lobby/play4money.html","_self")
}

function play4fun(){
window.open("http://www.galaxiworldusa.com/en/play4fun.html","_self")
}

function homer(){
window.open("http://www.galaxiworld.com/lobby/play4money.html","_self")
}

// Payment links

function netteller(){
window.open("https://www.neteller.com/neteller/home.cfm","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // netteller

function visa(){
window.open("http://www.visa.com/globalgateway/gg_selectcountry.html?retcountry=1","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // visa

function masterCard(){
window.open("http://www.mastercard.com/mcweb/index.jsp","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // nmastercard

function eWallet(){
window.open("http://www.navahonetworks.com/products/ewallet/","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // nmastercard

function ninePay(){
window.open("http://www.navahonetworks.com/products/900/","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // ninepay

function useMy(){
window.open("http://www.usemybank.com/","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // usemybank

function prePaid(){
window.open("http://www.prepaidatm.com/","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // prepaid

function instadebit(){
window.open("http://www.instadebit.com/","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // instadebit

function firePay(){
window.open("http://www.firepay.com/","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // firepay

function igc(){
window.open("http://www.igcouncil.org","_blank","height=500,width=750,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,left=0,top=0")
} // igc

function thawte(){
window.open("/thawte.html","_blank","height=100,width=100,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left=0,top=0")
} // thawte

function kahnawake(){
window.open("http://www.kahnawake.com/gamingcommission","_blank","height=500,width=785,menubar=1,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=1,left=0,top=0")
} // gambling

function iGaming(){
window.open("http://www.igamingnetworks.com/","_blank","height=500,width=785,menubar=1,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=1,left=0,top=0")
} // gambling

// -------------------------------------------
// cookie section
var d=document;

// cookie functions: http://www.quirksmode.org/js/cookies.html
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(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 eraseCookie(name) {
	createCookie(name,"",-1);
}
// -- end cookie functions

function gup( name ) {
// get URL parameter. http://www.netlobo.com/url_query_string_javascript.html
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var tmpURL = window.location.href;
	var results = regex.exec( tmpURL );
	if( results == null )
		return "";
	else
		return results[1];
}

function checkBTag() {
// this will check if BTag has been already set. Do nothing in that case.
// If not set then store BTag from query in cookies for 30 days
	cookieBTag = readCookie('bTag');
	if (cookieBTag) { // cookie 'bTag' already set
	} else { // cookie not set
		sBTag = gup('btag');
		createCookie('bTag',sBTag,30);
	}
}
sUrlBTag = gup('btag');
if (sUrlBTag) checkBTag();
// end of cookie section
// -------------------------------------------
