<!-- 

function open_application_window(locUrl, CurBalance) {
	if (CurBalance > 0){
	        windowleft = new String((window.screen.availWidth-810)/2);
        	windowtop = new String((window.screen.availHeight-600)/2);
		infoWin = window.open(locUrl,null,"toolbar=no,location=no,status=no,scrollbars=yes, menubar=no,resizable=no,,left="+windowleft+",top="+windowtop+",width=810,height=600");
		if (infoWin.opener == null) infoWin.opener = window;
		infoWin.opener.name = "opener";
		}
	else
		{
		alert("Sorry, you have insufficient funds for this operation.")
		}	
}

function open_window(locUrl, loggedUser, userRight) {
	if (loggedUser=='True'){
		switch (userRight){
			case '-1':
				alert('Access denied!');
				return;
			case '-2':
				alert('Insufficient balance!');
				return;
		}  
	        windowleft = new String((window.screen.availWidth-800)/2);
	        windowtop = new String((window.screen.availHeight-600)/2);
		infoWin = window.open(locUrl,null,"toolbar=no,location=no,status=no,scrollbars=yes, menubar=no,resizable=no,,left="+windowleft+",top="+windowtop+",width=800,height=600");
		if (infoWin.opener == null) infoWin.opener = window;
		infoWin.opener.name = "opener";
	}else{
		alert('Please enter your username/password in the login area!')
	}
}

function open_window_weballegro(loggedUser, userRight) {
	if (loggedUser=='True'){
		switch (userRight){
			case '-1':
				alert('Access denied!');
				return;
			case '-2':
				alert('Insufficient balance!');
				return;
		}  
		if ((window.screen.availWidth > 800) &&  (window.screen.availHeight > 600)){
			windowwidth = 850;
			windowheight = 650;
		}else{
			windowwidth = 800;
			windowheight = 600;
		}

	        windowleft = new String((window.screen.availWidth-windowwidth)/2);
	        windowtop = new String((window.screen.availHeight-windowheight)/2);
		infoWin = window.open("../application/debit_account.asp?ServiceType=WebAllegro",null,"toolbar=no,location=no,status=no,scrollbars=yes, menubar=no,resizable=yes,,left="+windowleft+",top="+windowtop+",width=" + windowwidth + ",height=" + windowheight + "");
		if (infoWin.opener == null) infoWin.opener = window;
		infoWin.opener.name = "opener";
	}else{
		alert('Please enter your username/password in the login area!')
	}
}

function open_extranet_window(userType) {
	if ((userType=='1')||(userType=='')){
		window.location.href = "../extranet/index.asp"
	}else{
		alert('Access denied!')
	}
}

// -->