// javascript centralized functions and global javascript variables;

var register_page='https://pl.bingos.com/paas/bpl/members/registeruser.jsp?C=TRACKING_ID@'+sourceid+'!SYSTEM_ID@BP_AFF01&PHPSID='+phpsid+'&custom1='+btag+'&REFPID='+pid+'.';
var login_page='https://pl.bingos.com/paas/bpl/index.jsp?C=TRACKING_ID@'+sourceid+'!SYSTEM_ID@BP_AFF01&PHPSID='+phpsid+'&REFPID='+pid+'.';

function confirm_register(){
var pzone = (pzone == null) ? 4 : pzone; //Default value for pzone is 4
   if (confirm("Your are either not logged in or have not registered. \n Click OK to register or login from the top of the page"))
{document.location=register_page+pzone;}
else
{return false;}
}

function privacy(language){ // opens up a privacy statement popup;
document.location=('privacy.php'+sid);
}

function register(pzone) { //  leads to registry page

var pzone = (pzone == null) ? 0 : pzone;
document.location=register_page+pzone;
}

function practice(game){
alert ('abrir popup de practica de '+game);}

function redir(myurl) {
	document.location=myurl+'&PHPSESSID='+sid;
}

function redir(myurl) {
	document.location=myurl+'&PHPSESSID='+sid;
}

function checklogin() {

	if(document.loginform.username.value==""){
		register();
	} else {
		document.loginform.submit();
	}

}

function link2tourney(){

redir("http://www.bingos.co.uk/index.php?pid=30");

}

function invisible(){
	document.getElementById('promo').style.visibility='hidden';
}

function bookmarksite(){
if (document.all)
window.external.AddFavorite(location.href, document.title);
else if (window.sidebar)
window.sidebar.addPanel(document.title, location.href, "")
}

/*chequea formulario de login*/
function chequea_enter(e) {
  tecla = (document.all) ? e.keyCode : e.which;
  if (tecla==13) document.loginform.submit();
}

/* Luckynumbers Form */
function sendform(){
  	formlucky.submit();
	}

