// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.org
// Edit for Firefox by pHaez
//
function getPageSize(){
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}
	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}
function showSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "visible";
	}
}
// ---------------------------------------------------
function hideSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
}
function setSelectList(list_arr,selval)
{
	for(i=0;i<list_arr.length;i++)
	{
		if(list_arr[i].value == selval)
		{
			list_arr[i].selected=true;
			break;
		}
	}
}
function valid(actPath)
{	
if(document.frmlist.keyword.value=="")
	{ 
        alert(actPath);
		alert("Please Enter keyword for Search.");
		document.frmlist.keyword.value="";
		document.frmlist.keyword.focus();
		return false;
	}
	document.frmlist.keyword.value = Trim(document.frmlist.keyword.value);
	document.frmlist.mode.value="Search";
	if(actPath)
	{ 
    window.location=actPath +"&option="+document.frmlist.option.value+"&keyword="+document.frmlist.keyword.value;
		return false;
	}
}
function RedirectURL(URL,ExtraParam)
{
	if(!ExtraParam)ExtraParam='';
	window.location=URL+ExtraParam;
	return false;
}
function alpha(value,length)
{
	chk1="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ- ";
	for(i=0;i<length;i++)
	{
		ch1=value.charAt(i);
		rtn1=chk1.indexOf(ch1);
		if(rtn1==-1)
			return false;
	}
	return true;
}
function alphanum(value,length)
{
	chk1="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_. ";
	for(i=0;i<length;i++)
	{
		ch1=value.charAt(i);
		rtn1=chk1.indexOf(ch1);
		if(rtn1==-1)
			return false;
	}
	return true;
}
//For states and city
function alphas(value,length)
{
	chk1="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ";
	for(i=0;i<length;i++)
	{
		ch1=value.charAt(i);
		rtn1=chk1.indexOf(ch1);
		if(rtn1==-1)
			return false;
	}
	return true;
}
function decimalNumber(value,length){
	chk1="1234567890.";
	for(i=0;i<length;i++)
	{
		ch1=value.charAt(i);
		rtn1=chk1.indexOf(ch1);
		if(rtn1==-1)
			return false;
	}
	return true;
}
function number(value,length){
	chk1="1234567890-";
	for(i=0;i<length;i++)
	{
		ch1=value.charAt(i);
		rtn1=chk1.indexOf(ch1);
		if(rtn1==-1)
			return false;
	}
	return true;
}
function onlynumber(value,length){
	chk1="1234567890";
	for(i=0;i<length;i++)
	{
		ch1=value.charAt(i);
		rtn1=chk1.indexOf(ch1);
		if(rtn1==-1)
			return false;
	}
	return true;
}
function Trim(s) 
{
	return s.replace(/^\s+/g, '').replace(/\s+$/g, '');
}
function pollwin(url,w, h, win_name)
{
	pollwindow=window.open(url,win_name,'top=0,left=0,status=no,toolbars=no,scrollbars=yes,width='+w+',height='+h+',maximize=no,resizable="no"');
	pollwindow.focus();
}
// This code was written by Tyler Akins and has been placed in the
// public domain.  It would be nice if you left this header intact.
// Base64 code from Tyler Akins -- http://rumkin.com
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function encode64(input) {
   var output = "";
   var chr1, chr2, chr3;
   var enc1, enc2, enc3, enc4;
   var i = 0;
   do {
      chr1 = input.charCodeAt(i++);
      chr2 = input.charCodeAt(i++);
      chr3 = input.charCodeAt(i++);
      enc1 = chr1 >> 2;
      enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
      enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
      enc4 = chr3 & 63;
      if (isNaN(chr2)) {
         enc3 = enc4 = 64;
      } else if (isNaN(chr3)) {
         enc4 = 64;
      }
      output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + 
         keyStr.charAt(enc3) + keyStr.charAt(enc4);
   } while (i < input.length);
   return output;
}
function decode64(input) {
   var output = "";
   var chr1, chr2, chr3;
   var enc1, enc2, enc3, enc4;
   var i = 0;
   // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
   input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
   do {
      enc1 = keyStr.indexOf(input.charAt(i++));
      enc2 = keyStr.indexOf(input.charAt(i++));
      enc3 = keyStr.indexOf(input.charAt(i++));
      enc4 = keyStr.indexOf(input.charAt(i++));
      chr1 = (enc1 << 2) | (enc2 >> 4);
      chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
      chr3 = ((enc3 & 3) << 6) | enc4;
      output = output + String.fromCharCode(chr1);
      if (enc3 != 64) {
         output = output + String.fromCharCode(chr2);
      }
      if (enc4 != 64) {
         output = output + String.fromCharCode(chr3);
      }
   } while (i < input.length);
   return output;
}
/* 
Purpose : Checking for obj availabe and Its Not Blank Value*/
function checkValidNull(obj, msg)
{
	if(obj)
    {   
        if(Trim(obj.value)=="")
        {
            alert(msg);
           	obj.focus();
			return false;
		}
	}
    else
    {   
		return false;	
	}
	return true;	
}
function checkValidZero(obj, msg)
{
	if(obj){
		if(Trim(obj.value)=="" || Trim(obj.value)=="0"){
			alert(msg);
			obj.focus();
			return false;
		}
	}else{
		return false;	
	}
	return true;	
}
/* It is compare the condition (equal,greater,less) 
Parameter : Objname,
comparision value
condition pass 'Equal', 'Greater','Less'
Alere Message to Dipslay
*/
function checkValidCompare(obj,comparewithvalue,condition, msg)
{
	if(obj)
	{
		val=obj.value;
 	/*alert(val);
 	alert(comparewithvalue);
 	alert(val <comparewithvalue);
		return false;*/
		flag=false;
		if(condition=='Equal' && val==comparewithvalue)
			flag=true;
		if(condition=='Greater' && val >= comparewithvalue)
			flag=true;
		if(condition=='Less' && val< comparewithvalue)
			flag=true;
		if(condition=='LessEqual' && val<= comparewithvalue)
			flag=true;
		if(flag==true)
		{
			alert(msg);
			obj.focus();
			return false;
		}
		else
			return true;	
	}
	else
		return false;	
}
function checkValidCompareValues(obj,comparewithvalue,condition, msg)
{
	if(obj)
	{
		val=parseInt(obj.value);
		comparevalue=parseInt(comparewithvalue);
 	/*alert(val);
 	alert(comparewithvalue);
 	alert(val <comparewithvalue);
		return false;*/
		flag=false;
		if(condition=='Equal' && val==comparevalue)
			flag=true;
		if(condition=='Greater' && val >= comparevalue)
			flag=true;
		if(condition=='Less' && val< comparevalue)
			flag=true;
		if(condition=='LessEqual' && val<= comparevalue)
			flag=true;
		if(flag==true)
		{
			alert(msg);
			obj.focus();
			return false;
		}
		else
			return true;
	}
	else
		return false;
}
function checkValidLength(obj,len, msg)
{ 
	if(obj)
	{
		val=Trim(obj.value);
		if(val=="" || val.length<len )
		{
			alert(msg);
			obj.focus();
			return false;
		}
	}
	else
		return false;	
	return true;	
}
function checkValidNumber(obj, msg)
{
	chk1="1234567890";
	flag=false;
	if(obj)
	{
		value=obj.value;
		if(Trim(value)!="")
		{
			len=obj.value.length;
	//	alert(len);
			for(i=0;i<len;i++)
			{
				ch1=value.charAt(i);
				rtn1=chk1.indexOf(ch1);
				if(rtn1==-1)
					flag=true;
			}
		}
	}else{
		flag=true;
		msg='Object is not Avaible';
	}
	if(flag)
	{
		alert(msg);
		obj.focus();
		return false;
	}
	return true;
}
function checkValidFloatNumber(obj, msg)
{
	chk1="1234567890.";
	flag=false;
	if(obj)
	{
		value=obj.value;
		if(Trim(value)!="")
		{
			len=obj.value.length;
			//alert(len);
			for(i=0;i<len;i++)
			{
				ch1=value.charAt(i);
				rtn1=chk1.indexOf(ch1);
				if(rtn1==-1)
					flag=true;
			}
		}else flag=true;
	}else{
		flag=true;
		msg='Object is not Avaible';
	}
	if(flag)
	{
		alert(msg);
		obj.focus();
		return false;
	}
	return true;
}
function checkKeyEventNumber()
{  
	val = event.keyCode;
   	if(val==13)	return true;
	if(val<48)	event.keyCode=0;
	if(val>57)	event.keyCode=0;
	return true;
}
function checkKeyEventFloatNumber()
{  
	//alert(event+" "+navigator.appName);
	var val;
	if (navigator.appName == "Microsoft Internet Explorer")
      val = window.event.keyCode;
   	else if (navigator.appName == "Navigator")
		val = event.which;
   	else if (navigator.appName == "Mozilla")
       val = event.keyCode;
   	else if (navigator.appName == "Netscape")
       val = event.which;
	if(val==13)		return true;
	if(val<48 && val!=46 && val!=43 && val!=45)
  		event.keyCode=0;
	if(val>57)
		event.keyCode=0;
	return true;
}
function checkValidPhoneFormate(obj, msg)
{
	chk1="+.1234567890()- ";
	flag=false;
	if(obj)
	{
		value=obj.value;
		if(Trim(value)!="")
		{
			len=obj.value.length;
			for(i=0;i<len;i++)
			{
				ch1=value.charAt(i);
				rtn1=chk1.indexOf(ch1);
				if(rtn1==-1)
					flag=true;
			}
		}
	}else{
		flag=true;
		msg='Object is not Avaible';
	}
	if(flag)
	{
		alert(msg);
		obj.focus();
		return false;
	}
	return true;
}
function openLoadingWindow(loadMsg)
{
	if(loadMsg)
		loadMsg += " Loading..." ;
	else
		loadMsg = "Loading...";
	winObj=window.open("",0,"menubar=no,resiable=no,width=320,height=10,top=50,left=50");
	winObj.document.write("<style>BODY {FONT-FAMILY: Arial, Helvetica, sans-serif; }</style><body bgcolor='#FDFCD9'><h1><span id='load_div'></span></h1><script>word=new String('"+loadMsg+"');i=0;function showMessage(){if(i>word.length)i=0;document.getElementById('load_div').innerHTML=word.substring(0,i);i++;window.setTimeout('showMessage()', 40);}showMessage();</script>");
	return winObj;
}
function closeLoadingWindow(winObj)
{
	winObj.close();
}
function getHTTPObject()
{
	// code for Mozilla, etc.
	if (window.XMLHttpRequest)
  	{
  		xmlhttp=new XMLHttpRequest()
  	}
// code for IE
	else if (window.ActiveXObject)
  	{
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
  	}
	return xmlhttp;
}
function Highlight(e)
{
	if(e.className!="raw_selectedbg")
		e.className="mouseover";
}
function UnHighlight(e,classname)
{
	if(e.className!="raw_selectedbg")
		e.className=classname;
}
function openWindow(destination,height,width)
 {
	var targetWindow = destination;
	var x = Math.random();
	x = x * 1000;
	x = Math.round(x);
	var wind = "window" + x
	temp = window.open(targetWindow, wind, config='height=' + height + ',width=' + width + ',toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no, directories=no,status=yes,left=200,top=100');
}
function openPopupImageWindow(ImageName,ImagePath)
{
s=window.open('popup.php?page=enlarge&pid=1&popup=1&vImage='+ImageName+'&vImagepath='+ImagePath,'enlarged_view','toolbar=no,resizable=No,scrollbars=yes');
    s.focus();
    return false;
}
function openPopupImageWindow1(ImageName,ImagePath)
{
	s=window.open('popup1.php?page=enlarge&pid=1&popup=1&vImage='+ImageName+'&vImagepath='+ImagePath,'enlarged_view','toolbar=no,resizable=No,scrollbars=Yes,width=700, height=700');
	s.focus();
	//alert(ImagePath);
	return false;
}
function Delete_Image(tablename,fieldname,fieldid,value,Image)
{
	document.frmadd.mode.value='DeleteImage';
	//alert(tablename+" "+fieldname+" "+fieldid+" "+value);
	document.frmadd.TABLENAME.value=tablename;
	document.frmadd.FIELDNAME.value=fieldname;
	document.frmadd.FIELDID.value=fieldid;
	document.frmadd.FIELDVALUE.value=value;
	document.frmadd.IMAGEVALUE.value=Image;
	document.frmadd.submit();
}
/*	added by developer2	23-jan-2006		*/
function checkObjectNull(obj, msg)
{
	if("undefined" != typeof(obj.type))// If multiple value then return error
	{
		typeVal = obj.type
	}
	else
	{
		typeVal = obj[0].type
	}
	switch(typeVal)
	{
		case "text":
			if(obj.value=="")
			{
				alert(msg);
				obj.focus();
				return false;
			}
			break;
		case "radio":
			var tot = obj.length;
//				alert(tot);
			flag = 0;
			if(tot>0)// Return undefined if array of object 
			{
				for(i=0; i<tot ; i++)
				{
					if(obj[i].checked)
					{
						flag=1;
						break;
					}
				}
			}
			else
			{
				if(obj.checked)
					flag=1;
			}
			if(flag==0)
			{
				alert(msg);
				if(tot>=0) obj[0].focus();
				else obj.focus();
				return false;
			}
			break;
		case "checkbox":
			var tot = obj.length;
//				alert(tot);
			flag = 0;
			if(tot>0)// Return undefined if array of object 
			{
				for(i=0; i<tot ; i++)
				{
					if(obj[i].checked)
					{
						flag=1;
						break;
					}
				}
			}
			else
			{
				if(obj.checked)
					flag=1;
			}
			if(flag==0)
			{
				alert(msg);
				if(tot>=0) obj[0].focus();
				else obj.focus();
				return false;
			}
			break;
		case "select-one":			
			if(obj.selectedIndex==0)
			{
				alert(msg);					
				obj.focus();
				return false;
			}
			break;
		case "textarea":
			if(obj.value=="")
			{
				alert(msg);
				obj.focus();
				return false;
			}
			break;
		case "file":
			if(obj.value=="")
			{
				alert(msg);
				obj.focus();
				return false;
			}			
			break;
	}
	return true;
}
function checkValidImage(imageobj,iWidth,iHeight)
{
     var myImage;
     var error=0;
     var msg="";
     myImage = new Image();
     myImage.src=imageobj.value;
     // alert(myImage.height);
     //alert(myImage.width);
     if(myImage.width >iWidth)
     {
        msg="Image width must be less than or equal to"+iWidth+"Px\n";
        error=1;
     }
     if(myImage.height>iHeight)
     {
       msg+="Image Height must be less than or equal to"+iHeight+"Px";
        error=1;
     }
     if(error==1)
        {
          alert(msg);
          return false;
        }
    else
        return true;
}
function keyup(what ,maxKeys)
{
	var str = new String(what.value);
 	var len = str.length;
	var fullStr = what.value + " ";
	var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
	var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, "");
	var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
	var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " ");
	var splitString = cleanedStr.split(" ");
	var word_count = splitString.length -1;
	maxKeys=maxKeys;
	 if (word_count == maxKeys)
     {
       alert("Content should be limited to maximum "+maxKeys+" words only");
       return false;
 	}
}
//function added by Emp/072
function checkSpecialCharacter(obj,msg)
{
var string1 = new String(obj.value);
var iChars = "\"*|.,?_:<>[]{}';()@&$#%!~`^-+=\\/";
var stringlength=string1.length;
//alert(stringlength);
if(obj){
for ( i=0; i<string1.length; i++) {
if(iChars.indexOf(string1.charAt(i))!= -1){
 alert(msg);
//var string1=string1.substr(0,stringlength-1);
//alert(string1);
obj.focus();
return false;
       }
    }
}
else
    {
		return false;
	}
	return true;
}
//function added by Emp/072 (16 jan 2007)
//validation for radio buttons
function valButton(btn){
    var cnt = -1;
    for (var i=btn.length-1; i > -1; i--) {
        //alert(btn.length-1);
        if (btn[i].checked) {
          cnt = i;
          i = -1;
          }
    }
    if (cnt > -1) return btn[cnt].value;
    else return null;
}
function getStateName(country,selcstate)
{
  	if(country=="") {
	 alert("Select Country");
	 document.getElementById("vCountryCode").focus();
	 return false;
	}
	var url = "getstate.php?Code=";
	var isWorking = false;
	if (!isWorking)
	{
		catID = country;
			isWorking = true;
			//url += catID;
			url += catID+"&selcstate=";
            if(selcstate!='')
            {
              url+=selcstate;
            }
			if (window.XMLHttpRequest)
		  	{
		  		http_state=new XMLHttpRequest()
		  		http_state.open("GET",url, true);
			  	http_state.onreadystatechange=handleHttpResponse4
			  	http_state.send(null)
		  	}
			// code for IE
			else if (window.ActiveXObject)
		  	{
		  		http_state=new ActiveXObject("Microsoft.XMLHTTP");
		    	if (http_state)
		    	{
		    		http_state.open("GET",url, true);
		    		http_state.onreadystatechange=handleHttpResponse4
		    		http_state.send()
		    	}
		  	}
  	}//end if(!working))
	//if(!displayPopup)	closeLoadingWindow(winObj);
}//end functiongetStateName()
function handleHttpResponse4()
{
		var temp;
		var tmp_color;
		if (http_state.readyState == 4)
		{
			var xmlDocument = http_state.responseXML;
			var no = xmlDocument.getElementsByTagName('tot').item(0).firstChild.data;
			var selcstate=xmlDocument.getElementsByTagName('selcstate').item(0).firstChild.data;
			temp='<select name=vStateCode id=vState onchange="return getCity(this.value,\'\');">';
			temp+="<option value=''>Select One</option>";
			if(no>0)
			{
				for(i=0;i<no;i++)
				{
                    sel="";
					var iPId = xmlDocument.getElementsByTagName('optval').item(i).firstChild.data;
					var PName =xmlDocument.getElementsByTagName('opttext').item(i).firstChild.data;
					if(iPId==selcstate) {
                      sel=" selected "
                    }
					temp+="<option value="+iPId+""+sel+">"+PName+"</option>";
				}
			}else{
				temp +="";
			}
            /*
			if(no==0) {
              sel='';
              if(selcstate=="otherstates") {
                      sel=" selected ";
                      }
			//temp+="<option value='otherstates' "+sel+">Other States</option>";
			} */
			temp+="</select>";
            document.getElementById("disStatesreg").innerHTML=temp;
		}
}



function getCity(state,seleccity)
{
  
  vCountry=document.getElementById('vCountryCode').value;
  if(seleccity!='')
  {
        vCountry=document.getElementById('vCountryCode_hid').value;
  }
  	if(document.getElementById("vState").value=="" && seleccity=='')
      {
	    alert("Select State");
	    document.getElementById("vState").focus();
	    return false;
	  }
	var url = "getcity.php?Code=";
	var isWorking = false;
	if (!isWorking)
	{
		catID = state;
		country="&Country="+vCountry;
			isWorking = true;
			//url += catID+country;
			url += catID+country+"&selccity=";
			if(seleccity!='')
			{
               url+=seleccity;
            }
			if (window.XMLHttpRequest)
		  	{
		  		http=new XMLHttpRequest()
		  		http.open("GET",url, true);
			  	http.onreadystatechange=handleHttpResponse5
			  	http.send(null)
		  	}
			// code for IE
			else if (window.ActiveXObject)
		  	{
		  		http=new ActiveXObject("Microsoft.XMLHTTP")
		    	if (http)
		    	{
		    		http.open("GET",url, true);
		    		http.onreadystatechange=handleHttpResponse5
		    		http.send()
		    	}
		  	}
  	}//end if(!working))
	//if(!displayPopup)	closeLoadingWindow(winObj);
}
function handleHttpResponse5()
{
		var temp;
		var tmp_color;
		if (http.readyState == 4)
		{
			var xmlDocument = http.responseXML;
			//alert("CITY DATA:"+http.responseText);
			var no = xmlDocument.getElementsByTagName('tot').item(0).firstChild.data;
			var selccity= xmlDocument.getElementsByTagName('selccity').item(0).firstChild.data;
			//alert(no);
			//alert(selccity);
			temp="<select name=vCity id=vCity>";
			temp+="<option value=''>Select One</option>";
			if(no>0)
			{
				for(i=0;i<no;i++)
				{
                    sel="";
					var iPId = xmlDocument.getElementsByTagName('optval').item(i).firstChild.data;
					var PName =xmlDocument.getElementsByTagName('opttext').item(i).firstChild.data;
					if(iPId==selccity) {
                        sel=" selected ";
                    }
					temp+="<option value="+iPId+""+sel+">"+PName+"</option>";
				}
				temp+="<option value='otherCity'>Other City</option>";
			}else{
				temp +="";
			}
			if(no==0) {
              sel='';
              if(selccity=="otherCity") {
                      sel=" selected ";
                      //alert(sel);
                      }
			temp+="<option value='otherCity' "+sel+">Other City</option>";
			}
			temp+="</select>";
			/*
			alert(temp);
			return false;
			*/
			document.getElementById("disCity").innerHTML=temp;
		}
}



function getStateName2(country)
{
    //countryobj=country;
   // alert(document.getElementById("vCountry1").value);
	//stateobj=state;
	if(document.getElementById("vCountry1").value=="") {
      var temp="<select name=state id=vState1  style=width:116px class=INPUT>";
	 temp+="<option value=''>---All---</option>";
	 temp+="</select>";
	document.getElementById("disStates1").innerHTML=temp;
     return false;
      }
    var url = "getstate.php?Code=";
	//alert(url);
	var isWorking = false;
	if (!isWorking)
	{
		catID = country;
			isWorking = true;
			url += catID;
			if (window.XMLHttpRequest)
		  	{
		  		http=new XMLHttpRequest()
		  		http.open("GET",url, true);
			  	http.onreadystatechange=handleHttpResponse8
			  	http.send(null)
		  	}
			// code for IE
			else if (window.ActiveXObject)
		  	{
		  		http=new ActiveXObject("Microsoft.XMLHTTP")
		    	if (http)
		    	{
		    		http.open("GET",url, true);
		    		http.onreadystatechange=handleHttpResponse8
		    		http.send()
		    	}
		  	}
  	}//end if(!working))
	//if(!displayPopup)	closeLoadingWindow(winObj);
}//end functiongetStateName()
function handleHttpResponse8()
{
		var temp;
		var tmp_color;
		if (http.readyState == 4)
		{
			var xmlDocument = http.responseXML;
			//alert(http.responseText);
			var no = xmlDocument.getElementsByTagName('tot').item(0).firstChild.data;
		//alert(no);
			temp='<select name=state id=vState1 style=width:116px class=INPUT>';
            temp+="<option value=''>------ All ------</option>";
			if(no>0)
			{
				for(i=0;i<no;i++)
				{
					var iPId = xmlDocument.getElementsByTagName('optval').item(i).firstChild.data;
					var PName =xmlDocument.getElementsByTagName('opttext').item(i).firstChild.data;
					temp+="<option value="+iPId+">"+PName+"</option>";
				
				}
					temp+="<option value='otherstates'>Other States</option>";
			}else{
				temp +="";
			}
			if(no==0) {
			temp+="<option value='otherstates'>Other States</option>";
			}
			temp+="</select>";
			document.getElementById("disStates1").innerHTML=temp;
		}
}

function getC(state)
{
   if(state=='otherstates')
  {
      document.getElementById("otstate").style.display="";
      
  }
  else
  {
     document.getElementById("otstate").style.display="none";
    
  }
}

function getStateName1(country)
{
    
	if(document.getElementById("vCountry").value=="") {
	// alert("Select Country");
	 //document.getElementById("disStates").innerHTML="";
	// document.getElementById("disCity").innerHTML="";
	 //document.getElementById("vCountry").focus();
	 var temp="<select name=state id=vState  style=width:80px>";
	 temp+="<option value=''>---All---</option>";
	 temp+="</select>";
	document.getElementById("disStates").innerHTML=temp;
  return false;
	}
	var url = "getstate.php?Code=";
	var isWorking = false;
	if (!isWorking)
	{
		catID = country;
			isWorking = true;
			url += catID;
			if (window.XMLHttpRequest)
		  	{
		  		http=new XMLHttpRequest()
		  		http.open("GET",url, true);
			  	http.onreadystatechange=handleHttpResponse7
			  	http.send(null)
		  	}
			// code for IE
			else if (window.ActiveXObject)
		  	{
		  		http=new ActiveXObject("Microsoft.XMLHTTP")
		    	if (http)
		    	{
		    		http.open("GET",url, true);
		    		http.onreadystatechange=handleHttpResponse7
		    		http.send()
		    	}
		  	}
  	}//end if(!working))
	//if(!displayPopup)	closeLoadingWindow(winObj);
}//end functiongetStateName1()
function handleHttpResponse7()
{
		var temp;
		var tmp_color;
		if (http.readyState == 4)
		{
			var xmlDocument = http.responseXML;
			//alert(http.responseText);
			//var no = xmlDocument.getElementsByTagName('Id').length;
			//var no1=xmlDocument.getElementsByTagName('tot').length;
			//alert(xmlDocument.getElementsByTagName('sql').item(0).firstChild.data);return false;
			var no = xmlDocument.getElementsByTagName('tot').item(0).firstChild.data;
			//alert(no);
			temp='<select name=state id=vState  style=width:80px onchange="getotstate(this.value)">';
			temp+="<option value='0'>Select One</option>";
			if(no>0)
			{
				for(i=0;i<no;i++)
				{
					var iPId = xmlDocument.getElementsByTagName('optval').item(i).firstChild.data;
					var PName =xmlDocument.getElementsByTagName('opttext').item(i).firstChild.data;
					temp+="<option value="+iPId+">"+PName+"</option>";
					
				}
				temp+="<option value='otherstates'>Other States</option>";
			}else{
				temp +="";
			}
			if(no==0) {
			temp+="<option value='otherstates'>Other States</option>";
			}
			temp+="</select>";
			/*
			alert(temp);
			return false;
			*/
			document.getElementById("disStates").innerHTML=temp;
		}
}
function getotstate(state)
{
    if(state=='otherstates')
    {
      document.getElementById("otstate1").style.display="";
    }
     else
    {
     document.getElementById("otstate1").style.display="none";
  }
}
function focuschange(obj)
{
	if(obj.name=="vEmail")
  	{
    	if(obj.value=="UserName")
    	    obj.value='';
  	}else if(obj.name=="vPassword1" || obj.name=="vPassword"){
  		if( obj.value=="Password")
    	{
			document.getElementById('intpwd').style.display="none";
        	document.getElementById('aftpwd').style.display="";
			document.getElementById('vPasswords').focus();
    	}
  	}
  	else if(obj.name=="SubscribeEmail")
  	{
        if(obj.value=="Enter your email Address")
            obj.value="";
    }
    else if(obj.name="SubscribeName")
    {
        if(obj.value=="Enter your Name")
            obj.value="";
    }
}
function blurchange(obj)
{
	if(obj.name=="vEmail")
	{
    	if(obj.value=="")
    	    obj.value="UserName";
  	}else if(obj.name=="vPassword" || obj.name=="vPassword1"){
    	if(obj.value=="")
    	{
        	document.getElementById('aftpwd').style.display="none";
        	document.getElementById('intpwd').style.display="";
    	}
  	}
  	else if(obj.name=="SubscribeEmail")
  	{
        if(obj.value=="")
            obj.value="Enter your email Address";
    }
    else if(obj.name=="SubscribeName")
    {
        if(obj.value=="")
            obj.value="Enter your Name";
    }
}
//To get other states and cities in property only
function getStateNameProp(country,selcstate)
{
	if(country=="") {
	 alert("Select Country");
	 document.getElementById("vCountrys").focus();
	 return false;
	}
	var url = "getstate.php?Code=";
	var isWorking = false;
	if (!isWorking)
	{
		catID = country;
			isWorking = true;
		//	url += catID;
            url += catID+"&selcstate=";
            if(selcstate!='')
            {
              url+=selcstate;
            }
			if (window.XMLHttpRequest)
		  	{
		  		http_state_prop=new XMLHttpRequest()
		  		http_state_prop.open("GET",url, true);
			  	http_state_prop.onreadystatechange=handleHttpResponseStateProp
			  	http_state_prop.send(null)
		  	}
			// code for IE
			else if (window.ActiveXObject)
		  	{
		  		http_state_prop=new ActiveXObject("Microsoft.XMLHTTP")
		    	if (http_state_prop)
		    	{
		    		http_state_prop.open("GET",url, true);
		    		http_state_prop.onreadystatechange=handleHttpResponseStateProp
		    		http_state_prop.send()
		    	}
		  	}
  	}//end if(!working))
	//if(!displayPopup)	closeLoadingWindow(winObj);
}//end functiongetStateName()
function handleHttpResponseStateProp()
{
		var temp;
		var tmp_color;
		if (http_state_prop.readyState == 4)
		{
			var xmlDocument = http_state_prop.responseXML;
			//alert(http_state_prop.responseText);
			var no = xmlDocument.getElementsByTagName('tot').item(0).firstChild.data;
			//alert(no);
			//temp="<select name=vStateCode id=vState onchange='return getCityProp(this.value)'>";
			temp='<select name=vStateCode id=vState onchange="return getCityProp(this.value,\'\')">';
			var selcstate=xmlDocument.getElementsByTagName('selcstate').item(0).firstChild.data;
			temp+="<option value=''>-------Select State-----</option>";
			if(no>0)
			{
				for(i=0;i<no;i++)
				{
                     statesel="";
					var iPId = xmlDocument.getElementsByTagName('optval').item(i).firstChild.data;
					var PName =xmlDocument.getElementsByTagName('opttext').item(i).firstChild.data;
					if(iPId==selcstate) {
                      statesel=" selected "
                    }
					temp+="<option value="+iPId+""+statesel+">"+PName+"</option>";
				}
				statesel="";
				if(selcstate=="otherstates") {
                      statesel=" selected ";
                      }
				temp+="<option value='otherstates' "+statesel+">Other States</option>";
			}else{
				temp +="";
			}
			if(no==0) {
              statesel='';
              if(selcstate=="otherstates") {
                      statesel=" selected ";
                      }
			temp+="<option value='otherstates' "+statesel+">Other States</option>";
			}
			temp+="</select>";
			document.getElementById("disStatesProp").innerHTML=temp;
		}
}
function getCityProp(state,seleccity)
{
  vCountry=document.getElementById('vCountrys').value;
  if(seleccity!='')
  {
        vCountry=document.getElementById('vCountrys_hid').value;
  }
  	if(document.getElementById("vState").value=="" && seleccity=='')
      {
	    alert("Select State");
	    document.getElementById("vState").focus();
	    return false;
	  }
	var url = "getcity.php?Code=";
	var isWorking = false;
	if (!isWorking)
	{
		catID = state;
		country="&Country="+vCountry;
			isWorking = true;
		//	url += catID+country;
		url += catID+country+"&selccity=";
			if(seleccity!='')
			{
               url+=seleccity;
            }
			//alert(url);
			if (window.XMLHttpRequest)
		  	{
		  		http_city_prop=new XMLHttpRequest()
		  		http_city_prop.open("GET",url, true);
			  	http_city_prop.onreadystatechange=handleHttpResponseCityProp
			  	http_city_prop.send(null)
		  	}
			// code for IE
			else if (window.ActiveXObject)
		  	{
		  		http_city_prop=new ActiveXObject("Microsoft.XMLHTTP")
		    	if (http_city_prop)
		    	{
		    		http_city_prop.open("GET",url, true);
		    		http_city_prop.onreadystatechange=handleHttpResponseCityProp
		    		http_city_prop.send()
		    	}
		  	}
  	}
      if(state=="otherstates")
      {
        document.getElementById("cit").style.display="none";
        document.getElementById("otcity").style.display="";
        document.getElementById("otstates").style.display="";
        document.getElementById("stname").style.display="";
        document.getElementById("stcol").style.display="";
        document.getElementById("ctname").style.display="";
        document.getElementById("ctcol").style.display="";
      }
      else
      {
        document.getElementById("otstates").style.display="none";
        document.getElementById("otcity").style.display="none";
        document.getElementById("cit").style.display="";
        document.getElementById("stname").style.display="none";
        document.getElementById("stcol").style.display="none";
        document.getElementById("ctname").style.display="none";
        document.getElementById("ctcol").style.display="none";
      }//end if(!working))
//      if(seleccity==')
	//if(!displayPopup)	closeLoadingWindow(winObj);
}
function handleHttpResponseCityProp()
{
		var temp;
		var temp1;
		var temp2;
		var tmp_color;
		if (http_city_prop.readyState == 4)
		{
			var xmlDocument = http_city_prop.responseXML;
			//alert(http_city_prop.responseText);
			var no = xmlDocument.getElementsByTagName('tot').item(0).firstChild.data;
			var state1=xmlDocument.getElementsByTagName('state').item(0).firstChild.data;
			var selccity= xmlDocument.getElementsByTagName('selccity').item(0).firstChild.data;
			if(state1=="otherstates")
			{
              temp1='<input type="text" name="vOtherState" id="otstate">';
              document.getElementById("disotherstateprop").innerHTML=temp1;
              temp2='<input type="text" name="vOtherCity" id="otcity">';
              document.getElementById("disothercityprop").innerHTML=temp2;
              if(selccity!="-")
              {
                  document.frmPropertyadd.vOtherCity.value=document.frmPropertyadd.vOtherCity_hid.value;
                  document.frmPropertyadd.vOtherState.value=document.frmPropertyadd.vOtherState_hid.value;
              }
             // alert(document.getElementById('disotherstate').innerHTML);alert(document.getElementById('disotherstate').innerHTML);
            }
            else{
              temp1="";
            temp='<select name=vCity id=vCity onChange="return getText(this.value,\'\');">';
			temp+="<option value=''>-------Select City-----</option>";
			othcity_hid=document.frmPropertyadd.vOtherCity_hid.value;
			if(no>0)
			{
				for(i=0;i<no;i++)
				{
                    citysel="";
					var iPId = xmlDocument.getElementsByTagName('optval').item(i).firstChild.data;
					var PName =xmlDocument.getElementsByTagName('opttext').item(i).firstChild.data;
					if(iPId==selccity) {
                        citysel=" selected ";
                    }
					temp+="<option value="+iPId+""+citysel+">"+PName+"</option>";
					//alert(temp);
				}
				citysel="";
				if(selccity=="otherCity")
                {
                    citysel=" selected ";
                    getText(selccity,othcity_hid);
                }
				temp+="<option value='otherCity' "+citysel+">Other City</option>";
			}else{
				temp +="";
			}
			if(no==0) {
              citysel="";
              if(selccity=="otherCity") {
                      citysel=" selected ";
                      getText(selccity,othcity_hid);
                      }
			temp+="<option value='otherCity' "+citysel+">Other City</option>";
			}
			temp+="</select>";
	     	document.getElementById("disCityProp").innerHTML=temp;
            }
		}
}
function getText(val,othcity)
{
  if(val=="otherCity")
  {
    document.getElementById("otcity").style.display="";
    document.getElementById("ctname").style.display="";
    document.getElementById("ctcol").style.display="";
    tempCityProp='<input type="text" name="vOtherCity" id="otcity">';
    document.getElementById("disothercityprop").innerHTML=tempCityProp;
    if(othcity!='')
        document.frmPropertyadd.vOtherCity.value=othcity;
  }
  else
  {
    document.getElementById("otcity").style.display="none";
    document.getElementById("ctname").style.display="none";
    document.getElementById("ctcol").style.display="none";
  }
  return false;
}


//For member section
function getStateNameMember(country,Memselcstate)
{
	if(country=="") {
	 alert("Select Country");
	 document.getElementById("vCountryCode").focus();
	 return false;
	}
	var url = "getstate.php?Code=";
	var isWorking = false;
	if (!isWorking)
	{
		catID = country;
			isWorking = true;
		//	url += catID;
            url += catID+"&selcstate=";
            if(Memselcstate!='')
            {
              url+=Memselcstate;
            }   // alert(url);//return false;
			if (window.XMLHttpRequest)
		  	{
		  		http_state_Member=new XMLHttpRequest()
		  		http_state_Member.open("GET",url, true);
			  	http_state_Member.onreadystatechange=handleHttpResponseStateMember
			  	http_state_Member.send(null)
		  	}
			// code for IE
			else if (window.ActiveXObject)
		  	{
		  		http_state_Member=new ActiveXObject("Microsoft.XMLHTTP")
		    	if (http_state_Member)
		    	{
		    		http_state_Member.open("GET",url, true);
		    		http_state_Member.onreadystatechange=handleHttpResponseStateMember
		    		http_state_Member.send()
		    	}
		  	}
  	}//end if(!working))
	//if(!displayPopup)	closeLoadingWindow(winObj);
}//end functiongetStateName()
function handleHttpResponseStateMember()
{
		var temp;
		var tmp_color;
		if (http_state_Member.readyState == 4)
		{
			var xmlDocument = http_state_Member.responseXML;
			//alert(http_state_Member.responseText);
			var no = xmlDocument.getElementsByTagName('tot').item(0).firstChild.data;
			//alert(no);
			//temp="<select name=vStateCode id=vState onchange='return getCityProp(this.value)'>";
			//temp='<select name=vStateCode id=vState onchange="return getStateText(this.value,\'\')" class="INPUT">';
			temp='<select name="vState" id="vState" class="INPUT">';
			var selcstate=xmlDocument.getElementsByTagName('selcstate').item(0).firstChild.data;
			temp+="<option value=''>--Select State-----</option>";
			if(no>0)
			{
				for(i=0;i<no;i++)
				{
                     statesel="";
					var iPId = xmlDocument.getElementsByTagName('optval').item(i).firstChild.data;
					var PName =xmlDocument.getElementsByTagName('opttext').item(i).firstChild.data;
					if(iPId==selcstate) {
                      statesel=" selected "
                    }
					temp+="<option value='"+iPId+"'"+statesel+">"+PName+"</option>";
				}   ;
				/*statesel="";
				if(selcstate=="otherstates") {
                      statesel=" selected ";
                      }
				temp+="<option value='otherstates' "+statesel+">Other States</option>";
				*/
			}else{
				temp +="";
			}
/*			if(no==0) {
              statesel='';
              if(selcstate=="otherstates") {
                      statesel=" selected ";
                      }
			temp+="<option value='otherstates' "+statesel+">Other States</option>";
			}     */
			temp+="</select>";
			document.getElementById("disStatesMember").innerHTML=temp;
		}
}
function getCityMember(Memstate,Memseleccity)
{
  vCountry=document.getElementById('vCountryCode').value;
  if(Memseleccity!='')
  {
      vCountry=document.getElementById('vCountrys_hid').value;
  }
  	if(document.getElementById("vState").value=="" && Memseleccity=="")
      {
	    alert("Select State");
	    document.getElementById("Memotstates").style.display="none";
        document.getElementById("Memotcity").style.display="none";
        document.getElementById("Memcits").style.display="";
        document.getElementById("Memstname").style.display="none";
        document.getElementById("Memstcol").style.display="none";
        document.getElementById("Memctname").style.display="none";
        document.getElementById("Memctcol").style.display="none";
	    document.getElementById("vState").focus();
	    return false;
	  }
/*	var url = "getcity.php?Code=";
	var isWorking = false;
	if (!isWorking)
	{
		catID = Memstate;
		country="&Country="+vCountry;
			isWorking = true;
		//	url += catID+country;
		url += catID+country+"&selccity=";
		//alert(url);return false;
			if(Memseleccity!='')
			{
               url+=Memseleccity;
            }
			//alert(url);
			if (window.XMLHttpRequest)
		  	{
		  		http_city_Member=new XMLHttpRequest()
		  		http_city_Member.open("GET",url, true);
			  	http_city_Member.onreadystatechange=handleHttpResponseCityMember
			  	http_city_Member.send(null)
		  	}
			// code for IE
			else if (window.ActiveXObject)
		  	{
		  		http_city_Member=new ActiveXObject("Microsoft.XMLHTTP")
		    	if (http_city_Member)
		    	{
		    		http_city_Member.open("GET",url, true);
		    		http_city_Member.onreadystatechange=handleHttpResponseCityMember
		    		http_city_Member.send()
		    	}
		  	}
  	}*/
  	//alert(Memstate);
      if(Memstate=="otherstates")
      {
        document.getElementById("Memstname").style.display="";
        document.getElementById("Memstcol").style.display="";
        document.getElementById("Memotstates").style.display="";
      }
      else
      {
        document.getElementById("Memotstates").style.display="none";
        document.getElementById("Memstname").style.display="none";
        document.getElementById("Memstcol").style.display="none";
      }//end if(!working))
//      if(seleccity==')
	//if(!displayPopup)	closeLoadingWindow(winObj);
}
function handleHttpResponseCityMember()
{
		var temp;
		var temp1;
		var temp2;
		var tmp_color;
		if (http_city_Member.readyState == 4)
		{
			var xmlDocument = http_city_Member.responseXML;
			var no = xmlDocument.getElementsByTagName('tot').item(0).firstChild.data;
			var memstate1=xmlDocument.getElementsByTagName('state').item(0).firstChild.data;
			//alert(memstate1);
			var memselccity= xmlDocument.getElementsByTagName('selccity').item(0).firstChild.data;
			if(memstate1=="otherstates")
			{
              //document.getElementById('Memotstates').style.display='';
              temp1='<input type="text" name="vOtherState" id="Memotstate">';
              document.getElementById("disotherstateMem").innerHTML=temp1;
              temp2='<input type="text" name="vOtherCity" id="Memotcity">';
              document.getElementById("disothercityMem").innerHTML=temp2;
              if(memselccity!="-")
              {
                  document.frmStuadd.vOtherCity.value=document.frmStuadd.vOtherCity_hid.value;
                  document.frmStuadd.vOtherState.value=document.frmStuadd.vOtherState_hid.value;
              }
            }
            else{
              //document.getElementById('Memotstates').style.display='none';
              temp1="";
            temp='<select name=vCity id=vCity onChange="return getCityText(this.value,\'\');">';
			temp+="<option value=''>--Select City-----</option>";
			othcity_hid=document.frmStuadd.vOtherCity_hid.value;
			if(no>0)
			{
				for(i=0;i<no;i++)
				{
                    memcitysel="";
					var iPId = xmlDocument.getElementsByTagName('optval').item(i).firstChild.data;
					var PName =xmlDocument.getElementsByTagName('opttext').item(i).firstChild.data;
					if(iPId==memselccity) {
                        memcitysel=" selected ";
                    }
					temp+="<option value="+iPId+""+memcitysel+">"+PName+"</option>";
					//alert(temp);
				}
				memcitysel="";
				if(memselccity=="otherCity")
                {
                    memcitysel=" selected ";
                    getCityText(memselccity,othcity_hid);
                }
				temp+="<option value='otherCity' "+memcitysel+">Other City</option>";
			}else{
				temp +="";
			}
			if(no==0) {
              memcitysel="";
              if(memselccity=="otherCity") {
                      memcitysel=" selected ";
                      getCityText(memselccity,othcity_hid);
                      }
			temp+="<option value='otherCity' "+memcitysel+">Other City</option>";
			}
			temp+="</select>";
	     	document.getElementById("disCityMember").innerHTML=temp;
	     	//alert(temp);
            }
		}
}


function getCityText(vals,othrcity)
{
  
  if(vals=="otherstates")
  {
    document.getElementById("Memotcity").style.display="";
    document.getElementById("Memctname").style.display="";
    document.getElementById("Memctcol").style.display="";
    tempcity='<input type="text" name="vOtherCity" id="Memotcity">';
    document.getElementById("disothercityMem").innerHTML=tempcity;
    if(othrcity!='')
        document.frmStuadd.vOtherCity.value=othrcity;
  }
  else
  {
    document.getElementById("Memotcity").style.display="none";
    document.getElementById("Memctname").style.display="none";
    document.getElementById("Memctcol").style.display="none";
  }
  return false;
}
function getStateText(vals,othrstate)
{  //alert(vals);
  if(vals=="otherstates")
  {
        document.getElementById("Memstname").style.display="";
        document.getElementById("Memstcol").style.display="";
        document.getElementById("Memotstates").style.display="";
}
      else
      {
        document.getElementById("Memotstates").style.display="none";
        document.getElementById("Memstname").style.display="none";
        document.getElementById("Memstcol").style.display="none";
      }
/*
  if(vals=="otherCity")
  {
    document.getElementById("Memotcity").style.display="";
    document.getElementById("Memctname").style.display="";
    document.getElementById("Memctcol").style.display="";
    tempcity='<input type="text" name="vOtherCity" id="Memotcity">';
    document.getElementById("disothercityMem").innerHTML=tempcity;
    if(othrcity!='')
        document.frmStuadd.vOtherCity.value=othrcity;
  }
  else
  {
    document.getElementById("Memotcity").style.display="none";
    document.getElementById("Memctname").style.display="none";
    document.getElementById("Memctcol").style.display="none";
  }*/
  return false;
}

//confirm to send empty mail to the member regarding Inquiry
function checkConfirm(frm)
{
  with(frm)
  {
    if(frm.vEmail.value!="")
    {
      if(frm.vComments.value=="")
      {
        if(!confirm("Confirm to Send Empty Comments to the Member"))
		return false;
      }
    }
  }
}


function checkNumber(e)
{
    var unicode=e.charCode? e.charCode : e.keyCode
    if (unicode!=8){ //if the key isn't the backspace key (which we should allow)
        if (unicode<48||unicode>57) //if not a number
            return false; //disable key press
}
}
function checkPhoneNumber(e)
{
    var unicode=e.charCode? e.charCode : e.keyCode
    if (unicode!=8){ //if the key isn't the backspace key (which we should allow)
		if(unicode==9 ||unicode ==40 || unicode ==41 || unicode ==43 || unicode ==45 || unicode ==46 || unicode ==32)
		   return true
        if (!(unicode<=57 && unicode>=48)) //if not a number
            return false; //disable key press
			
} 
}

function checkZipCode(events)
{
    var unicodes=events.charCode? events.charCode :events.keyCode	
    if (unicodes!=8){ //if the key isn't the backspace key (which we should allow)
        if((unicodes>47 && unicodes<58)||(unicodes>64 && unicodes<91) || (unicodes>96 && unicodes<123))
            return true;
		else
			return false;	 //disable key press
}
}

function checkValidCheque(events)
{
    var unicodes=events.charCode? events.charCode :events.keyCode;
	if (unicodes!=8){ //if the key isn't the backspace key (which we should allow)
        if((unicodes>43 && unicodes<60)||(unicodes>64 && unicodes<91) || (unicodes>96 && unicodes<125)|| unicodes==40 || unicodes==41 || unicodes==32 || unicodes==13)
            return true;
		else
			return false;	 //disable key press
}
}

//function to confirm to delete the property
function deleteProperty(iPropertyId)
{
  	if(!confirm("Confirm to Delete Property"))
		return false;
    document.frmViewProperty.iPropertyId.value=iPropertyId;
    document.frmViewProperty.action="index.php?file=mem-propertyadd_a&mode=delete";
 	document.frmViewProperty.submit();
}

