
function PropertyRelatedValidation()
{
    var strd;
    if (document.form1.txtPropertyName1.value=="")
	{
		strd=document.form1.MRF1.value;
		alert(strd);
		document.form1.txtPropertyName1.focus();
		return false;
	}
    if (document.form1.cmbpropertytype.value == "")
	{
		strd=document.form1.MRF2.value;
		alert(strd);
		document.form1.cmbpropertytype.focus();
		return false;
	}
	//if (document.form1.cmbRegion.value == "")
	//{
	//	strd=document.form1.MRF3.value;
	//	alert(strd);
	//	document.form1.cmbRegion.focus();
	//	return false;
	//}
	
	if (document.form1.cmbCountry.value == "")
	{
		strd="Please enter Country";
		alert(strd);
		document.form1.cmbCountry.focus();
		return false;
	}
	//if (document.form1.cmbLocations.value=="")
	//{
	//	strd="Please enter Location";
	//	alert(strd);
	//	document.form1.cmbLocations.focus();
	//	return false;
	//}
	
	if (document.form1.txtMinSelPrice.value=="")
	{
		strd="Please enter price";
		alert(strd);
		document.form1.txtMinSelPrice.focus();
		return false;
	}
	if (document.form1.txtMinSelPrice.value==" ")
	{
		strd="No spaces Allowed";
		alert(strd);
		document.form1.txtMinSelPrice.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.form1.txtMinSelPrice.value))
    {
      	alert("Please enter numeric value in Min. Selling Price.");
		document.form1.txtMinSelPrice.focus();
		return false;
    }
	/*if (document.form1.txtMaxSelPrice.value=="")
	{
		strd="Please enter max price";
		alert(strd);
		document.form1.txtMaxSelPrice.focus();
		return false;
	}
	if (document.form1.txtMaxSelPrice.value==" ")
	{
		strd="No spaces Allowed";
		alert(strd);
		document.form1.txtMaxSelPrice.focus();
		return false;
	}*/
//	if (!anum.test(document.form1.txtMaxSelPrice.value))
//    {
//      	alert("Please enter numeric value in Max. Selling Price.");
//		document.form1.txtMaxSelPrice.focus();
//		return false;
//    }
//	var anum=/(^\d+$)|(^\d+\.\d+$)/
//	if (!anum.test(document.form1.txtSellingPrize.value))
//    {
//      	alert("Please enter numeric value in Selling Price.");
//		document.form1.txtSellingPrize.focus();
//		return false;
//    }
//	if (document.form1.cmbBuildYear.value == "")
//	{
//		strd=document.form1.MRF7.value;
//		alert(strd);
//		document.form1.cmbBuildYear.focus();
//		return false;
//	}
	
	/*if (document.form1.ddBedRooms.value=="")
	{
		alert("Please enter No. of Bedrooms");
		document.form1.txtNoofBeedRooms.focus();
		return false;
	}
	if (document.form1.txtNoofBeedRooms.value==" ")
	{
		strd="No spaces Allowed";
		alert(strd);
		document.form1.txtNoofBeedRooms.focus();
		return false;
	}
	if (!anum.test(document.form1.txtNoofBeedRooms.value))
    {
      	alert("Please enter numeric value in No. of Bedrooms.");
		document.form1.txtNoofBeedRooms.focus();
		return false;
    }
    if (document.form1.txtNoofBathRooms.value==" ")
	{
		strd="No spaces Allowed";
		alert(strd);
		document.form1.txtNoofBathRooms.focus();
		return false;
	}
	if (!anum.test(document.form1.txtNoofBathRooms.value))
    {
      	alert("Please enter numeric value in No. of Bathrooms.");
		document.form1.txtNoofBathRooms.focus();
		return false;
    }
	if (document.form1.ddBathRooms.value=="")
	{
		//strd=document.form1.MRF8.value;
		alert("Please enter No. of Bathrooms");
		document.form1.ddBathRooms.focus();
		return false;
	}*/
	
//	if (document.form1.txtSortOrder.value=="")
//	{
//		//strd=document.form1.MRF8.value;
//		alert("Please enter sort order");
//		document.form1.txtSortOrder.focus();
//		return false;
//	}
//	if (document.form1.txtSortOrder.value==" ")
//	{
//		strd="No spaces Allowed";
//		alert(strd);
//		document.form1.txtSortOrder.focus();
//		return false;
//	}
//	if (!anum.test(document.form1.txtSortOrder.value))
//    {
//      	alert("Please enter numeric value in sort order.");
//		document.form1.txtSortOrder.focus();
//		return false;
//    }
//	var anum=/(^\d+$)|(^\d+\\d+$)/
//	if (!anum.test(document.form1.txtNoofBeedRooms.value))
//    {
//        alert("Please enter numeric value in Number of Bedrooms.");
//        document.form1.txtNoofBeedRooms.focus();
//		return false;
//    }
}  
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		nav_01_over = newImage("images/nav_01-over.jpg");
		nav_02_over = newImage("images/nav_02-over.jpg");
		nav_03_over = newImage("images/nav_03-over.jpg");
		nav_04_over = newImage("images/nav_04-over.jpg");
		nav_05_over = newImage("images/nav_05-over.jpg");
		preloadFlag = true;
	}
}


function validatefaq()
{
	if (document.frmFaq.search.value == "" || document.frmFaq.search.value == "Enter faq item")
	{
		alert("Enter text for search");
		document.frmFaq.search.focus();
		return false;
	}
	frmFaq.action="faqdetails.aspx?flag=2&search="+document.frmFaq.search.value;
	return true;
}

function ValidateProfile()
{
	var UrlPat =  /^(www\.)?[A-Za-z0-9_\-]+\.(com|org|net|mil|edu|ca|co.uk|com.au|gov|com.cy)$/;
 	var matchUrl = Form2.txtWebUrl.value.match(UrlPat);
 	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form2.txtEmail.value.match(emailPat);
	if(document.Form2.txtFName.value=="")
	{  
		alert("First name required");
		document.Form2.txtFName.focus();
		return false;
	}
	if(document.Form2.txtFName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.txtFName.focus();
		return false;
	}
	if(document.Form2.txtWebUrl.value!="")
	{
	    if (matchUrl == null)
	    {
		    alert("Invalid URL format");
		    document.Form2.txtWebUrl.focus();
		    return false;
	    }
	}
	
	if(document.Form2.txtEmail.value=="")
	{
		alert("Email required");
		document.Form2.txtEmail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.Form2.txtEmail.focus();
		return false;
	}
	
	if(document.Form2.ddlCountry.value==".::Please Select::.")
	{
		alert("Country required");
		return false;
	}
	if(document.Form2.CodeNumberTextBox.value=="")
	{
		alert("Verification code required");
		document.Form2.CodeNumberTextBox.focus();
		return false;
	}
	/*if(document.Form2.Profile1_txtAns.value=="")
	{
		alert("Answer required");
		document.Form2.Profile1_txtAns.focus();
		return false;
	}
	if(document.Form2.Profile1_txtAns.value.charAt(0)==' ')
	{    alert("No spaces allowed.\n");
	document.Form2.Profile1_txtAns.focus(); 
	return false;
	 }*/
	return true;
}


//Home Owner Registration Validation
function ValidateHomeOwnerProfile()
{	
	//var UrlPat =  /^(www\.)?[A-Za-z0-9_\-]+\.(com|org|net|mil|edu|ca|co.uk|com.au|gov|com.cy)$/;
 //	var matchUrl = Form2.txtWebUrl.value.match(UrlPat);
 	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form2.txtEmail.value.match(emailPat);
	if(document.Form2.txtFName.value=="")
	{  
		alert("First name required");
		document.Form2.txtFName.focus();
		return false;
	}
	if(document.Form2.txtFName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.txtFName.focus();
		return false;
	}
	
	if(document.Form2.txtUserName.value=="")
	{
		alert("User name required");
		document.Form2.txtUserName.focus();
		return false;
	}
	if(document.Form2.txtUserName.value=="")
	{
		alert("User name required");
		document.Form2.txtUserName.focus();
		return false;
	}
	if(document.Form2.txtUserName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.txtUserName.focus();
		return false; 
    }
	if(document.Form2.txtPassword.value=="")
	{
		alert("Password required");
		document.Form2.txtPassword.focus();
		return false;
	}
	if(document.Form2.txtPassword.value.charAt(0)==' ')
	{   
	    alert("No spaces allowed.\n"); 
		document.Form2.txtPassword.focus();
		return false;
	 }
	if(document.Form2.txtEmail.value=="")
	{
		alert("Email required");
		document.Form2.txtEmail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.Form2.txtEmail.focus();
		return false;
	}
	
	if(document.Form2.ddlCountry.value==".::Please Select::.")
	{
		alert("Country required");
		return false;
	}
	//Radiobuttonlist validation
	var chkList1= document.getElementById ("rdoproperty");
    var arrayOfCheckBoxes= chkList1.getElementsByTagName("input");
    var j=0;
    for(var i=0;i<arrayOfCheckBoxes.length;i++)
    {
     if(arrayOfCheckBoxes[i].checked)
     j=1;             
    }
    if(j==0)
    {
     alert("please select the no of properties you want to list!");
     return false;
     }
	if(document.Form2.CodeNumberTextBox.value=="")
	{
		alert("Verification code required");
		document.Form2.CodeNumberTextBox.focus();
		return false;
	}
	
	/*if(document.Form2.Profile1_txtAns.value=="")
	{
		alert("Answer required");
		document.Form2.Profile1_txtAns.focus();
		return false;
	}
	if(document.Form2.Profile1_txtAns.value.charAt(0)==' ')
	{    alert("No spaces allowed.\n");
	document.Form2.Profile1_txtAns.focus(); 
	return false;
	 }*/
	return true;
}


function ValidateFaqDetails()
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = form1.txtMail.value.match(emailPat);
	if(document.form1.txtMail.value=="" || document.form1.txtMail.value== "Enter your email")
	{
		alert("Email required");
		document.form1.txtMail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.form1.txtMail.focus();
		return false;
	}
	if(document.form1.txtArea.value=="")
	{
		alert("Question required");
		document.form1.txtArea.focus();
		return false;
	}
	return true;
}
function ValidateContactUs()
{
 	var ErrMsg="";
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = form1.txtEmail.value.match(emailPat);
   
	if(document.form1.txtFname.value=="" || document.form1.txtFname.value==" ")
	{
		
	   strd=document.form1.MRF5.value;
	   alert(strd);
	   document.form1.txtFname.focus();
	   return false;
	}
	 if(document.form1.txtLName.value=="" || document.form1.txtLName.value==" ")
	{  
	   strd=document.form1.MRF2.value;
	   alert(strd);
	   document.form1.txtLName.focus();
	   return false;
	}
	if(document.form1.txtEmail.value=="")
	{
	   strd=document.form1.MRF3.value;
	   alert(strd);
	   document.form1.txtEmail.focus();
	   return false;
	}
	else if (matchArray == null)
	{
		strd=document.form1.MRF4.value;
	    alert(strd);
		document.form1.txtEmail.focus();
		return false;
	}
    if(document.form1.txtPhone.value=="" || document.form1.txtPhone.value==" ")
	{
		strd=document.form1.MRF1.value;
	   alert(strd);
	   document.form1.txtPhone.focus();
	   return false;
	}
	if(document.form1.CodeNumberTextBox.value=="")
	{
		alert("Verification code required");
		document.form1.CodeNumberTextBox.focus();
		return false;
	}
	 if(document.form1.txtComments.value==""||document.form1.txtComments.value=="Enter your comments here")
	{
	   
	    alert("Comments required.");
		document.form1.txtComments.focus();
		return false;
	}
	
	if(document.form1.txtComments.value.charAt(0)==' ')
	{  
	     alert("Comments required.");
	    document.form1.txtComments.focus();
		return false;
    }
	/*if(document.form1.txtComments.value.length > 250)
	 {
		strd=document.form1.MRF6.value;
	    alert(strd);
		document.form1.txtComments.focus();
		return false; 
	 }
	 */
		
	return true;
}
function Validateprop()
{
 	var ErrMsg="";
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = form1.txtEmail.value.match(emailPat);

	if(document.form1.FullName.value=="" || document.form1.FullName.value==" ")
	{
		
		alert("Nombre y apellido Requerido");
		document.form1.FullName.focus();
		return false;
	}
	
	
	if(document.form1.txtEmail.value=="")
	{
	   strd=document.form1.MRF2.value;
	   alert(strd);
	   document.form1.txtEmail.focus();
	   return false;
	}
	else if (matchArray == null)
	{
		strd=document.form1.MRF12.value;
	    alert(strd);
		document.form1.txtEmail.focus();
		return false;
	}
	if(document.form1.txtTelephone.value=="" || document.form1.txtTelephone.value==" ")
	{
		
		strd=document.form1.MRF3.value;
	     alert(strd);
	    document.form1.txtTelephone.focus();
	   return false;
	}
	if(document.form1.txtCity.value=="" || document.form1.txtCity.value==" ")
	{
		
		strd=document.form1.MRF4.value;
	     alert(strd);
	    document.form1.txtCity.focus();
	   return false;
	}
/*	if(document.form1.txtBathrooms.value=="" || document.form1.txtBathrooms.value==" ")
	{
		
		strd=document.form1.MRF5.value;
	     alert(strd);
	    document.form1.txtBathrooms.focus();
	   return false;
	}
	if(document.form1.txtGarages.value=="" || document.form1.txtGarages.value==" ")
	{
		
		strd=document.form1.MRF6.value;
	     alert(strd);
	    document.form1.txtGarages.focus();
	   return false;
	}
	if(document.form1.txtareatotal.value=="" || document.form1.txtareatotal.value==" ")
	{
		
		strd=document.form1.MRF7.value;
	     alert(strd);
	    document.form1.txtareatotal.focus();
	   return false;
	}
	if(document.form1.txtareacons.value=="" || document.form1.txtareacons.value==" ")
	{
		
		strd=document.form1.MRF8.value;
	     alert(strd);
	    document.form1.txtareacons.focus();
	   return false;
	}*/
	if(document.form1.txtPrice.value=="" || document.form1.txtPrice.value==" ")
	{
		
		strd=document.form1.MRF9.value;
	     alert(strd);
	    document.form1.txtPrice.focus();
	   return false;
	}
	
	if(document.form1.txtDesc.value=="" || document.form1.txtDesc.value==" ")
	{
		
		strd=document.form1.MRF10.value;
	     alert(strd);
	    document.form1.txtDesc.focus();
	   return false;
	}
	 
	
	if(document.form1.txtDesc.value.charAt(0)==' ')
	{  
	     alert("Comentarios/Sugerencias Requerido.");
	    document.form1.txtDesc.focus();
		return false;
    }
	if(document.form1.txtDesc.value.length > 250)
	 {
		strd=document.form1.MRF11.value;
	    alert(strd);
		document.form1.txtDesc.focus();
		return false; 
	 }
		
	return true;
}

function loopy() {
		loc = window.location.href
		sPos =loc.lastIndexOf("/")+1;
		if (sPos != -1) loc = loc.substring(0,sPos); // loose existing search
		window.location = loc+'logout.aspx';
	}

function popup(url)
{
	width = 450;
	height = 345;
	xx = window.screen.width;
	yy = window.screen.height;
	xx = (xx/2) - (width/2);
	yy = (yy/2) - (height);
	style = 'left = ' +  xx + ',top = ' + yy + ',width='+ width +',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no';
	newwindow=window.open(url,'name',style);
	if (window.focus) {newwindow.focus()}
}

function HeaderEmailValidation()
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray =document.newsletter.m_txtNewsLetter.value.match(emailPat);
	if(document.newsletter.m_txtNewsLetter.value==" ")
	{
		alert("Enter Email address.");
		document.newsletter.m_txtNewsLetter.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format.");
		document.newsletter.m_txtNewsLetter.value="";
		document.newsletter.m_txtNewsLetter.focus();
		return false;
	}
}


function HeaderLoginValidation()
{
	if(document.login.m_txtUserName.value==" ")
	{
		alert("Enter your username.");
		document.login.m_txtUserName.focus();
		return false;
	}
	
	if(document.login.m_txtPassword.value=="")
	{
		alert("Enter your password.");
		document.login.m_txtPassword.focus();
		return false;
	}
	return true;
}

function HeaderSearchValidation()
{
	if(document.Search.m_txtSearch.value==" ")
	{
		alert("Enter search text.");
		document.Search.m_txtSearch.focus();
		return false;
	}
}
function ValidateGuestBook()
{
    var err, ErrorDisp, emailPat;
    var emailPat =/^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = form1.txtemail.value.match(emailPat);
	err="";
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.form1.txtfname.value=="" || document.form1.txtfname.value==" ")
	{
		err += "First Name required.\n";
		document.form1.txtfname.focus();
	}	
	if (document.form1.txtlname.value=="" || document.form1.txtlname.value==" ")
	{
		err += "Last Name required.\n";
	}
	if (document.form1.txtemail.value=="" || document.form1.txtemail.value==" ")
	{
		err += "Email required.\n";
	}
	else if (matchArray == null)
	{  
	     err += "Inavalid Email format.\n";
	}
	if (document.form1.txtComment.value=="" || document.form1.txtComment.value=="Enter your comment's.")
	{
		err += "Comments required.\n";
	}	
	if (err=="")
	{
		return true;
	}
	else
	{	
		alert(ErrorDisp+err);
		return false;
	}
}
function Callmevalidation()
	{
	    var strd;
		var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
		var matchArray = frmcontactus.txtemail.value.match(emailPat);
		if (document.frmcontactus.txtfname.value == "" || document.frmcontactus.txtfname.value == " ")
		{
		    strd=document.frmcontactus.MRF1.value;
		    alert(strd);
			/*alert ("Please enter your first name.");*/
			document.frmcontactus.txtfname.focus();
			return false;
		}
		if (document.frmcontactus.txtlname.value == "" || document.frmcontactus.txtlname.value == " ")
		{
		    strd=document.frmcontactus.MRF2.value;
		    alert(strd);
			/*alert ("Please enter your last name.");*/
			document.frmcontactus.txtlname.focus();
			return false;
		}
		if (matchArray == null)
		{
		    strd=document.frmcontactus.MRF3.value;
		    alert(strd);
			/*alert ("Please enter your valid email address.");*/
			document.frmcontactus.txtemail.focus();
			return false;
		}
			
		
		return true;
	}
	function Mailfriendvalidation()
    {
        var strd;
		var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
		var matchArray = form1.txtfriendemail.value.match(emailPat);
		var matchArray1 = form1.txtselfEmail.value.match(emailPat);
	    if(matchArray == null)
	    {
		    strd=document.form1.MRF1.value;
		    alert(strd);
		    document.form1.txtfriendemail.focus();
		    return false;
	    }
    	
	    if(matchArray1 == null)
	    {
		    strd=document.form1.MRF2.value;
		    alert(strd);
		    document.form1.txtselfEmail.focus();
		    return false;
	    }
	    return true;
    }
	function popup1(url)
	{
		width = 710;
		height = 690;
		xx = window.screen.width;
		yy = window.screen.height;
		xx = (xx/2) - (width/2);
		yy = (yy/2) - (height);
		tt = 50;
		style = 'left = ' +  xx + ',top = ' + tt + ',width='+ width +',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes';
		newwindow=window.open(url,'name',style);
		if (window.focus) {newwindow.focus()}
	}
	function mailtofriend(url)
	{
		width = 510;
		height = 390;
		xx = window.screen.width;
		yy = window.screen.height;
		xx = (xx/2) - (width/2);
		yy = (yy/2) - (height);
		tt = 50;
		style = 'left = ' +  xx + ',top = ' + tt + ',width='+ width +',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes';
		newwindow=window.open(url,'name',style);
		if (window.focus) {newwindow.focus()}
	}
	function clearTip(field)
	{
		if(field.defaultValue == field.value)				
		field.value = "";
	}

	function writeTip(field)
	{
		if(field.value == "")
			field.value = field.defaultValue;
	}
	function validatReferenceNo()
	{
	
	    var emailPat=/(^\d+$)|(^\d+\.\d+$)/
		var matchArray = frmrefsearch.txtrefsearch.value.match(emailPat);
        if (document.frmrefsearch.txtrefsearch.value == "")
        {
        alert("Please Enter Reference Number.");
        document.frmrefsearch.txtrefsearch.focus();
        return false;
        }
        if (document.frmrefsearch.txtrefsearch.value == "Enter Reference No..")
        {
        alert("Please Enter Reference Number.");
        document.frmrefsearch.txtrefsearch.focus();
        return false;
        }
       if (matchArray == null)
        {
	        alert ("Please Enter Numeric Reference Number.");
	        document.frmrefsearch.txtrefsearch.focus();
	        return false;
        }
       
	}
function validatmailid()
{ 
    var strd;
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = frmnews.txtnewsletter.value.match(emailPat);
	 
	 
	 if (document.frmnews.txtNombre.value == ""||document.frmnews.txtNombre.value == "Enter Your name..")
        { 
        alert("Please Enter Nombre.");
        document.frmnews.txtNombre.focus();
        return false;
        }
	 if (document.frmnews.txtnewsletter.value == ""||document.frmnews.txtnewsletter.value == "Enter Email-ID Here..")
        { 
        alert("Please Enter Email Address.");
        document.frmnews.txtnewsletter.focus();
        return false;
        }
	if(matchArray == null)
    {
	   alert ("Please enter your valid email address.");
	    document.frmnews.txtnewsletter.focus();
	    return false;
    }
    
}
function OpenWindow()
{ 
window.open("Calculator.htm","winPop","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=335,left=150,top=150");
}
function popUpWindowCC(url,wd,ht)
{
	newwindow=window.open(url,'cc','scrollbars=1,location=0,menubar=0,resizable=0,width='+wd+',height='+ht+',left = 80,top = 80');
	if (window.focus) {newwindow.focus()}
}
function OpenWindowDn()
{ 
window.open("../Calculator.htm","winPop","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=335,left=150,top=150");
}
function popUpWindowCC(url,wd,ht)
{
	newwindow=window.open(url,'cc','scrollbars=1,location=0,menubar=0,resizable=0,width='+wd+',height='+ht+',left = 80,top = 80');
	if (window.focus) {newwindow.focus()}
}

function CheckForPropertyType(ObjCheckList,intCount)
{
    var FirstElem = document.getElementById(ObjCheckList+"_"+0);
    var OtherElemChecked = false;
    for(var i = 1; i <= intCount; i++)
    {
        var OtherElem = document.getElementById(ObjCheckList+"_"+i);
        if(OtherElem != null)
        {
            if(OtherElem.checked)
            {
                OtherElemChecked = true;
                break;
            }
        }
        
    }
    if(OtherElemChecked && FirstElem != null)
    {
        FirstElem.checked = false;
    }
}
function DisableOtherPropertyType(ObjCheckList,intCount)
{ 
    var FirstElem = document.getElementById(ObjCheckList+"_"+0);
    if(FirstElem != null && FirstElem.checked)
    {
    for(var i = 1; i <= intCount; i++)
        {
            var OtherElem = document.getElementById(ObjCheckList+"_"+i);
            if(OtherElem != null)
                OtherElem.checked = false;
        }
    }
}