﻿//function disableButt() { //used to prevent a double-click on login buttons
//document.getElementById('btnLogin').className='mybtndis'
//if (document.getElementById('btnVisitor')) {document.getElementById('btnVisitor').className='mybtndis'}
//}
function govideo() {
//window.open("http://www.tennisreservations.com/membervideo/logindemo.aspx","demo","width=1000,height=720,scrollbars=1,resizable=1"); 
var wd
var ht
if (screen.height<=768) {
	wd=screen.width;ht=screen.height
}else {
	wd=977;ht=768
}
mypopup("http://tennisbookings.com/memberdemo_demo/memberdemo_demo.htm","ddemo","width="+wd+",height="+ht+",scrollbars=1,resizable=1");
return false
}

function getPassword() {
document.getElementById('LinkButton2').click()
}
function InitFunctions()
{
	GetScreenResForLog();
	SetFocusToFirstTextBox();
}

function GetScreenResForLog()
{
	var nres = document.getElementById("screenres");
	nres.value = screen.width + " x " + screen.height;
}

function SetFocusToFirstTextBox()
{  if (top.location != location) {
    top.location.href = document.location.href ;
  }
	checkjavascript();
	var nname = document.getElementById("txtUsername");	
	if (document.getElementById ('txtPassword').value!='') {	
		document.getElementById('btnLogin').focus
	}
	else {
		if (nname.value=='') { nname.focus()} else {document.getElementById ('txtPassword').focus()}
		}
}
function checkjavascript()
{	
	document.getElementById("checkjs").value = 'SCRIPTS';
}

function valConf() {
sss='printusermessage.aspx?I=' + myid
	mypop=window.open(sss,'sp','width=650,height=500,scrollbars=yes,addressbar=0,resizable')
	if (timerID!="" && timerID!=null) { //clear any existing timer first
	window.clearTimeout (timerID)
	}
	timerID=setTimeout("checkpopup()",2000)
}
