function rollover(obj, st){
	if(curPgId != obj.id){
		if(st==1){
			obj.className = "topNavOvr";
		} else {
			obj.className = "topNavLnk";
		}
	}
}
function gotoUrl(pgId){
	if(pgId == "home"){
		window.location.href = "index.php?page_url="+pgId;
	} else {
		window.location.href = "inner.php?page_url="+pgId;
	}	
}
function emptyfield( textObj ){
	if (textObj.value.length == 0)  return true
	if(textObj.value.charCodeAt(0) == 32) return true
	return false
}

function isEmail(email) {
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = email //document.forms[form_id].elements[email].value;
   return reg.test(address);
}

function validateForm(vFrm){
		if ( emptyfield(vFrm.brokerName) ){
			alert("Please Enter Name");
			vFrm.brokerName.focus();
		} else if ( emptyfield(vFrm.brokerContact) ){
			alert("Please Enter Contact Number");
			vFrm.brokerContact.focus();
		} else if ( emptyfield(vFrm.brokerEmail) ){
			alert("Please Enter Email Address");
			vFrm.brokerEmail.focus();
		} else if ( !isEmail(vFrm.brokerEmail.value) ){
			alert("Please Enter Valid Email Address");
			vFrm.brokerEmail.focus();
		} else
			return true
		return false;
}

function validfrm(){
	if(document.mainfrm_login.txtPassword.value==""){
		alert("Please Enter Broker Code");
		document.mainfrm_login.txtPassword.focus();
		return false;
	} else	{
		document.mainfrm_login.action="login_process.aspx";
		return true;	
	}
}