<!--
function LogOn(theServerIp,theSportsBookName,thePlayerCode,thePassword,thePlayForFun)
{
	var AppName = navigator.appName;
	var AppVersion = parseFloat(navigator.appVersion);
	var WindowOptions = "toolbar=no,menubar=no,status=no,location=no,left=0,top=0,scrollbars=yes";
	var AppWindow = null;
	var OpenOk = false;
	var i = 0;

	//Low Resolution
	if (screen.width < 800 && screen.height < 600)
	{
		if (AppName.indexOf("Netscape") != -1 && AppVersion < 5.0)
		{
			WindowOptions += ",width=" + (screen.width - 20) + ",height=" + (screen.height - 70) + ",resizable=no";
		}
		else
		{
				WindowOptions += ",width=" + (screen.width - 20) + ",height=" + (screen.height - 70) + ",resizable=yes";
		}
	}
	else//High Resolution
	{
		if (AppName.indexOf("Netscape") != -1 && AppVersion < 5.0)
		{
			WindowOptions += ",width=800,height=530,resizable=no";
		}
		else
		{
			WindowOptions += ",width=" + (screen.width - 20) + ",height=" + (screen.height - 70) + ",resizable=yes";
		}
	}
	
	if (thePlayerCode.length > 0 || thePlayForFun)
	{
		//busca un caracter invalido en el player code
		for (i = 0; i < thePlayerCode.length &&
				        thePlayerCode.charAt(i) != "'" &&
        		        thePlayerCode.charAt(i) != " " &&
					    thePlayerCode.charAt(i) != '"' &&
			    		thePlayerCode.charAt(i) != "%"; i++)
		{;}

		if (i < thePlayerCode.length)
		{
			alert("Next characters are invalid to use in any data input: ',\", % or blank spaces, when entering codes");
		}
		else // PlayerCode Ok
		{
			if (thePassword.length > 0 || thePlayForFun)
			{
				//busca un caracter invalido en el password
				for (i = 0; i < thePassword.length &&
						        thePassword.charAt(i) != "'" &&
				                thePassword.charAt(i) != " " &&
							    thePassword.charAt(i) != '"' &&
							    thePassword.charAt(i) != "%"; i++)
				{;}
				
				if (i < thePassword.length)
				{
					alert("Next characters are invalid to use in any data input: ',\", % or blank spaces, when entering codes");
				}
				else // Password OK
				{
					AppWindow = window.open("",theSportsBookName,WindowOptions);
					OpenOk = true;
				}
			}
			else // (thePassword.length > 0)
			{
				alert("Please type your Password before try to Login.");
			}
		}//(i < thePlayerCode.length)
	}
	else // (thePlayerCode.length > 0)
	{
		alert("Please type your Code before try to Login.");
	}

	if (OpenOk)
	{
		AppWindow.document.open();
		AppWindow.document.write("<HTML><HEAD></HEAD><BODY>");
		AppWindow.document.write("<FORM action='http://" + theServerIp + "/" + theSportsBookName + "/ValidatePlayer.asp' id='frmIdentification' method='post' name='frmIdentification'>");
		
		if (!thePlayForFun)
		{
			AppWindow.document.write("<INPUT type='hidden' id='txtcode' name='txtcode' value='" + thePlayerCode + "'>");
		}
		else
		{
			AppWindow.document.write("<INPUT type='hidden' id='txtcode' name='txtcode' value='PLAYFORFUN'>");
		}

		AppWindow.document.write("<INPUT type='hidden' id='txtpassword' name='txtpassword' value='" + thePassword + "'>");
		AppWindow.document.write("<INPUT type='hidden' id='txtcompconfig' name='txtcompconfig' value='" + GetFormattedBrowserPlatform() + "'>");
		AppWindow.document.write("</FORM></BODY></HTML>");
		
		AppWindow.document.close();
		AppWindow.document.forms[0].submit();
	}
}

//-->
