﻿// JScript File
function set_price_display(val)
{
    var el = document.getElementById("d_set_price");
  
    if (val == 'others')
    {  
      el.style.display = "block";
    }
    else
    {
      el.style.display = "none";
    }
}

function Postcommunityad()
{
     txt_title=document.getElementById("ctl00_ContentPlaceHolder1_txt_title")
     txt_remarks=document.getElementById("ctl00_ContentPlaceHolder1_txt_remarks")
     drp_state=document.getElementById("ctl00_ContentPlaceHolder1_drp_state")
     txt_location=document.getElementById("ctl00_ContentPlaceHolder1_txt_location")
     txt_email=document.getElementById("ctl00_ContentPlaceHolder1_txt_email")
     
    // txt_confirm_email=document.getElementById("ctl00_ContentPlaceHolder1_txt_confirm_email")
     txt_phone=document.getElementById("ctl00_ContentPlaceHolder1_txt_phone")
    
     FileUpload1=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload1")
     FileUpload2=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload2")
     FileUpload3=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload3")
     FileUpload4=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload4")
     
     txt_img1_desc=document.getElementById("ctl00_ContentPlaceHolder1_txt_img1_desc")
     txt_img2_desc=document.getElementById("ctl00_ContentPlaceHolder1_txt_img2_desc")
     txt_img3_desc=document.getElementById("ctl00_ContentPlaceHolder1_txt_img3_desc")
     txt_img4_desc=document.getElementById("ctl00_ContentPlaceHolder1_txt_img4_desc")
     
      txt_price=document.getElementById("ctl00_ContentPlaceHolder1_txt_price")
      
      FPath1=(FileUpload1.value).toUpperCase()	
       FPath2=(FileUpload2.value).toUpperCase()	
        FPath3=(FileUpload3.value).toUpperCase()	
         FPath4=(FileUpload4.value).toUpperCase()	
         
         
    if(txt_title.value=="")
    {
         alert("Please enter the ad title")
         txt_title.focus();
         return false;
    }
    else if(txt_remarks.value=="")
    {
        alert("Please enter the remarks")
        txt_remarks.focus();
        return false;
    }
	else if(txt_remarks.value.length > 500)
    {
        alert("Please enter below 500 characters in description");
        txt_remarks.focus();
        return false;
    }
//    else if(txt_price.value=="")
//    {
//        alert("Please enter the price")
//        txt_price.focus();
//        return false;
//    }
//    else if((txt_price.value!="") && (isNaN(txt_price.value)))
//    {
//        alert("Please enter the price in numerics");
//        txt_price.focus();
//        return false;
//    }
    else if(txt_location.value=="")
    {
        alert("Please enter the location")
        txt_location.focus();
        return false;
    }
    else if(txt_email.value=="")
    {
        alert("Please enter the email")
        txt_email.focus();
        return false;
    }
   // else if(!isEmail(txt_email.value))
//    {
//        alert("Please enter the valid email");
//        txt_email.focus();
//        txt_email.select();
//        return false;
//    }
	else if(txt_email.value!="" && (txt_email.value.indexOf("@",0)==-1 || txt_email.value.indexOf(".",0)==-1))
	{
		alert("Please enter the valid email");
		txt_email.focus();
		txt_email.select();
		return false;
	}
//    else if(txt_confirm_email.value=="")
//    {
//        alert("Please enter confirm email")
//        txt_confirm_email.focus();
//        return false;
//    }
//    else if(txt_confirm_email.value!=txt_email.value)
//    {
//        alert("Email Mismatch");
//        txt_confirm_email.focus();
//        return false;
//    }
    
  //  else if(txt_phone.value=="")
//    {
//        alert("Please enter the phone")
//        txt_phone.focus();
//        return false;
//    }
    else if(FPath1!= "" && (FPath1.indexOf(".BMP")<0 && FPath1.indexOf(".JPG")<0 && FPath1.indexOf(".GIF")<0 && FPath1.indexOf(".JPEG")<0 && FPath1.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload1.focus();
        return false;
    }
    else if(FPath2!= "" && (FPath2.indexOf(".BMP")<0 && FPath2.indexOf(".JPG")<0 && FPath2.indexOf(".GIF")<0 && FPath2.indexOf(".JPEG")<0 && FPath2.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload2.focus();
        return false;
    }
    else if(FPath3!= "" && (FPath3.indexOf(".BMP")<0 && FPath3.indexOf(".JPG")<0 && FPath3.indexOf(".GIF")<0 && FPath3.indexOf(".JPEG")<0 && FPath3.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload3.focus();
        return false;
    }
    else if(FPath4!= "" && (FPath4.indexOf(".BMP")<0 && FPath4.indexOf(".JPG")<0 && FPath4.indexOf(".GIF")<0 && FPath4.indexOf(".JPEG")<0 && FPath4.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload4.focus();
        return false;
    }
    else
    {
        return true;
    }
}


//-------------------------Text length calculation---------------------------------------
maxKeys = 500;
var IE = (document.all) ? 1 : 0;
var DOM = 0; 
if (parseInt(navigator.appVersion) >=5) {DOM=1};

function txtshow( txt2show ) 
{
// Detect Browser
    if (DOM) 
    {
        var viewer = document.getElementById("txtmsg");
        viewer.innerHTML=txt2show;
    }
    else if(IE) 
    {
        document.all["txtmsg"].innerHTML=txt2show;
    }
}

function keyup(what) 
{
  var str = new String(what.value);
  var len = str.length;
  var showstr = maxKeys -  len  
  if (showstr < 0)
  {
  showstr=0;
  }
  var showstr ="No of characters left: " + showstr           //len + " characters of " + maxKeys + " entered";
  if (len > maxKeys)
  {
   //showstr += '<br>Some information will be lost, please revise your entry';
   //eval("document.form1."+TXTmessage).value = eval("document.form1."+TXTmessage).value.substring(0, maxKeys);
   document.form1.txt_suggestion.value = document.form1.txt_suggestion.value.substring(0, maxKeys);
   //alert(document.form1.TXTmessage.value.substring(0, maxKeys))
   }
  txtshow( showstr );
}
//----------------------------------------------------------------

function checkthreevalue()
{
	chkhidden=document.getElementById("ctl00_ContentPlaceHolder1_chkhidden");
	var len=chkhidden.value;
    if(chkhidden.value!=0)
    {
        var i;
        var category=0;
        for(i=0;i<len;i++)
        {
		 var test=eval("document.getElementById('ctl00_ContentPlaceHolder1_chkgroup_"+i+"').checked");
		  if(test==true)
		   {
				category=category+1
		   } 
        }
    } 
	if(category > 3)
    {
        alert("You are only allowed to check a maximum of 3 category boxes. Please create a separate posting for other items");
        return false;
    }
}

function Postclassified()
{
 
        txt_title=document.getElementById("ctl00_ContentPlaceHolder1_txt_title")
        txt_description=document.getElementById("ctl00_ContentPlaceHolder1_txt_description")
        txt_price=document.getElementById("ctl00_ContentPlaceHolder1_txt_price")
        txt_location=document.getElementById("ctl00_ContentPlaceHolder1_txt_location")
        drp_manuf=document.getElementById("ctl00_ContentPlaceHolder1_drp_manuf")
        chkgroup=document.getElementById("ctl00_ContentPlaceHolder1_chkgroup_")
        txt_email=document.getElementById("ctl00_ContentPlaceHolder1_txt_email")
        txt_telephone=document.getElementById("ctl00_ContentPlaceHolder1_txt_telephone")

        FileUpload1=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload1")
        FileUpload2=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload2")
        FileUpload3=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload3")
        FileUpload4=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload4")
        
        txt_img1_desc=document.getElementById("ctl00_ContentPlaceHolder1_txt_img1_desc")
        txt_img2_desc=document.getElementById("ctl00_ContentPlaceHolder1_txt_img2_desc")
        txt_img3_desc=document.getElementById("ctl00_ContentPlaceHolder1_txt_img3_desc")
        txt_img4_desc=document.getElementById("ctl00_ContentPlaceHolder1_txt_img4_desc")
        
        chkhidden=document.getElementById("ctl00_ContentPlaceHolder1_chkhidden")
        FPath1=(FileUpload1.value).toUpperCase()	
        FPath2=(FileUpload2.value).toUpperCase()	
        FPath3=(FileUpload3.value).toUpperCase()	
        FPath4=(FileUpload4.value).toUpperCase()	
        
        
   var len=chkhidden.value;
 
    if(chkhidden.value!=0)
    {
        var i;
        var category=0;
        
        for(i=0;i<len;i++)
        {
             var test=eval("document.getElementById('ctl00_ContentPlaceHolder1_chkgroup_"+i+"').checked");
           
              if(test==true)
               {
                             category=category+1
               } 
        }
    } 
   if(txt_title.value=="")
    {
        alert("Please enter the title");
        txt_title.focus();
        return false;
    }
    else if(txt_description.value=="")
    {
        alert("Please enter the description");
        txt_description.focus();
        return false;
    }
	else if(txt_description.value.length > 500)
    {
        alert("Please enter below 500 characters in description");
        txt_description.focus();
        return false;
    }
//    else if(txt_price.value=="")
//    {
//        alert("Please enter the price");
//        txt_price.focus();
//        return false;
//    }
    else if((txt_price.value!="") && (isNaN(txt_price.value)))
    {
        alert("Please enter the price in numerics");
        txt_price.focus();
        return false;
    }
    else if(txt_location.value=="")
    {
        alert("Please enter the location");
        txt_location.focus();
        return false;
    }
//    else if(drp_manuf.value=="0")
//    {
//        alert("Please select the Manufacturer");
//        drp_manuf.focus();
//        return false;
//    }
    else if(category==0)
    {
        alert("Please select the category");
        
        return false;
    }
	else if(category > 3)
    {
        alert("You are only allowed to check a maximum of 3 category boxes. Please create a separate posting for other items");
        
        return false;
    }
    else if(txt_email.value=="")
    {
        alert("Please enter the email");
        txt_email.focus();
        return false;
    }
   // else if(!isEmail(txt_email.value))
//    {
//        alert("Please enter the valid email");
//        txt_email.focus();
//        txt_email.select();
//        return false;
//    }
	else if(txt_email.value!="" && (txt_email.value.indexOf("@",0)==-1 || txt_email.value.indexOf(".",0)==-1))
		{
		 	alert("Please enter the valid email");
            txt_email.focus();
            txt_email.select();
            return false;
		}
   // else if(txt_telephone.value=="")
//    {
//        alert("Please enter the telephone");
//        txt_telephone.focus();
//        return false;
//    }
    else if(FPath1!= "" && (FPath1.indexOf(".BMP")<0 && FPath1.indexOf(".JPG")<0 && FPath1.indexOf(".GIF")<0 && FPath1.indexOf(".JPEG")<0 && FPath1.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload1.focus();
        return false;
    }
    else if(FPath2!= "" && (FPath2.indexOf(".BMP")<0 && FPath2.indexOf(".JPG")<0 && FPath2.indexOf(".GIF")<0 && FPath2.indexOf(".JPEG")<0 && FPath2.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload2.focus();
        return false;
    }
    else if(FPath3!= "" && (FPath3.indexOf(".BMP")<0 && FPath3.indexOf(".JPG")<0 && FPath3.indexOf(".GIF")<0 && FPath3.indexOf(".JPEG")<0 && FPath3.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload3.focus();
        return false;
    }
    else if(FPath4!= "" && (FPath4.indexOf(".BMP")<0 && FPath4.indexOf(".JPG")<0 && FPath4.indexOf(".GIF")<0 && FPath4.indexOf(".JPEG")<0 && FPath4.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload4.focus();
        return false;
    } 
}



function PostRealAd()
{

    TXTTitile=document.getElementById("ctl00_ContentPlaceHolder1_TXTTitile")
    TXTRemarks=document.getElementById("ctl00_ContentPlaceHolder1_TXTRemarks")
    TXTPrice=document.getElementById("ctl00_ContentPlaceHolder1_TXTPrice")
    TXTbeds=document.getElementById("ctl00_ContentPlaceHolder1_TxtBedrooms")
    TXTbaths=document.getElementById("ctl00_ContentPlaceHolder1_TxtBathrooms")
    TXTCity=document.getElementById("ctl00_ContentPlaceHolder1_TXTCity")
    TXTemail=document.getElementById("ctl00_ContentPlaceHolder1_TXTemail")
    //TXTconfirmemail=document.getElementById("ctl00_ContentPlaceHolder1_TXTconfirmemail")
    
    txt_time_to_lift=document.getElementById("ctl00_ContentPlaceHolder1_txt_time_to_lift")
	TXTRealtorName=document.getElementById("ctl00_ContentPlaceHolder1_TXTRealtorName")
	TXTRealtorCompany=document.getElementById("ctl00_ContentPlaceHolder1_TXTRealtorCompany")
    
    
    CHKDistance_0=document.getElementById("ctl00_ContentPlaceHolder1_CHKDistance_0")
    CHKDistance_1=document.getElementById("ctl00_ContentPlaceHolder1_CHKDistance_1")
    CHKDistance_2=document.getElementById("ctl00_ContentPlaceHolder1_CHKDistance_2")
    CHKDistance_3=document.getElementById("ctl00_ContentPlaceHolder1_CHKDistance_3")
    
        
     FileUpload1=document.getElementById("ctl00_ContentPlaceHolder1_FUP_Image1")
     FileUpload2=document.getElementById("ctl00_ContentPlaceHolder1_FUP_Image2")
     FileUpload3=document.getElementById("ctl00_ContentPlaceHolder1_FUP_Image3")
     FileUpload4=document.getElementById("ctl00_ContentPlaceHolder1_FUP_Image4")
    
      FPath1=(FileUpload1.value).toUpperCase()	
      FPath2=(FileUpload2.value).toUpperCase()	
      FPath3=(FileUpload3.value).toUpperCase()	
      FPath4=(FileUpload4.value).toUpperCase()	
    if(TXTTitile.value=="")
    {
        alert("Please enter the title");
        TXTTitile.focus();
        return false;
    }
    else if(TXTRemarks.value=="")
    {
        alert("Please enter the remarks");
        TXTRemarks.focus();
        return false;
    }
    else if(TXTPrice.value=="")
    {
        alert("Please enter the price");
        TXTPrice.focus();
        return false;
    }
    else if(isNaN(TXTPrice.value))
    {
         alert("Please enter the price in numerics");
        TXTPrice.focus();
        return false;
    }
    
    else if(TXTbeds.value!="" &&isNaN(TXTbeds.value))
    {
         alert("Please enter the no.of bedrooms in numerals");
        TXTbeds.focus();
        return false;
    }
    else if(TXTbaths.value!="" && isNaN(TXTbaths.value))
    {
         alert("Please enter the no. of bathrooms in numerals");
        TXTbaths.focus();
        return false;
    }
    else if(TXTCity.value=="")
    {
        alert("Please enter the location");
        TXTCity.focus();
        return false;
    }
    
    if((eval(CHKDistance_0.checked!=true)) && (eval(CHKDistance_1.checked!=true)) && (eval(CHKDistance_2.checked!=true)) && (eval(CHKDistance_3.checked!=true))  )
    {
        alert("Please select the category");
        CHKDistance_0.focus();
        return false;
    }
//    else if(txt_time_to_lift.value=="")
//    {
//        alert("Please enter the time to lift by car");
//        TXTPrice.focus();
//        return false;
//    }
    else if((txt_time_to_lift.value!="") && (isNaN(txt_time_to_lift.value)))
    {
         alert("Please enter the time to lift by car in numerics");
        txt_time_to_lift.focus();
        return false;
    }
    else if(TXTemail.value=="")
    {
        alert("Please enter the email");
        TXTemail.focus();
        return false;
    }
   // else if(!isEmail(TXTemail.value))
//    {
//        alert("Please enter the valid email");
//        TXTemail.focus();
//        TXTemail.select();
//        return false;
//    }
	else if(TXTemail.value!="" && (TXTemail.value.indexOf("@",0)==-1 || TXTemail.value.indexOf(".",0)==-1))
		{
		 	alert("Please enter the valid email");
            TXTemail.focus();
            TXTemail.select();
            return false;
		}
//    else if(TXTconfirmemail.value=="")
//    {
//        alert("Please enter the confirm email");
//        TXTconfirmemail.focus();
//        return false;
//    }
//    else if(TXTconfirmemail.value!=TXTemail.value)
//    {
//        alert("Email Mismatch");
//        TXTconfirmemail.focus();
//        return false;
//    }
	 else if(TXTRealtorName.value!="" && TXTRealtorCompany.value=="" )
    {
        alert("Please enter the realtor company");
        TXTRealtorCompany.focus();
        return false;
    }
     else if(FPath1!= "" && (FPath1.indexOf(".BMP")<0 && FPath1.indexOf(".JPG")<0 && FPath1.indexOf(".GIF")<0 && FPath1.indexOf(".JPEG")<0 && FPath1.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload1.focus();
        return false;
    }
    else if(FPath2!= "" && (FPath2.indexOf(".BMP")<0 && FPath2.indexOf(".JPG")<0 && FPath2.indexOf(".GIF")<0 && FPath2.indexOf(".JPEG")<0 && FPath2.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload2.focus();
        return false;
    }
    else if(FPath3!= "" && (FPath3.indexOf(".BMP")<0 && FPath3.indexOf(".JPG")<0 && FPath3.indexOf(".GIF")<0 && FPath3.indexOf(".JPEG")<0 && FPath3.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload3.focus();
        return false;
    }
    else if(FPath4!= "" && (FPath4.indexOf(".BMP")<0 && FPath4.indexOf(".JPG")<0 && FPath4.indexOf(".GIF")<0 && FPath4.indexOf(".JPEG")<0 && FPath4.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload4.focus();
        return false;
    } 
    
    
}


//-------------------------------------------------------------------

function paidad()
{
     getthevalue();
     
     var check1=0;
       var dimensions= new Array("ChkLivingroom","ChkDiningroom","ChkFamilyroom","ChkKitchen","ChkBreakfastroom","ChkDen","ChkLaundry","ChkMasterbedroom","ChkBedroom2","ChkBedroom3","ChkBedroom4","ChkBedroom5","ChkBedroom6","ChkLibrary","ChkGameroom","ChkMudroom","ChkLoft","ChkMediaroom","ChkOffice","ChkPantry","ChkSunroom","ChkBararea","ChkSkiroom","Chk2ndkitchen");   
        for(i=0;i<24;i++)
        {
            if (eval(dimensions[i]).checked==true)
            check1=1
        }
     var xc=0;
        for(var i=0; i < 13; i++)
        {
            t= eval("document.getElementById('ctl00_ContentPlaceHolder1_CHKNearestResorts_"+i+"')");           
            if(t.checked==true)
            {
                xc=xc+1;
            } 
        }
     
    drp_adcategory=document.getElementById("ctl00_ContentPlaceHolder1_drp_adcategory")
    TXTTitile=document.getElementById("ctl00_ContentPlaceHolder1_TXTTitile")
    TXTRemarks=document.getElementById("ctl00_ContentPlaceHolder1_TXTRemarks")
    TXTPrice=document.getElementById("ctl00_ContentPlaceHolder1_TXTPrice")
    TXTCity=document.getElementById("ctl00_ContentPlaceHolder1_TXTCity")
    TXTtax=document.getElementById("ctl00_ContentPlaceHolder1_TXTtax")
    
    
    
    TXTbed=document.getElementById("ctl00_ContentPlaceHolder1_TXTbed")
    TXTdim=document.getElementById("ctl00_ContentPlaceHolder1_TXTdim")
    TXTsqr=document.getElementById("ctl00_ContentPlaceHolder1_TXTsqr")
    TXtmotage=document.getElementById("ctl00_ContentPlaceHolder1_TXtmotage")
    
    TXTtotalrooms=document.getElementById("ctl00_ContentPlaceHolder1_TXTtotalrooms")
    TXTgarage=document.getElementById("ctl00_ContentPlaceHolder1_TXTgarage")
    TXTparking=document.getElementById("ctl00_ContentPlaceHolder1_TXTparking")
    
    
    
    TXTemail=document.getElementById("ctl00_ContentPlaceHolder1_TXTemail")
   // TXTconfirmemail=document.getElementById("ctl00_ContentPlaceHolder1_TXTconfirmemail")
    
    CHKDistance_0=document.getElementById("ctl00_ContentPlaceHolder1_CHKDistance_0")
    CHKDistance_1=document.getElementById("ctl00_ContentPlaceHolder1_CHKDistance_1")
    CHKDistance_2=document.getElementById("ctl00_ContentPlaceHolder1_CHKDistance_2")
    CHKDistance_3=document.getElementById("ctl00_ContentPlaceHolder1_CHKDistance_3")


    TXTRealtorName=document.getElementById("ctl00_ContentPlaceHolder1_TXTRealtorName")
    TXTRealtorCompany=document.getElementById("ctl00_ContentPlaceHolder1_TXTRealtorCompany")
    TXTRealtorPhone=document.getElementById("ctl00_ContentPlaceHolder1_TXTRealtorPhone")
    TXTRealtorphoto=document.getElementById("ctl00_ContentPlaceHolder1_TXTRealtorphoto")
    
    TXTCompanylogo=document.getElementById("ctl00_ContentPlaceHolder1_TXTCompanylogo")
    TXTwebsite=document.getElementById("ctl00_ContentPlaceHolder1_TXTwebsite")


    FileUpload1=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload1")
    FileUpload2=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload2")
    FileUpload3=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload3")
    FileUpload4=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload4")
   
    FPath1=(FileUpload1.value).toUpperCase()	
    FPath2=(FileUpload2.value).toUpperCase()	
    FPath3=(FileUpload3.value).toUpperCase()	
    FPath4=(FileUpload4.value).toUpperCase()	
    
    FPath5=document.getElementById("ctl00_ContentPlaceHolder1_UP_realtor_foto")
    FPath6=document.getElementById("ctl00_ContentPlaceHolder1_UP_company_logo")
    
    realtor_foto=(FPath5.value).toUpperCase()	
    company_logo=(FPath6.value).toUpperCase()
    
    TXTbed=document.getElementById("ctl00_ContentPlaceHolder1_TXTbed")
    TXTbath=document.getElementById("ctl00_ContentPlaceHolder1_TXTbath")
    TXTdim=document.getElementById("ctl00_ContentPlaceHolder1_TXTdim")
   // TXTacres=document.getElementById("ctl00_ContentPlaceHolder1_TXTacres")
    TXTsq_feet=document.getElementById("ctl00_ContentPlaceHolder1_TXTsq_feet")
    TXTasses=document.getElementById("ctl00_ContentPlaceHolder1_TXTasses")
    TXTmotage=document.getElementById("ctl00_ContentPlaceHolder1_TXTmotage")
    TXTfeature=document.getElementById("ctl00_ContentPlaceHolder1_TXTfeature")
    
    TXTtime_to_lift=document.getElementById("ctl00_ContentPlaceHolder1_TXTtime_to_lift")
    TXTkeywords=document.getElementById("ctl00_ContentPlaceHolder1_TXTkeywords")
    TXTRealtorName=document.getElementById("ctl00_ContentPlaceHolder1_TXTRealtorName")
    
    TXTbuild=document.getElementById("ctl00_ContentPlaceHolder1_TXTbuild")
    
    
     homeowner=document.getElementById("ctl00_ContentPlaceHolder1_homeowner");
     realtor=document.getElementById("ctl00_ContentPlaceHolder1_realtor");
        
    if(drp_adcategory.value=="0")
    {
        alert("Please select the category");
        drp_adcategory.focus();
        return false;
    }
    else if(TXTTitile.value=="")
    {
        alert("Please enter the title");
        TXTTitile.focus();
        return false;
    }
    else if(TXTRemarks.value=="")
    {
        alert("Please enter the remarks");
        TXTRemarks.focus();
        return false;
    }
    else if(TXTPrice.value=="")
    {
        alert("Please enter the price");
        TXTPrice.focus();
        return false;
    }
    else if(isNaN(TXTPrice.value))
    {
        alert("Enter the price in numerics");
        TXTPrice.focus();
        return false;
    }
  //  else if(TXTtax.value=="")
//    {
//        alert("Please enter the tax");
//        TXTtax.focus();
//        return false;
//    }
    else if(drp_adcategory.value!="18" && isNaN(TXTtax.value))
    {
        alert("Enter the tax in numerics");
        TXTtax.focus();
        return false;
    }
    //else if(TXTCity.value=="")
//    {
//        alert("Please enter the city");
//        TXTCity.focus();
//        return false;
//    }
 	//else if(drp_adcategory.value!="18")
//    {
//        if(isNaN(TXTtax.value))
//        {
//            alert("Enter the tax in numerics");
//            TXTtax.focus();
//            return false;
//        }        
//    }
    //////else if(isNaN(TXTtime_to_lift.value))
//////    {
//////        alert("Enter the time to Lift by Car in numerics");
//////        TXTtime_to_lift.focus();
//////        return false;
//////    }
//////    else if(isNaN(TXTtime_to_lift.value))
//////    {
//////        alert("Please enter the vaild time to lift by car");
//////        TXTtime_to_lift.focus();
//////        return false;
//////    }
//////    else if(isNaN(TXTbuild.value))
//////    {
//////        alert("Enter the year build in numerics");
//////        TXTbuild.focus();
//////        return false;
//////    }
//////    else if(isNaN(TXTtotalrooms.value))
//////    {
//////        alert("Enter the total rooms in numerics");
//////        TXTtotalrooms.focus();
//////        return false;
//////    }
    //////else if(isNaN(TXTbed.value))
//////    {
//////        alert("Enter the bedrooms  in numerics");
//////        TXTbed.focus();
//////        return false;
//////    }
//////    else if(isNaN(TXTbath.value))
//////    {
//////        alert("Enter the bathrooms in numerics");
//////        TXTbath.focus();
//////        return false;
//////    }
//////    else if(isNaN(TXTgarage.value))
//////    {
//////        alert("Enter the garage in numerics");
//////        TXTgarage.focus();
//////        return false;
//////    }
//////    else if(isNaN(TXTparking.value))
//////    {
//////        alert("Enter the parking in numerics");
//////        TXTparking.focus();
//////        return false;
//////    }
   // else if(TXTacres.value!="" && isNaN(TXTacres.value))
//    {
//        alert("Enter the acres in numerics");
//        TXTacres.focus();
//        return false;
//    }
//    else if(TXTsq_feet.value!="" && isNaN(TXTsq_feet.value))
//    {
//        alert("Enter the square feet in numerics");
//        TXTsq_feet.focus();
//        return false;
//    }
//    else if(TXTasses.value!="" && isNaN(TXTasses.value))
//    {
//        alert("Enter the assesments in numerics");
//        TXTasses.focus();
//        return false;
//    }
//    else if(TXTmotage.value!="" && isNaN(TXTmotage.value))
//    {
//        alert("Enter the mortgage in numerics");
//        TXTmotage.focus();
//        return false;
//    }
    
    
    
    if((eval(CHKDistance_0.checked!=true)) && (eval(CHKDistance_1.checked!=true)) && (eval(CHKDistance_2.checked!=true)) && (eval(CHKDistance_3.checked!=true))  )
    {
        alert("Please select the category");
        CHKDistance_0.focus();
        return false;
    }
	else if(xc > 2)
    {
        alert("Nearby resort(s) allows maximum of two");
        return false;
    }
    else if(TXTkeywords.value=="")
    {
        alert("Please enter the keywords");
        TXTkeywords.focus();
        return false;
    }
    //      else if(check1==0)
//        {
//            alert("Please select the room dimension");
//            ChkLivingroom.focus();
//            return false;
//        }
        //else if(ChkLivingroom.checked==true && TxtLivingroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtLivingroom.focus();
//            return false;
//        }
        else if(ChkLivingroom.checked==false && TxtLivingroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkLivingroom.focus();
            return false;  
        }
        else if(TxtLivingroom.value!="" && !isSize(TxtLivingroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkDiningroom.checked==true && TxtDiningroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtDiningroom.focus();
//            return false;
//        }
        else if(ChkDiningroom.checked==false && TxtDiningroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkDiningroom.focus();
            return false;  
        }
        else if(TxtDiningroom.value!="" && !isSize(TxtDiningroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkFamilyroom.checked==true && TxtFamilyroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtFamilyroom.focus();
//            return false;
//        }
        else if(ChkFamilyroom.checked==false && TxtFamilyroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkFamilyroom.focus();
            return false;  
        }
        else if(TxtFamilyroom.value!="" && !isSize(TxtFamilyroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkKitchen.checked==true && TxtKitchen.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtKitchen.focus();
//            return false;
//        }
        else if(ChkKitchen.checked==false && TxtKitchen.value!="")
        {
           alert("Please Select  the dimension type");
            ChkKitchen.focus();
            return false;  
        }
        else if(TxtKitchen.value!="" && !isSize(TxtKitchen.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
       // else if(ChkBreakfastroom.checked==true && TxtBreakfastroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtBreakfastroom.focus();
//            return false;
//        }
        else if(ChkBreakfastroom.checked==false && TxtBreakfastroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkBreakfastroom.focus();
            return false;  
        }
        else if(TxtBreakfastroom.value!="" && !isSize(TxtBreakfastroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
       // else if(ChkDen.checked==true && TxtDen.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtDen.focus();
//            return false;
//        }
        else if(ChkDen.checked==false && TxtDen.value!="")
        {
           alert("Please Select  the dimension type");
            ChkDen.focus();
            return false;  
        }
        else if(TxtDen.value!="" && !isSize(TxtDen.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkLaundry.checked==true && TxtLaundry.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtLaundry.focus();
//            return false;
//        }
        else if(ChkLaundry.checked==false && TxtLaundry.value!="")
        {
           alert("Please Select  the dimension type");
            ChkLaundry.focus();
            return false;  
        }
        else if(TxtLaundry.value!="" && !isSize(TxtLaundry.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkMasterbedroom.checked==true && TxtMasterbedroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtMasterbedroom.focus();
//            return false;
//        }
        else if(ChkMasterbedroom.checked==false && TxtMasterbedroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkMasterbedroom.focus();
            return false;  
        }
        else if(TxtMasterbedroom.value!="" && !isSize(TxtMasterbedroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkBedroom2.checked==true && TxtBedroom2.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtBedroom2.focus();
//            return false;
//        }
        else if(ChkBedroom2.checked==false && TxtBedroom2.value!="")
        {
           alert("Please Select  the dimension type");
            ChkBedroom2.focus();
            return false;  
        }
        else if(TxtBedroom2.value!="" && !isSize(TxtBedroom2.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
       // else if(ChkBedroom3.checked==true && TxtBedroom3.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtBedroom3.focus();
//            return false;
//        }
        else if(ChkBedroom3.checked==false && TxtBedroom3.value!="")
        {
           alert("Please Select  the dimension type");
            ChkBedroom3.focus();
            return false;  
        }
        else if(TxtBedroom3.value!="" && !isSize(TxtBedroom3.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
       // else if(ChkBedroom4.checked==true && TxtBedroom4.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtBedroom4.focus();
//            return false;
//        }
        else if(ChkBedroom4.checked==false && TxtBedroom4.value!="")
        {
           alert("Please Select  the dimension type");
            ChkBedroom4.focus();
            return false;  
        }
        else if(TxtBedroom4.value!="" && !isSize(TxtBedroom4.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkBedroom5.checked==true && TxtBedroom5.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtBedroom5.focus();
//            return false;
//        }
        else if(ChkBedroom5.checked==false && TxtBedroom5.value!="")
        {
           alert("Please Select  the dimension type");
            ChkBedroom5.focus();
            return false;  
        }
        else if(TxtBedroom5.value!="" && !isSize(TxtBedroom5.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkBedroom6.checked==true && TxtBedroom6.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtBedroom6.focus();
//            return false;
//        }
        else if(ChkBedroom6.checked==false && TxtBedroom6.value!="")
        {
           alert("Please Select  the dimension type");
            ChkBedroom6.focus();
            return false;  
        }
        else if(TxtBedroom6.value!="" && !isSize(TxtBedroom6.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkLibrary.checked==true && TxtLibrary.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtLibrary.focus();
//            return false;
//        }
        else if(ChkLibrary.checked==false && TxtLibrary.value!="")
        {
           alert("Please Select  the dimension type");
            ChkLibrary.focus();
            return false;  
        }
        else if(TxtLibrary.value!="" && !isSize(TxtLibrary.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
       // else if(ChkGameroom.checked==true && TxtGameroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtGameroom.focus();
//            return false;
//        }
        else if(ChkGameroom.checked==false && TxtGameroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkGameroom.focus();
            return false;  
        }
        else if(TxtGameroom.value!="" && !isSize(TxtGameroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkMudroom.checked==true && TxtMudroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtMudroom.focus();
//            return false;
//        }
        else if(ChkMudroom.checked==false && TxtMudroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkMudroom.focus();
            return false;  
        }
        else if(TxtMudroom.value!="" && !isSize(TxtMudroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkLoft.checked==true && TxtLoft.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtLoft.focus();
//            return false;
//        }
        else if(ChkLoft.checked==false && TxtLoft.value!="")
        {
           alert("Please Select  the dimension type");
            ChkLoft.focus();
            return false;  
        }
        else if(TxtLoft.value!="" && !isSize(TxtLoft.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkMediaroom.checked==true && TxtMediaroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtMediaroom.focus();
//            return false;
//        }
        else if(ChkMediaroom.checked==false && TxtMediaroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkMediaroom.focus();
            return false;  
        }
        else if(TxtMediaroom.value!="" && !isSize(TxtMediaroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkOffice.checked==true && TxtOffice.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtOffice.focus();
//            return false;
//        }
        else if(ChkOffice.checked==false && TxtOffice.value!="")
        {
           alert("Please Select  the dimension type");
            ChkOffice.focus();
            return false;  
        }
        else if(TxtOffice.value!="" && !isSize(TxtOffice.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
       // else if(ChkPantry.checked==true && TxtPantry.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtPantry.focus();
//            return false;
//        }
        else if(ChkPantry.checked==false && TxtPantry.value!="")
        {
            alert("Please Select  the dimension type");
            ChkPantry.focus();
            return false;  
        }
        else if(TxtPantry.value!="" && !isSize(TxtPantry.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        //else if(ChkSunroom.checked==true && TxtSunroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtSunroom.focus();
//            return false;
//        }
        else if(ChkSunroom.checked==false && TxtSunroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkSunroom.focus();
            return false;  
        }
        else if(TxtSunroom.value!="" && !isSize(TxtSunroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
       // else if(ChkBararea.checked==true && TxtBararea.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtBararea.focus();
//            return false;
//        }
        else if(TxtBararea.value!="" && !isSize(TxtBararea.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        else if(ChkBararea.checked==false && TxtBararea.value!="")
        {
           alert("Please Select  the dimension type");
            ChkBararea.focus();
            return false;  
        }
       // else if(ChkSkiroom.checked==true && TxtSkiroom.value=="")
//        {
//            alert("Please enter the room dimension");
//            TxtSkiroom.focus();
//            return false;
//        }
        else if(ChkSkiroom.checked==false && TxtSkiroom.value!="")
        {
           alert("Please Select  the dimension type");
            ChkSkiroom.focus();
            return false;  
        }
        else if(TxtSkiroom.value!="" && !isSize(TxtSkiroom.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
       // else if(Chk2ndkitchen.checked==true && Txt2ndkitchen.value=="")
//        {
//            alert("Please enter the room dimension");
//            Txt2ndkitchen.focus();
//            return false;
//        }
        else if(Chk2ndkitchen.checked==false && Txt2ndkitchen.value!="")
        {
           alert("Please Select  the dimension type");
            Chk2ndkitchen.focus();
            return false;  
        }
         else if(Txt2ndkitchen.value!="" && !isSize(Txt2ndkitchen.value))
        {
            alert("Room dimension should be in the format 10X10");
            return false;
        }
        
        else if (homeowner.checked==false && realtor.checked==false)
        {
            alert("Please select who is posting the ad ?");
            homeowner.focus();
            return false;
                    
        }
        
        
        
    else if(TXTRealtorName.value=="")
    {
        alert("Please enter the name");
        TXTRealtorName.focus();
        return false;
    }
    else if(TXTemail.value=="")
    {
        alert("Please enter the email");
        TXTemail.focus();
        return false;
    }
  //  else if(!isEmail(TXTemail.value))
//    {
//        alert("Enter the valid email");
//        TXTemail.focus();
//        TXTemail.select();
//        return false;
//    }TXTRealtorCompany

	else if(TXTRealtorCompany.value=="" && homeowner.checked==false )
    {
        alert("Please enter the realtor company");
        TXTRealtorCompany.focus();
        return false;
    }
	else if(TXTemail.value!="" && (TXTemail.value.indexOf("@",0)==-1 || TXTemail.value.indexOf(".",0)==-1))
	{
		alert("Please enter the valid email");
		TXTemail.focus();
		TXTemail.select();
		return false;
	}
//    else if(TXTconfirmemail.value=="")
//    {
//        alert("Please enter the confirm email");
//        TXTconfirmemail.focus();
//        return false;
//    }
//    else if(TXTconfirmemail.value!=TXTemail.value)
//    {
//        alert("Email Mismatch");
//        TXTconfirmemail.focus();
//        return false;
//    }
    
  
    else if(realtor_foto!= "" && (realtor_foto.indexOf(".BMP")<0 && realtor_foto.indexOf(".JPG")<0 && realtor_foto.indexOf(".GIF")<0 && realtor_foto.indexOf(".JPEG")<0 && realtor_foto.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FPath5.focus();
        return false;
    }
    else if(company_logo!= "" && (company_logo.indexOf(".BMP")<0 && company_logo.indexOf(".JPG")<0 && company_logo.indexOf(".GIF")<0 && company_logo.indexOf(".JPEG")<0 && company_logo.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FPath6.focus();
        return false;
    }
  
  
    else if(FPath1!= "" && (FPath1.indexOf(".BMP")<0 && FPath1.indexOf(".JPG")<0 && FPath1.indexOf(".GIF")<0 && FPath1.indexOf(".JPEG")<0 && FPath1.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload1.focus();
        return false;
    }
    else if(FPath2!= "" && (FPath2.indexOf(".BMP")<0 && FPath2.indexOf(".JPG")<0 && FPath2.indexOf(".GIF")<0 && FPath2.indexOf(".JPEG")<0 && FPath2.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload2.focus();
        return false;
    }
    else if(FPath3!= "" && (FPath3.indexOf(".BMP")<0 && FPath3.indexOf(".JPG")<0 && FPath3.indexOf(".GIF")<0 && FPath3.indexOf(".JPEG")<0 && FPath3.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload3.focus();
        return false;
    }
    else if(FPath4!= "" && (FPath4.indexOf(".BMP")<0 && FPath4.indexOf(".JPG")<0 && FPath4.indexOf(".GIF")<0 && FPath4.indexOf(".JPEG")<0 && FPath4.indexOf(".PNG")<0))
    {
        alert("Please upload the correct image file")
        FileUpload4.focus();
        return false;
    } 

}














function getthevalue()
{
        TxtLivingroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtLivingroom")
        ChkLivingroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkLivingroom")

        TxtDiningroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtDiningroom")
        ChkDiningroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkDiningroom")

        TxtFamilyroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtFamilyroom")
        ChkFamilyroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkFamilyroom")

        TxtKitchen=document.getElementById("ctl00_ContentPlaceHolder1_TxtKitchen")
        ChkKitchen=document.getElementById("ctl00_ContentPlaceHolder1_ChkKitchen")

        TxtBreakfastroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtBreakfastroom")
        ChkBreakfastroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkBreakfastroom")

        TxtDen=document.getElementById("ctl00_ContentPlaceHolder1_TxtDen")
        ChkDen=document.getElementById("ctl00_ContentPlaceHolder1_ChkDen")

        TxtLaundry=document.getElementById("ctl00_ContentPlaceHolder1_TxtLaundry")
        ChkLaundry=document.getElementById("ctl00_ContentPlaceHolder1_ChkLaundry")

        TxtMasterbedroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtMasterbedroom")
        ChkMasterbedroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkMasterbedroom")

        TxtBedroom2=document.getElementById("ctl00_ContentPlaceHolder1_TxtBedroom2")
        ChkBedroom2=document.getElementById("ctl00_ContentPlaceHolder1_ChkBedroom2")

        TxtBedroom3=document.getElementById("ctl00_ContentPlaceHolder1_TxtBedroom3")
        ChkBedroom3=document.getElementById("ctl00_ContentPlaceHolder1_ChkBedroom3")

        TxtBedroom4=document.getElementById("ctl00_ContentPlaceHolder1_TxtBedroom4")
        ChkBedroom4=document.getElementById("ctl00_ContentPlaceHolder1_ChkBedroom4")

        TxtBedroom5=document.getElementById("ctl00_ContentPlaceHolder1_TxtBedroom5")
        ChkBedroom5=document.getElementById("ctl00_ContentPlaceHolder1_ChkBedroom5")

        TxtBedroom6=document.getElementById("ctl00_ContentPlaceHolder1_TxtBedroom6")
        ChkBedroom6=document.getElementById("ctl00_ContentPlaceHolder1_ChkBedroom6")

        TxtLibrary=document.getElementById("ctl00_ContentPlaceHolder1_TxtLibrary")
        ChkLibrary=document.getElementById("ctl00_ContentPlaceHolder1_ChkLibrary")

        TxtGameroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtGameroom")
        ChkGameroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkGameroom")

        TxtMudroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtMudroom")
        ChkMudroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkMudroom")

        TxtLoft=document.getElementById("ctl00_ContentPlaceHolder1_TxtLoft")
        ChkLoft=document.getElementById("ctl00_ContentPlaceHolder1_ChkLoft")

        TxtMediaroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtMediaroom")
        ChkMediaroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkMediaroom")

        TxtOffice=document.getElementById("ctl00_ContentPlaceHolder1_TxtOffice")
        ChkOffice=document.getElementById("ctl00_ContentPlaceHolder1_ChkOffice")

        TxtPantry=document.getElementById("ctl00_ContentPlaceHolder1_TxtPantry")
        ChkPantry=document.getElementById("ctl00_ContentPlaceHolder1_ChkPantry")

        TxtSunroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtSunroom")
        ChkSunroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkSunroom")

        TxtBararea=document.getElementById("ctl00_ContentPlaceHolder1_TxtBararea")
        ChkBararea=document.getElementById("ctl00_ContentPlaceHolder1_ChkBararea")

        TxtSkiroom=document.getElementById("ctl00_ContentPlaceHolder1_TxtSkiroom")
        ChkSkiroom=document.getElementById("ctl00_ContentPlaceHolder1_ChkSkiroom")

        Txt2ndkitchen=document.getElementById("ctl00_ContentPlaceHolder1_Txt2ndkitchen")
        Chk2ndkitchen=document.getElementById("ctl00_ContentPlaceHolder1_Chk2ndkitchen")
}

function isSize(txt)
{
 	if(txt.match(/^[0-9]{1,3}(X|x)[0-9]{1,3}$/))
	{
		return true;
	}
	else 
	{
		return false;
	}
}


function setCheckbox(val,val1)
{       
     getthevalue();
    if(eval(val).checked==true)
    {
        eval(val1).style.display="";
    }
    else
    {
       eval(val1).style.display="none";
       eval(val1).value="";
    }
        
}


function opendelete(id,position)
{
 	window.open( "http://www.snowlist.com/delete-listing-image.aspx?ID="+id+"&POSITION="+position , "myWindow","status = 1, height = 300, width = 300,resizable = No,left=200,top=100,screenX=0,screenY=100" )
}