// JavaScript Document
function validate(){

	if(document.frmuserdata.userName.value == ""){
		alert("Please enter your username.");
		return;
	}
	if(document.frmuserdata.password.value == ""){
		alert("Please enter your password.");
		return;
	}

	// Open a new window , size depending on client screen resolution
	
	if(screen.height > 600){
		
		//newwindow = window.open("https://www.tukaweb.com/TUKA_Web/index.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=950,height=680,screenX=0,screenY=0,top=1,left=1");	
		//newwindow = window.open("http://nitish/TUKA_Web/waitforlogin.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=950,height=680,screenX=0,screenY=0,top=1,left=1");	
		newwindow = window.open("https://www.tukaweb.com/TUKA_Web/waitforlogin.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=950,height=680,screenX=0,screenY=0,top=1,left=1");	
	}
	else{
	
		//newwindow = window.open("https://www.tukaweb.com/TUKA_Web/index.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=780,height=500,screenX=0,screenY=0,top=1,left=1");			
		//newwindow = window.open("http://nitish/TUKA_Web/waitforlogin.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=780,height=500,screenX=0,screenY=0,top=1,left=1");
		newwindow = window.open("https://www.tukaweb.com/TUKA_Web/waitforlogin.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=950,height=680,screenX=0,screenY=0,top=1,left=1");	
	}
	
	// Shoot the form
	today = new Date();
	weekDayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
	monthName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December")	
	document.frmuserdata.dt.value = (weekDayName[today.getDay()] + ", " + monthName[today.getMonth()] + " " + today.getDate() + " " + today.getYear() + "  " + today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds());	
	document.frmuserdata.step.value = "Authenticate";
	myString = new String(document.frmuserdata.userName.value);
	if(myString.indexOf("@") < 0){
		//document.frmuserdata.action = "http://nitish/tuka_web/CADers/cadersignin.asp";
		document.frmuserdata.action = "https://www.tukaweb.com/TUKA_Web/CADers/cadersignin.asp";
	}else{
		//document.frmuserdata.action = "http://nitish/TUKA_Web/signin.asp";
		document.frmuserdata.action = "https://www.tukaweb.com/TUKA_Web/signin.asp";	
	}
	document.frmuserdata.target = "MEMBERS"
	document.frmuserdata.submit();
	location.reload();
}
function doRequest(i){
	// Open a new window , size depending on client screen resolution
	//alert("inside do");
	if(screen.height > 600){
		
		newwindow = window.open("https://www.tukaweb.com/TUKA_Web/index.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=950,height=680,screenX=0,screenY=0,top=1,left=1");	
		//newwindow = window.open("http://nitish/TUKA_Web/waitforlogin.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=950,height=680,screenX=0,screenY=0,top=1,left=1");	
	}
	else{
		//newwindow = window.open("https://www.tukaweb.com/home_of_tukaweb/TUKA_Web/index.htm","MEMBERS"
		//alert("dfdf");
		newwindow = window.open("https://www.tukaweb.com/TUKA_Web/index.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=780,height=500,screenX=0,screenY=0,top=1,left=1");			
		//newwindow = window.open("http://nitish/TUKA_Web/waitforlogin.htm","MEMBERS","status=yes,toolbar=no,location=0,menubar=0,scrollbars=1,width=780,height=500,screenX=0,screenY=0,top=1,left=1");
	}
}
function requesttc(){
	newwindow = window.open("http://www.tukaweb.com/home_of_tukaweb/requesttc.asp","RQTC","status=yes,toolbar=no,location=0,menubar=0,scrollbars=0,width=450,height=500,screenX=0,screenY=0,top=1,left=1");	
}