﻿// JScript File
//Modified By Tarun dabral date on 21 May 2009
function LTrim(str)
	{
		var whitespace = new String(" \t\n\r");
		var s = new String(str);

		if (whitespace.indexOf(s.charAt(0)) != -1) 
		{
			var j=0, i = s.length;
			while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
				j++;
			s = s.substring(j, i);
		}
		return s;
	}
	function RTrim(str)
	{
		var whitespace = new String(" \t\n\r");
		var s = new String(str);
		if (whitespace.indexOf(s.charAt(s.length-1)) != -1) 
		{

			var i = s.length - 1;       
			while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
			i--;
			s = s.substring(0, i+1);
		}
		return s;
	}
	function Trim(str)
	{
		return RTrim(LTrim(str));
	}
	
	
	
//Validation of Feedback form Controls
    function validate()
    { 
       //alert('vv ='+document.getElementById("PropertiesTop1_drpEProjectType").value);
       //alert('ss= '+document.getElementById("PropertiesTop1_drpEProjectType").select);
       if(document.getElementById("PropertiesTop1_drdProjectType").value=="0")
       {
             alert("Please Select the Project");
	         document.getElementById("PropertiesTop1_drdProjectType").focus();
	         return false;       
       }



       if(document.getElementById("PropertiesTop1_drdProjectType").value!="0")
       {
             var ComProCnt=document.getElementById("PropertiesTop1_hdnComProCount").value; 
             //alert('ComProCnt =='+ComProCnt);
             var ComProject=0;
               for(var i=0;i<ComProCnt;i++)     
               {
                    //alert("Under For");            
                    var ChkComProjectId="PropertiesTop1_ChkComProject_"+i;
                    if(document.getElementById(ChkComProjectId).checked==true)
                    {
                        //alert('counter ==='+i);
                        ComProject=ComProject+1;
                    } 
               }
               if(ComProject==0)
               {
                    alert("Please Select at least one Projects ");
                    return false;
               }         
       }

        
       var Elem=document.getElementById("PropertiesTop1_TxtName");   
       if(document.getElementById("PropertiesTop1_TxtName").value=="")
       {
             alert("Please Enter Name");
	         document.getElementById("PropertiesTop1_TxtName").focus();
	         return false;       
       }
      if((Trim(Elem.value)).length == 0)
      {
              alert("Please Donot Use Space");
	         document.getElementById("PropertiesTop1_TxtName").focus();
	         return false;  
      }
       
         else if(!CheckValid(document.getElementById('PropertiesTop1_TxtName').value,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&_. "))
        {
            alert("Please Enter a Valid Name");
		    document.getElementById("PropertiesTop1_TxtName").focus();
	         return false;          
         } 
     
        
//         if(document.getElementById("PropertiesTop1_DrpCountry").value==0)
//       {
//             alert("Please Select Country.");
//	         document.getElementById("PropertiesTop1_DrpCountry").focus();
//	         return false;       
//       }      
//       if(document.getElementById("PropertiesTop1_TxtPhoneNo").value=="")
//       {
//             alert("Please Enter Phone No.");
//	         document.getElementById("PropertiesTop1_TxtPhoneNo").focus();
//	         return false;       
//       }
       
       
//        if(!CheckValid(document.getElementById("PropertiesTop1_TxtPhoneNo").value,"+-0123456789"))
//            {
//                alert('Please Enter Valid Phone No.');
//                document.getElementById("PropertiesTop1_TxtPhoneNo").focus();
//                return false;
//            }
//             if (document.getElementById("PropertiesTop1_TxtPhoneNo").value.length < 5)
//    {		
//            alert("Phone No. should not be less than 5 digits");
//            document.getElementById("PropertiesTop1_TxtPhoneNo").focus();
//            return false;
//    }       
//             if(document.getElementById("PropertiesTop1_TxtMobileNo").value=="")
//       {
//             alert("Please Enter Mobile No.");
//	         document.getElementById("PropertiesTop1_TxtMobileNo").focus();
//	         return false;       
//       }
//              if(!CheckValid(document.getElementById("PropertiesTop1_TxtMobileNo").value,"+-0123456789"))
//            {
//                alert('Please Enter Valid Mobile No.');
//                document.getElementById("PropertiesTop1_TxtMobileNo").focus();
//                return false;
//            }
//            if (document.getElementById("PropertiesTop1_TxtMobileNo").value.length < 10)
//    {		
//             alert("Mobile No. should not be less than 10 digits");
//             document.getElementById("PropertiesTop1_TxtMobileNo").focus();
//             return false;
//    }  
//            
//            if(document.getElementById("PropertiesTop1_TxtFaxNo").value=="")
//       {
//             alert("Please Enter Fax No.");
//	         document.getElementById("PropertiesTop1_TxtFaxNo").focus();
//	         return false;       
//       }
//              if(!CheckValid(document.getElementById("PropertiesTop1_TxtFaxNo").value,"+-0123456789"))
//            {
//                alert('Please Enter Valid Fax No.');
//                document.getElementById("PropertiesTop1_TxtFaxNo").focus();
//                return false;
//            }

         if(document.getElementById("PropertiesTop1_TxtEmail").value=="")
        {
            alert("Please Enter Email");
	        document.getElementById("PropertiesTop1_TxtEmail").focus();
	        return false;
        }
         if(!IsValidEmail(document.getElementById("PropertiesTop1_TxtEmail").value))
        {
            alert('Enter valid Email and try again.');
            document.getElementById("PropertiesTop1_TxtEmail").focus();
            return false;
        }        
        
        
//        if(document.getElementById('PropertiesTop1_ChkAboutUs_3').checked==true && document.getElementById('PropertiesTop1_txtother_feedback').value=='')
//    {
//        alert("Please Enter other");
//        document.getElementById('PropertiesTop1_txtother_feedback').focus();
//               return false;
//    }
        
       if(document.getElementById("PropertiesTop1_TxtComment").value=="")
       {
             alert("Please Enter Comment");
	         document.getElementById("PropertiesTop1_TxtComment").focus();
	         return false;       
       }  
       var Element=document.getElementById("PropertiesTop1_TxtComment");
       if((Trim(Element.value)).length == 0)
       {
              alert("Please Enter Comment");
	         document.getElementById("PropertiesTop1_TxtComment").focus();
	         return false;  
       } 
            
       return true; 
            
     }
    //End Of Feedback Controls Validation 
     
       
     
     
   function IsValidEmail(stremail,empty)
    {
     if(stremail=='' && empty)
            return true;
    var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    return filter.test(stremail);
    }
     
      function CheckValid(chars,validchars)
    {   
         var blnresult=true;
        for(var i=0;i<chars.length&&blnresult==true;i++)
            {
                 var cchar=chars.charAt(i);
                 if(validchars.indexOf(cchar)==-1)
                    {
                        blnresult=false;
                    }
        
            }
         return blnresult;
     }
     
     
     
     //Validaion controls for Send An Enquiry form
    function validate1()
    { 
      //alert("Called");
      if(document.getElementById("PropertiesTop1_drdProjectType1").value=="0")
       {
             alert("Please Select the Project");
	         document.getElementById("PropertiesTop1_drdProjectType1").focus();
	         //alert("After Message");
	         return false;       
       }


       if(document.getElementById("PropertiesTop1_drdProjectType1").value!="0")
       {
             var ComProCnt=document.getElementById("PropertiesTop1_hdnComProCount").value; 
             //alert('ComProCnt =='+ComProCnt);
             var ComProject=0;
               for(var i=0;i<ComProCnt;i++)     
               {
                    //alert("Under For");            
                    var ChkComProjectId="PropertiesTop1_ChkComProject1_"+i;
                    if(document.getElementById(ChkComProjectId).checked==true)
                    {
                        //alert('counter ==='+i);
                        ComProject=ComProject+1;
                    } 
               }
               //alert('ComProCnt =='+ComProCnt);
               //alert('ComProject =='+ComProject);
               if((ComProject==0) && (ComProCnt>0))
               {
                    alert("Please Select at least one Projects ");
                    return false;
               }         
       }


       
      var Elem=document.getElementById("PropertiesTop1_TxtName1");   
       if(document.getElementById("PropertiesTop1_TxtName1").value=="")
       {
             alert("Please Enter Name");
	         document.getElementById("PropertiesTop1_TxtName1").focus();
	         return false;       
       }
       if((Trim(Elem.value)).length == 0)
      {
              alert("Please Donot Use Space");
	         document.getElementById("PropertiesTop1_TxtName1").focus();
	         return false;  
      }
       
         else if(!CheckValid(document.getElementById('PropertiesTop1_TxtName1').value,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&_. "))
        {
            alert("Please Enter a Valid Name");
		    document.getElementById("PropertiesTop1_TxtName1").focus();
	         return false;       
         }  
         
                
//       if(document.getElementById("PropertiesTop1_TxtCompany").value=="")
//       {
//             alert("Please Enter Company.");
//	         document.getElementById("PropertiesTop1_TxtCompany").focus();
//	         return false;       
//       }
//          if(document.getElementById("PropertiesTop1_TxtAddress").value=="")
//       {
//             alert("Please Enter Address.");
//	         document.getElementById("PropertiesTop1_TxtAddress").focus();
//	         return false;       
//       }
//       
//       if(document.getElementById("PropertiesTop1_TxtPhoneNo1").value=="")
//       {
//             alert("Please Enter Phone No.");
//	         document.getElementById("PropertiesTop1_TxtPhoneNo1").focus();
//	         return false;       
//       }
//       
//       
//        if(!CheckValid(document.getElementById("PropertiesTop1_TxtPhoneNo1").value,"+-0123456789"))
//            {
//                alert('Please Enter Valid Phone No.');
//                document.getElementById("PropertiesTop1_TxtPhoneNo1").focus();
//                return false;
//            }
//            if (document.getElementById("PropertiesTop1_TxtPhoneNo1").value.length < 5)
//    {		
//            alert("Phone No. should not be less than 5 digits");
//            document.getElementById("PropertiesTop1_TxtPhoneNo1").focus();
//            return false;
//    }       
//            
//             if(document.getElementById("PropertiesTop1_TxtMobileNo1").value=="")
//       {
//             alert("Please Enter Mobile No.");
//	         document.getElementById("PropertiesTop1_TxtMobileNo1").focus();
//	         return false;       
//       }
//     
//              if(!CheckValid(document.getElementById("PropertiesTop1_TxtMobileNo1").value,"+-0123456789"))
//            {
//                alert('Please Enter Valid Mobile No.');
//                document.getElementById("PropertiesTop1_TxtMobileNo1").focus();
//                return false;
//            }
//              if (document.getElementById("PropertiesTop1_TxtMobileNo1").value.length < 10)
//    {		
//            alert("Mobile No. should not be less than 10 digits");
//            document.getElementById("PropertiesTop1_TxtMobileNo1").focus();
//            return false;
//    }       
//            if(document.getElementById("PropertiesTop1_TxtFaxNo1").value=="")
//       {
//             alert("Please Enter Fax No.");
//	         document.getElementById("PropertiesTop1_TxtFaxNo1").focus();
//	         return false;       
//       }
//              if(!CheckValid(document.getElementById("PropertiesTop1_TxtFaxNo1").value,"+-0123456789"))
//            {
//                alert('Please Enter Valid Fax No.');
//                document.getElementById("PropertiesTop1_TxtFaxNo1").focus();
//                return false;
//            }
            
            
        if(document.getElementById("PropertiesTop1_TxtEmailId1").value=="")
        {
            alert("Please Enter Email");
	        document.getElementById("PropertiesTop1_TxtEmailId1").focus();
	        return false;
        }
        if(!IsValidEmail(document.getElementById("PropertiesTop1_TxtEmailId1").value))
        {
            alert('Enter valid Email and try again.');
            document.getElementById("PropertiesTop1_TxtEmailId1").focus();
            return false;
        }
        
        if(document.getElementById('PropertiesTop1_ChkAboutUs1_3').checked==true && document.getElementById('PropertiesTop1_txtother_enquiry').value=='')
        {
            alert("Please Enter other");
            document.getElementById('PropertiesTop1_txtother_enquiry').focus();
                   return false;
        }
        
//         var status=0;
//       for(var i=0;i<=5;i++)     
//       {
//            //alert("Under For");            
//            var ChkAboutId="PropertiesTop1_ChkAboutUs1_"+i;
//            if(document.getElementById(ChkAboutId).checked==false)
//            {
//                //alert('counter ==='+i);
//                status=status+1;
//            }
//            
//            //alert("total =="+status);
//            if(status==6)
//            {
//                alert("Please Select at least one About Us ");
//                return false;
//            }           
//       }
//        
//        
//            if(document.getElementById("PropertiesTop1_TxtComments1").value=="")
//       {
//             alert("Please Enter Comment");
//	         document.getElementById("PropertiesTop1_TxtComments1").focus();
//	         return false;       
//       }  
//        var Element=document.getElementById("PropertiesTop1_TxtComments1");
//          if((Trim(Element.value)).length == 0)
//      {
//              alert("Please Enter Comment");
//	         document.getElementById("PropertiesTop1_TxtComments1").focus();
//	         return false;  
//      }        
//      
//                    
//       var ComProCnt=document.getElementById("PropertiesTop1_hdnComProCount").value; 
//       //alert('ComProCnt =='+ComProCnt);
//       var ComProject=0;
//       for(var i=0;i<ComProCnt;i++)     
//       {
//            //alert("Under For");            
//            var ChkComProjectId="PropertiesTop1_ChkComProject1_"+i;
//            if(document.getElementById(ChkComProjectId).checked==true)
//            {
//                //alert('counter ==='+i);
//                ComProject=ComProject+1;
//            } 
//       }
//       if(ComProject==0)
//            {
//                alert("Please Select at least one Commercial Projects ");
//                return false;
//            }  
//            
//            
//       
//       var ResProCnt=document.getElementById("PropertiesTop1_hdnResProCount").value;
//       var RProject=0;
//       for(var i=0;i<ResProCnt;i++)     
//       {
//            //alert("Under For");            
//            var ChkProjectId="PropertiesTop1_ChkResProject1_"+i;
//            if(document.getElementById(ChkProjectId).checked==true)
//            {
//                //alert('counter ==='+i);
//                RProject=RProject+1;
//            }         
//       }
//       if(RProject==0)
//            {
//                alert("Please Select at least one Residential  Projects ");
//                return false;
//            }
//            
//        
//       var TownCnt=document.getElementById("PropertiesTop1_hdnTownshipCount").value;   
//       var TownShip=0;
//       for(var i=0;i<TownCnt;i++)     
//       {
//            //alert("Under For");            
//            var ChkTownId="PropertiesTop1_ChkTownShip1_"+i;
//            if(document.getElementById(ChkTownId).checked==true)
//            {
//                //alert('counter ==='+i);
//                TownShip=TownShip+1;
//            }        
//       }
//       if(TownShip==0)
//            {
//                alert("Please Select at least one Township ");
//                return false;
//            } 
            
                   
       return true; 
           
     }
     
     
           //return true;     
   
     
     
     
      function IsValidEmail(stremail,empty)
    {
     if(stremail=='' && empty)
            return true;
    var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    return filter.test(stremail);
    }
   
   
   
    function ClearEnquiry()
    { 
        // alert("hello")
        document.getElementById("PropertiesTop1_LblMessage1").innerHTML="";
        //document.getElementById("PropertiesTop1_drpEProjectType").value="0";
        //document.getElementById('PropertiesTop1_EProjects_Div').style.display='none';
        
        document.getElementById("PropertiesTop1_TxtName1").value=""; 
        document.getElementById("PropertiesTop1_TxtEmailId1").value=""; 
        document.getElementById("PropertiesTop1_TxtAddress").value=""; 
        document.getElementById("PropertiesTop1_TxtPhoneNo1").value="";
        document.getElementById("PropertiesTop1_TxtMobileNo1").value="";
        document.getElementById("PropertiesTop1_TxtComments1").value=""; 
        //document.getElementById("PropertiesTop1_drdConfiguration").value="0";
        
        //document.getElementById("PropertiesTop1_drdCommercial").value="0";
        document.getElementById("PropertiesTop1_txtCommercial").value="";
        document.getElementById("PropertiesTop1_DrpBudget").value="0";            
        
        if(document.getElementById("PropertiesTop1_EProjects_Div").style.display=="block")
        {
            var ComProject=document.getElementById("PropertiesTop1_hdnComProCount").value;
            //alert(ComProject);
            for(var i=0;i<ComProject;i++)     
            {
                //alert("Under For");            
                var ChkComProjectId="PropertiesTop1_ChkComProject1_"+i;
                document.getElementById(ChkComProjectId).checked=false;                   
            }
        }
        
        if(document.getElementById("PropertiesTop1_EProjects_Div").style.display=="block")
        {
            var upcomingCount=document.getElementById("PropertiesTop1_hdnUpcomingCount").value;
            //alert(ComProject);
            for(var i=0;i<upcomingCount;i++)     
            {
                //alert("Under For");            
                var ChkUpcomingProId="PropertiesTop1_chkUpcomingPro_"+i;
                document.getElementById(ChkUpcomingProId).checked=false;                   
            }
        }
        
        for(var i=0;i<=6;i++)     
        {
            //alert("Under For");         
            var ChkAboutUsId="PropertiesTop1_ChkAboutUs1_"+i;
            document.getElementById(ChkAboutUsId).checked=false;                   
        } 
        
        if(document.getElementById("PropertiesTop1_configTr").style.display=="block")
        {
            for(var i=0;i<=9;i++)     
            {
                //alert("Under For");         
                var ChkConfigId="PropertiesTop1_chkConfiguration_"+i;
                document.getElementById(ChkConfigId).checked=false;                   
            } 
        }
       
       document.getElementById('PropertiesTop1_txtother_Configuration').value='';
       document.getElementById('PropertiesTop1_txtother_Configuration').style.display='none';
       document.getElementById('PropertiesTop1_lblotherConfiguration').style.display='none';	    
         
       document.getElementById('PropertiesTop1_txtother_enquiry').value='';
       document.getElementById('PropertiesTop1_txtother_enquiry').style.display='none';
       document.getElementById('PropertiesTop1_lblother1').style.display='none';
       return false;       
   } 
            
            
            
    //Clear the all control of Enquiry Form            
    function ClearFeedback()
    { 
        //alert("Called")
        //document.getElementById("PropertiesTop1_lblCurrent").innerHTML="";
        document.getElementById("PropertiesTop1_LblMessage").innerHTML=""; 
        //document.getElementById("PropertiesTop1_drpFProjectType").value="0";
        //document.getElementById('PropertiesTop1_fProjects_Div').style.display='none';
        
        document.getElementById("PropertiesTop1_TxtName").value="";  
        document.getElementById("PropertiesTop1_TxtEmail").value="";
        document.getElementById("PropertiesTop1_txtFAddress").value="";        
        document.getElementById("PropertiesTop1_TxtPhoneNo").value="";
        document.getElementById("PropertiesTop1_TxtMobileNo").value="";
        document.getElementById("PropertiesTop1_TxtComment").value="";
	     
	    if(document.getElementById("PropertiesTop1_fProjects_Div").style.display=="block")
        {  
	        var ComProject=document.getElementById("PropertiesTop1_hdnComProCount").value;
            //alert('hdnComProCount =='+ComProject);
            for(var i=0;i<ComProject;i++)     
            {                           
                var ChkComProjectId="PropertiesTop1_ChkComProject_"+i;
                document.getElementById(ChkComProjectId).checked=false;                   
            }
        }                                                            
         
                                
        //var ComProject=0;
//        for(var i=0;i<=5;i++)     
//        {
//            //alert("Under For");            
//            var ChkAboutUsId="PropertiesTop1_ChkAboutUs_"+i;
//            document.getElementById(ChkAboutUsId).checked=false;                   
//        }       
         
//        
//        var RProCnt=document.getElementById("PropertiesTop1_hdnResProCount").value;
//        for(var i=0;i<RProCnt;i++)     
//        {
//            //alert("Under For");            
//            var ChkProjectId="PropertiesTop1_ChkResProject_"+i;
//            document.getElementById(ChkProjectId).checked=false;                      
//        }  

//        document.getElementById('PropertiesTop1_txtother_feedback').value='';      
//        document.getElementById('PropertiesTop1_txtother_feedback').style.display='none'; 
//        document.getElementById('PropertiesTop1_lblother').style.display='none';                 
       return false;       
 }   
              

    
function textkey1Counter(maxlimit) 
   {
    var field=document.getElementById("PropertiesTop1_TxtAddress");
    if (field.value.length > maxlimit) 
    field.value = field.value.substring(0, maxlimit); 
   }
   
   function textkey2Counter(maxlimit) 
   {
    var field=document.getElementById("PropertiesTop1_TxtComments1");
    if (field.value.length > maxlimit) 
    field.value = field.value.substring(0, maxlimit); 
   }
   
    function textkey3Counter(maxlimit) 
   {
    var field=document.getElementById("PropertiesTop1_TxtComment");
    if (field.value.length > maxlimit) 
    field.value = field.value.substring(0, maxlimit); 
   }
  
  //Modified By Bhushan  on 28 May 2009
  
function check_other_Configuration()
{
//alert(document.getElementById('PropertiesTop1_ChkAboutUs_3'));
    if(document.getElementById('PropertiesTop1_chkConfiguration_5').checked==true)
    {
        document.getElementById('PropertiesTop1_txtother_Configuration').style.display='block';
        document.getElementById('PropertiesTop1_txtother_Configuration').value='';
        document.getElementById('PropertiesTop1_lblotherConfiguration').style.display='block';
    }
    else
    {
        document.getElementById('PropertiesTop1_txtother_Configuration').value='';
        document.getElementById('PropertiesTop1_txtother_Configuration').style.display='none';
        document.getElementById('PropertiesTop1_lblotherConfiguration').style.display='none';
       
    }
}

function check_other_enquiry()
{
    if(document.getElementById('PropertiesTop1_ChkAboutUs1_3').checked==true)
    {
        document.getElementById('PropertiesTop1_txtother_enquiry').style.display='block';
        document.getElementById('PropertiesTop1_lblother1').style.display='block';
        document.getElementById('PropertiesTop1_txtother_enquiry').value='';
    }
    else
    {
        document.getElementById('PropertiesTop1_txtother_enquiry').value='';
        document.getElementById('PropertiesTop1_txtother_enquiry').style.display='none';
        document.getElementById('PropertiesTop1_lblother1').style.display='none';
    }
}





//Written By:-Vinit(03/06/2009)
//Clear the Micro Site Feedback and Enquiry Form
//Clear the all control of Enquiry Form            
function ClearMicroFeedback()
    { 
        //alert("Called")
        document.getElementById("Current_PropertiesTop1_LblMessage").innerHTML=""; 
        document.getElementById("Current_PropertiesTop1_TxtName").value=""; 
        document.getElementById("Current_PropertiesTop1_TxtEmailId").value="";
	document.getElementById("Current_PropertiesTop1_txtcountry").value="";         
        document.getElementById("Current_PropertiesTop1_TxtPhoneNo").value="";
        document.getElementById("Current_PropertiesTop1_TxtMobileNo").value="";
        document.getElementById("Current_PropertiesTop1_TxtComments").value=""; 	                                                                  
                                
        //var ComProject=0;
        for(var i=0;i<=5;i++)     
        {            
            var ChkAboutUsId="Current_PropertiesTop1_ChkAboutUs_"+i;
            document.getElementById(ChkAboutUsId).checked=false;                   
        }        
        
        document.getElementById('Current_PropertiesTop1_txtother_feedback').value='';      
        document.getElementById('Current_PropertiesTop1_txtother_feedback').style.display='none'; 
        document.getElementById('Current_PropertiesTop1_lblother').style.display='none';                 
       return false;       
 }   
 
 
function ClearMicroEnquiry()
    { 
        // alert("hello")
        document.getElementById("Current_PropertiesTop1_LblMessage1").innerHTML=""; 
        document.getElementById("Current_PropertiesTop1_TxtName1").value=""; 
        document.getElementById("Current_PropertiesTop1_TxtEmailId1").value="";
	document.getElementById("Current_PropertiesTop1_txtcountry1").value="";        
        document.getElementById("Current_PropertiesTop1_txtCity1").value=""; 
        document.getElementById("Current_PropertiesTop1_TxtPhoneNo1").value="";
        document.getElementById("Current_PropertiesTop1_TxtMobileNo1").value="";
        document.getElementById("Current_PropertiesTop1_TxtComments1").value="";
          
        for(var i=0;i<=5;i++)     
        {        
            var ChkAboutUsId="Current_PropertiesTop1_ChkAboutUs1_"+i;
            document.getElementById(ChkAboutUsId).checked=false;                   
        } 
         
        document.getElementById('Current_PropertiesTop1_txtother_enquiry').value='';
        document.getElementById('Current_PropertiesTop1_txtother_enquiry').style.display='none';
        document.getElementById('Current_PropertiesTop1_lblother1').style.display='none';
        return false;       
   } 
   
   
function check_Micro_other_feedback()
{
    if(document.getElementById('Current_PropertiesTop1_ChkAboutUs_3').checked==true)
    {
        document.getElementById('Current_PropertiesTop1_txtother_feedback').style.display='block';
        document.getElementById('Current_PropertiesTop1_txtother_feedback').value='';
        document.getElementById('Current_PropertiesTop1_lblother').style.display='block';
    }
    else
    {
        document.getElementById('Current_PropertiesTop1_txtother_feedback').value='';
        document.getElementById('Current_PropertiesTop1_txtother_feedback').style.display='none';
        document.getElementById('Current_PropertiesTop1_lblother').style.display='none';
       
    }
}

function check_Micro_other_enquiry()
{
    if(document.getElementById('Current_PropertiesTop1_ChkAboutUs1_3').checked==true)
    {
        document.getElementById('Current_PropertiesTop1_txtother_enquiry').style.display='block';
        document.getElementById('Current_PropertiesTop1_lblother1').style.display='block';
        document.getElementById('Current_PropertiesTop1_txtother_enquiry').value='';
    }
    else
    {
        document.getElementById('Current_PropertiesTop1_txtother_enquiry').value='';
        document.getElementById('Current_PropertiesTop1_txtother_enquiry').style.display='none';
        document.getElementById('Current_PropertiesTop1_lblother1').style.display='none';
    }
}


function getSearchResult()
{
    var query=document.getElementById('q').value;//alert(query);
    location.href="search.aspx?cx=000101485589071403726%3Azd_8mahqq04&cof=FORID%3A9&ie=UTF-8&q="+query+"&sa=Search#943";
}

