<!--

function Zinit() {
	document.getElementById("cbo_cat").selectedIndex=0;
	document.getElementById("cbo_city").selectedIndex=0;
	document.getElementById("cbo_city").disabled=true;
	document.getElementById("cmd_register").disabled=true;
	document.getElementById("cmd_forgotpwd").disabled=true;
}

function wrongLoginMsg(callNo) {
	if(callNo=="1") {
		msg="->> User Name or Password not found \n";
		msg+="      for selected category or city.\n";
		msg+="\n";
		msg+="->> Please type user name and password correctly \n";
		msg+="      and select your category and city.";
		alert(msg);
	}
}

function ZCheckButtons(obj) {
	if(obj.selectedIndex!=0){document.getElementById("cmd_forgotpwd").disabled=false;}
	else {document.getElementById("cmd_forgotpwd").disabled=true;}

	if(obj.selectedIndex==3||obj.selectedIndex>=6){document.getElementById("cmd_register").disabled=false;}
	else {document.getElementById("cmd_register").disabled=true;}

	if(obj.selectedIndex==2||obj.selectedIndex==4||obj.selectedIndex==5) {document.getElementById("cbo_city").disabled=false; }
	else {document.getElementById("cbo_city").disabled=true; }
}

function ZRegister() {
	var xUrl,xCat;
    xCat = document.getElementById("cbo_cat").selectedIndex;

	if(xCat==3){xUrl="ipregister.asp";}
	if(xCat==6||xCat==8){xUrl="asregister.asp";}
	if(xCat==7){xUrl="gregister.asp";}

	window.location=xUrl;
}

function ZForgotpwd() {
	var xUrl,xCat;
    xCat = document.getElementById("cbo_cat").selectedIndex;

	if(xCat==1){xUrl="forgot.asp?cid=3&ctype=1";}
	if(xCat==2){xUrl="forgot.asp?cid=1&ctype=1";}
	if(xCat==3){xUrl="forgot.asp?cid=4&ctype=1";}
	if(xCat==4){xUrl="forgot.asp?cid=2&ctype=1";}
	if(xCat==5){xUrl="forgot.asp?cid=5&ctype=1";}
	if(xCat==6){xUrl="forgot.asp?cid=7&ctype=1";}
	if(xCat==7){xUrl="forgot.asp?cid=6&ctype=1";}
	if(xCat==8){xUrl="forgot.asp?cid=7&ctype=1";}

	window.location=xUrl;
}

function ZCheckForm(obj) {
	var msg="";
	if(obj.User_ID.value.length==0) {msg += "Username not entered\n" }
	if(obj.User_Pass.value.length==0) {msg += "Password not entered\n" }

	if(obj.cbo_cat.selectedIndex==0) {msg += "No Category selected\n" }
	if(obj.cbo_cat.selectedIndex==2 && obj.cbo_city.selectedIndex==0) {msg += "No City selected\n" }
	if(obj.cbo_cat.selectedIndex==4 && obj.cbo_city.selectedIndex==0) {msg += "No City selected\n" }
	if(obj.cbo_cat.selectedIndex==5 && obj.cbo_city.selectedIndex==0) {msg += "No City selected\n" }


	if(msg.length>0) {alert(msg);return false}

	return true
}

function ZCheckForm2(obj) {
	if(obj.txt_no.value.length==0) {alert("No Value entered");return false }

	return true
}

function ShowDis()
{
    NewWin1 = window.open("dis.htm","NewWindow1","width=424,height=135,left=0,top=18");
    if (NewWin1.opener == null) NewWin1.opener = window;
    NewWin1.opener.name = "opener"
}

//-->
