function validateregister()
{
myform = document.myform
if(myform.username.value=="")
{
alert("Please key in your username");
return false;
}
else if(myform.password.value=="")
{
alert("Please key in your password");
return false;
}
else if(myform.password1.value=="")
{
alert("Please key in your confirm password");
return false;
}
else if(myform.email.value=="" && myform.phone1.value=="" && myform.phone2.value=="")
{
if(myform.email.value=="")
{
alert("Please key in your email");
return false;
}
else if(myform.phone1.value=="")
{
alert("Please key in your phone");
return false;
}
else if(myform.phone2.value=="")
{
alert("Please key in your phone");
return false;
}
}
return true;
}
function editauction(no)
{
answer=confirm("Your data on this page has not been saved, if you continue your data will be lost");
if(answer)
{
location.href="/edit-auction/"+no;
}
}
function OpenWronginfo()
{
if(document.getElementById("flagpost_wronginfo").style.display=="block")
{
document.getElementById("flagpost_wronginfo").style.display="none";
}
else
{
document.getElementById("flagpost_wronginfo").style.display="block";
}
document.getElementById("flagpost_spam").style.display="none";
document.getElementById("flagpost_miscategorized").style.display="none";
}
function OpenSpam()
{
if(document.getElementById("flagpost_spam").style.display=="block")
{
document.getElementById("flagpost_spam").style.display="none";
}
else
{
document.getElementById("flagpost_spam").style.display="block";
}
document.getElementById("flagpost_wronginfo").style.display="none";
document.getElementById("flagpost_miscategorized").style.display="none";
}
function OpenMiscategorized()
{
if(document.getElementById("flagpost_miscategorized").style.display=="block")
{
document.getElementById("flagpost_miscategorized").style.display="none";
}
else
{
document.getElementById("flagpost_miscategorized").style.display="block";
}
document.getElementById("flagpost_wronginfo").style.display="none";
document.getElementById("flagpost_spam").style.display="none";
}
function validateeditprofile()
{
myform = document.myform
if(myform.password.value!="" || myform.password1.value!="" || myform.oldpassword.value!="")
{
if(myform.password.value=="")
{
alert("Please key in your new password");
return false;
}
else if(myform.password1.value=="")
{
alert("Please key in your new confirm password");
return false;
}
else if(myform.oldpassword.value=="")
{
alert("Please key in your old password");
return false;
}
else if(myform.password.value!=myform.password1.value)
{
alert("new password and confirm new password are different");
return false;
}
else if(myform.oldpassword.value!=myform.hiddenpassword.value)
{
alert("old password is not correct");
return false;
}
return true;
}
}
function auctionmanage(no,countnum)
{
answer=confirm("Are you sure you want to delete this auction?");
if(answer)
{
Effect.Fade(countnum);
var totalcount=document.getElementById("totalcountnum").value;
var count=countnum++;
for(var i=count;i <=totalcount; i++)
{
var color=document.getElementById(i).style.backgroundColor;
if(color=="rgb(241, 246, 255)")
{
document.getElementById(i).style.backgroundColor="rgb(245, 253, 241)";
}
else if(color=="rgb(245, 253, 241)")
{
document.getElementById(i).style.backgroundColor="rgb(241, 246, 255)";
}
if(color=="#f1f6ff")
{
document.getElementById(i).style.backgroundColor="#f5fdf1";
}
else if(color=="#f5fdf1")
{
document.getElementById(i).style.backgroundColor="#f1f6ff";
}
}
deleteauction(no);
}
}
function newauctioneeropen(agent) {
if(agent=="Others")
{
document.getElementById("newauctioneertable").style.display="block";
}
else {
document.getElementById("newauctioneertable").style.display="none";
}
}
function validateaddproperty()
{
myform = document.myform
if(myform.notlogin.value==1)
{
if(myform.username.value=="")
{
alert("Please key in your username");
return false;
}
else if(myform.password.value=="")
{
alert("Please key in your password");
return false;
}
else if(myform.password1.value=="")
{
alert("Please key in your confirm password");
return false;
}
else if(myform.password.value!=myform.password1.value)
{
alert("Your password and confirm password are different");
return false;
}
else if(myform.type.value=="")
{
alert("Please select your property type");
return false;
}
else if(myform.price.value=="")
{
alert("Please key in your price");
return false;
}
else if(myform.address1.value=="")
{
alert("Please key in your address 1");
return false;
}
else if(myform.postcode.value=="")
{
alert("Please key in your postcode");
return false;
}
else if(myform.city.value=="")
{
alert("Please key in your city");
return false;
}
else if(myform.state.value=="")
{
alert("Please select your state");
return false;
}
else if(myform.contactname.value=="")
{
alert("Please key in your contact name");
return false;
}
else if(myform.phone1.value=="" && myform.phone2.value=="" && myform.email.value=="")
{
if(myform.phone1.value=="")
{
alert("Please key in your contact no");
return false;
}
else if(myform.phone2.value=="")
{
alert("Please key in your contact no");
return false;
}
else if(myform.email.value=="")
{
alert("Please key in your email");
return false;
}
}
return true;
}
else if(myform.notlogin.value!=1)
{
if(myform.type.value=="")
{
alert("Please select your property type");
return false;
}
else if(myform.price.value=="")
{
alert("Please key in your price");
return false;
}
else if(myform.address1.value=="")
{
alert("Please key in your address 1");
return false;
}
else if(myform.postcode.value=="")
{
alert("Please key in your postcode");
return false;
}
else if(myform.city.value=="")
{
alert("Please key in your city");
return false;
}
else if(myform.state.value=="")
{
alert("Please select your state");
return false;
}
else if(myform.contactname.value=="")
{
alert("Please key in your contact name");
return false;
}
else if(myform.phone1.value=="" && myform.phone2.value=="" && myform.email.value=="")
{
if(myform.phone1.value=="")
{
alert("Please key in your contact no");
return false;
}
else if(myform.phone2.value=="")
{
alert("Please key in your contact no");
return false;
}
else if(myform.email.value=="")
{
alert("Please key in your email");
return false;
}
}
return true;
}
}
function addupload() {
parent.document.getElementById("dl").style.height=document.body.scrollHeight+40+"px";
var numLines =document.getElementById("count").value;
var count=document.getElementById("countimage").value;
if(numLines < 5 && count < 5)
{
var e=document.getElementById("upload");
var divIdName = "upload"+numLines;
var newdiv = document.createElement('div');
newdiv.id = divIdName;
newdiv.style.display="block";
newdiv.innerHTML="
Primary Photo
";
e.appendChild(newdiv);
numLines++;
count++;
document.getElementById("countimage").value=count;
}
else
{
alert("Sorry, you just can upload 5 image only");
}
document.getElementById('count').value=numLines;
}
function validateupload()
{
var count=document.getElementById('count').value;
for(var i=0;i primary photo";
e.appendChild(newdiv);
numLines++;
count++;
document.getElementById("countimage").value=count;
}
else
{
alert("Sorry, you just can upload 5 image only");
}
document.getElementById('count').value=numLines;
}
function validateupload()
{
var count=document.getElementById('count').value;
for(var i=0;i";
e.appendChild(newdiv);
numLines++;
count++;
document.getElementById("countimage").value=count;
document.getElementById('count').value=numLines;
}
function addfriend1() {
var numLines =document.getElementById('count').value;
++numLines;
var e=document.getElementById("emailfriend");
var divIdName = "upload"+numLines;
var newdiv = document.createElement('div');
newdiv.id = divIdName;
newdiv.style.display="block";
newdiv.innerHTML="Friend's Name Friend's Email
";
e.appendChild(newdiv);
document.getElementById('count').value=numLines;
return true;
}
function predescription()
{
var descriptionword="";
var afterfirst=0;
if(document.getElementById("1").checked)
{
descriptionword+="Covered Parking";
afterfirst=1;
}
if(document.getElementById("2").checked)
{
if(afterfirst==1)
{
descriptionword+=",";
}
descriptionword+="Playground";
afterfirst=1;
}
if(document.getElementById("3").checked)
{
if(afterfirst==1)
{
descriptionword+=",";
}
descriptionword+="Swimming Pool";
afterfirst=1;
}
if(document.getElementById("4").checked)
{
if(afterfirst==1)
{
descriptionword+=",";
}
descriptionword+="24hr Security";
afterfirst=1;
}
if(document.getElementById("5").checked)
{
if(afterfirst==1)
{
descriptionword+=",";
}
descriptionword+="Mini Market";
afterfirst=1;
}
if(document.getElementById("6").checked)
{
if(afterfirst==1)
{
descriptionword+=",";
}
descriptionword+="Jogging Track";
afterfirst=1;
}
document.getElementById("description").innerHTML=descriptionword;
}
/*-------------------my-propertick.php--------------------------*/
function favouritefunction(no,countnum) {
answer=confirm("Are you sure you want to delete this favourite?");
if(answer)
{
Effect.Fade(countnum);
var totalcount=document.getElementById("totalcountnum").value;
var count=countnum++;
for(var i=count;i <=totalcount; i++)
{
var color=document.getElementById(i).style.backgroundColor;
if(color=="rgb(241, 246, 255)")
{
document.getElementById(i).style.backgroundColor="rgb(245, 253, 241)";
}
else if(color=="rgb(245, 253, 241)")
{
document.getElementById(i).style.backgroundColor="rgb(241, 246, 255)";
}
if(color=="#f1f6ff")
{
document.getElementById(i).style.backgroundColor="#f5fdf1";
}
else if(color=="#f5fdf1")
{
document.getElementById(i).style.backgroundColor="#f1f6ff";
}
}
deletefavourite(no);
}
}
function addnote(countnum)
{
document.getElementById("row"+countnum).style.display="block";
document.getElementById("addnote"+countnum).style.display="none";
document.getElementById("buttoncreate"+countnum).style.display="block";
document.getElementById("favourite"+countnum).style.borderWidth="1px";
}
function cancel(countnum,note)
{
if(document.getElementById("imageopen"+countnum).style.display=="none")
{
document.getElementById("button"+countnum).style.display="none";
document.getElementById("addnote"+countnum).style.display="block";
document.getElementById("row"+countnum).style.display="none";
document.getElementById("favourite"+countnum).style.borderWidth="1px";
document.getElementById("favourite"+countnum).style.overflow="auto";
}
else if(document.getElementById("imageopen"+countnum).style.display!="none")
{
document.getElementById("row"+countnum).style.display="block";
document.getElementById("imageopen"+countnum).innerHTML="[hide]";
document.getElementById("favourite"+countnum).readOnly=true;
document.getElementById("button"+countnum).style.display="none";
document.getElementById("buttonbelowedit"+countnum).style.display="block";
document.getElementById("favourite"+countnum).style.borderWidth="0px";
document.getElementById("favourite"+countnum).style.overflow="hidden";
}
}
function cancelcreate(countnum,note)
{
document.getElementById("favourite"+countnum).style.borderWidth="0px";
document.getElementById("favourite"+countnum).style.overflow="hidden";
document.getElementById("addnote"+countnum).style.display="block";
document.getElementById("buttoncreate"+countnum).style.display="none";
document.getElementById("row"+countnum).style.display="none";
}
function opennote(countnum)
{
if(document.getElementById("imageopen"+countnum).innerHTML=="[show]")
{
document.getElementById("row"+countnum).style.display="block";
document.getElementById("imageopen"+countnum).innerHTML="[hide]";
document.getElementById("favourite"+countnum).readOnly=true;
document.getElementById("button"+countnum).style.display="none";
document.getElementById("buttonbelowedit"+countnum).style.display="block";
document.getElementById("favourite"+countnum).style.borderWidth="0px";
document.getElementById("favourite"+countnum).style.overflow="hidden";
}
else
{
document.getElementById("row"+countnum).style.display="none";
document.getElementById("imageopen"+countnum).innerHTML="[show]";
document.getElementById("favourite"+countnum).readOnly=false;
document.getElementById("button"+countnum).style.display="none";
document.getElementById("buttonbelowedit"+countnum).style.display="none";
document.getElementById("favourite"+countnum).style.borderWidth="1px";
document.getElementById("favourite"+countnum).style.overflow="auto";
}
}
function editnote(countnum)
{
document.getElementById("favourite"+countnum).readOnly=false;
document.getElementById("button"+countnum).style.display="block";
document.getElementById("buttonbelowedit"+countnum).style.display="none";
document.getElementById("favourite"+countnum).style.borderWidth="1px";
document.getElementById("favourite"+countnum).style.overflow="auto";
}
function checknotetype(countnum,notetype)
{
for(var i=1;i<= countnum; i++)
{
if(notetype=="1" || notetype=="")
{
if(document.getElementById("imageopen"+i).style.display!="none")
{
document.getElementById("row"+i).style.display="block";
document.getElementById("imageopen"+i).innerHTML="[hide]";
document.getElementById("favourite"+i).readOnly=true;
document.getElementById("button"+i).style.display="none";
document.getElementById("buttonbelowedit"+i).style.display="block";
document.getElementById("favourite"+countnum).style.borderWidth="0px";
document.getElementById("favourite"+countnum).style.overflow="hidden";
}
}
}
}
/*-----------------------end my-propertick.php----------------------------*/
/*-------------------my-searches.php------------------------------------*/
function deletesearcher(searchId)
{
var answer=confirm("Are you sure you want to delete this question?");
if(answer==true)
{
Effect.Fade("tablealert"+searchId);
deleteSearchRecord(searchId);
}
}
/*-------------------end my-searches.php--------------------------------*/
/*---------------------my-searches.php----------------------------------*/
function submit(countnum) {
document.getElementById("myForm"+countnum).submit();
}
/*-----------------------end my-searches.php-----------------------------*/
/*--------------------property-detail.php----------------------------*/
function ViewFullQuestion(num)
{
document.getElementById("shortquestion"+num).style.display="none";
document.getElementById("longquestion"+num).style.display="block";
}
function ViewFullAnswer(num)
{
document.getElementById("shortanswer"+num).style.display="none";
document.getElementById("longanswer"+num).style.display="block";
}
function ViewShortQuestion(num)
{
document.getElementById("shortquestion"+num).style.display="block";
document.getElementById("longquestion"+num).style.display="none";
}
function ViewShortAnswer(num)
{
document.getElementById("shortanswer"+num).style.display="block";
document.getElementById("longanswer"+num).style.display="none";
}
function listQA(num)
{
for(var i=6; i <= num ; i++)
{
document.getElementById("listQA"+i).style.display="block";
}
document.getElementById("viewquestion").innerHTML="view 5 questions only";
}
function simpleQA(num)
{
for(var i=6; i <= num ; i++)
{
document.getElementById("listQA"+i).style.display="none";
}
document.getElementById("viewquestion").innerHTML="view all questions";
}
function alertuser()
{
alert('Sorry, you are the owner of property');
}
/*----------------end property-detail.php-------------------*/
/*------------------start my-properties.php--------------------*/
function propertymanagefunction(id,purpose,countnum)
{
answer=confirm("Are you sure you want to delete this property?");
if(answer)
{
Effect.Fade(countnum);
var totalcount=document.getElementById("totalcountnum").value;
var count=countnum++;
for(var i=count;i <=totalcount; i++)
{
var color=document.getElementById(i).style.backgroundColor;
if(color=="rgb(241, 246, 255)")
{
document.getElementById(i).style.backgroundColor="rgb(245, 253, 241)";
}
else if(color=="rgb(245, 253, 241)")
{
document.getElementById(i).style.backgroundColor="rgb(241, 246, 255)";
}
if(color=="#f1f6ff")
{
document.getElementById(i).style.backgroundColor="#f5fdf1";
}
else if(color=="#f5fdf1")
{
document.getElementById(i).style.backgroundColor="#f1f6ff";
}
}
deleteproperty(id,purpose);
}
}
function deleteRequest(no,request_id)
{
answer=confirm("Are you sure you want to delete this request?");
if(answer)
{
Effect.Fade(no);
var totalcount=document.getElementById("totalcountnum").value;
var count=no++;
for(var i=count;i <=totalcount; i++)
{
var color=document.getElementById(i).style.backgroundColor;
if(color=="rgb(241, 246, 255)")
{
document.getElementById(i).style.backgroundColor="rgb(245, 253, 241)";
}
else if(color=="rgb(245, 253, 241)")
{
document.getElementById(i).style.backgroundColor="rgb(241, 246, 255)";
}
if(color=="#f1f6ff")
{
document.getElementById(i).style.backgroundColor="#f5fdf1";
}
else if(color=="#f5fdf1")
{
document.getElementById(i).style.backgroundColor="#f1f6ff";
}
}
deleteRequests(request_id);
}
}
function deleteSavedRequest(no,savedrequest_id)
{
answer=confirm("Are you sure you want to delete this saved request?");
if(answer)
{
Effect.Fade(no);
var totalcount=document.getElementById("totalcountnum").value;
var count=no++;
for(var i=count;i <=totalcount; i++)
{
var color=document.getElementById(i).style.backgroundColor;
if(color=="rgb(241, 246, 255)")
{
document.getElementById(i).style.backgroundColor="rgb(245, 253, 241)";
}
else if(color=="rgb(245, 253, 241)")
{
document.getElementById(i).style.backgroundColor="rgb(241, 246, 255)";
}
if(color=="#f1f6ff")
{
document.getElementById(i).style.backgroundColor="#f5fdf1";
}
else if(color=="#f5fdf1")
{
document.getElementById(i).style.backgroundColor="#f1f6ff";
}
}
deleteSavedRequests(savedrequest_id);
}
}
function deletearticle(articleid,countnum)
{
answer=confirm("Are you sure you want to delete this article?");
if(answer)
{
Effect.Fade(countnum);
var totalcount=document.getElementById("totalcountnum").value;
var count=countnum++;
for(var i=count;i <=totalcount; i++)
{
var color=document.getElementById(i).style.backgroundColor;
if(color=="rgb(241, 246, 255)")
{
document.getElementById(i).style.backgroundColor="rgb(245, 253, 241)";
}
else if(color=="rgb(245, 253, 241)")
{
document.getElementById(i).style.backgroundColor="rgb(241, 246, 255)";
}
if(color=="#f1f6ff")
{
document.getElementById(i).style.backgroundColor="#f5fdf1";
}
else if(color=="#f5fdf1")
{
document.getElementById(i).style.backgroundColor="#f1f6ff";
}
}
deletearticles(articleid);
}
}
function deletequestion(no,countnum)
{
var answer=confirm("Are you sure you want to delete this question?");
if(answer==true)
{
Effect.Fade("qNa"+countnum);
deleteq(no);
}
}
function ShowPropertiesAnswer(num)
{
if(document.getElementById("showword"+num).innerHTML=="[Hide]")
{
document.getElementById("answer"+num).readOnly=true;
document.getElementById("answer"+num).style.borderWidth="0px";
document.getElementById("answer"+num).style.overflow="hidden";
document.getElementById("answerrow"+num).style.display="none";
document.getElementById("showword"+num).innerHTML="[Show]";
document.getElementById("editanswer"+num).style.display="none";
}
else if(document.getElementById("showword"+num).innerHTML=="[Show]")
{
document.getElementById("answerrow"+num).style.display="block";
document.getElementById("showword"+num).innerHTML="[Hide]";
document.getElementById("editanswer"+num).style.display="inline";
}
else
{
document.getElementById("answer"+num).readOnly=false;
document.getElementById("answer"+num).style.borderWidth="1px";
document.getElementById("answer"+num).style.overflow="auto";
document.getElementById("answerrow"+num).style.display="block";
document.getElementById("AnswerSaveWord"+num).style.display="inline";
}
}
function CancelAnswer(num)
{
document.getElementById("answer"+num).readOnly=true;
document.getElementById("answer"+num).style.borderWidth="0px";
document.getElementById("answer"+num).style.overflow="hidden";
document.getElementById("answerrow"+num).style.display="none";
if(document.getElementById("showword"+num).innerHTML=="[Hide]")
{
document.getElementById("showword"+num).innerHTML="[Show]";
}
document.getElementById("editanswer"+num).style.display="none";
}
function OpenSave(num)
{
document.getElementById("answer"+num).readOnly=false;
document.getElementById("answer"+num).style.borderWidth="1px";
document.getElementById("answer"+num).style.overflow="auto";
document.getElementById("EditSaveWord"+num).style.display="inline";
document.getElementById("editanswer"+num).style.display="none";
}
function CancelEditAnswer(num)
{
var currentanswer=document.getElementById("currentanswer"+num).innerHTML;
document.getElementById("answer"+num).value=currentanswer;
document.getElementById("editanswer"+num).style.display="inline";
document.getElementById("answer"+num).readOnly=true;
document.getElementById("answer"+num).style.borderWidth="0px";
document.getElementById("answer"+num).style.overflow="hidden";
document.getElementById("EditSaveWord"+num).style.display="none";
}
function SaveEditAnswer(num,no)
{
if(document.getElementById("answer"+num).value=="")
{
alert("Please key in your answer");
}
else
{
saveanswer(no,num);
var updateanswer=document.getElementById("answer"+num).value;
document.getElementById("currentanswer"+num).innerHTML=updateanswer;
document.getElementById("editanswer"+num).style.display="inline";
document.getElementById("answer"+num).readOnly=true;
document.getElementById("answer"+num).style.borderWidth="0px";
document.getElementById("answer"+num).style.overflow="hidden";
document.getElementById("EditSaveWord"+num).style.display="none";
}
}
function SaveAnswer(num,no)
{
if(document.getElementById("answer"+num).value=="")
{
alert("Please key in your answer");
}
else
{
saveanswer(no,num);
var updateanswer=document.getElementById("answer"+num).value;
document.getElementById("currentanswer"+num).innerHTML=updateanswer;
document.getElementById("showword"+num).innerHTML="[Hide]";
document.getElementById("showword1"+num).style.display="none";
document.getElementById("editanswer"+num).style.display="inline";
document.getElementById("answer"+num).readOnly=true;
document.getElementById("answer"+num).style.borderWidth="0px";
document.getElementById("answer"+num).style.overflow="hidden";
document.getElementById("AnswerSaveWord"+num).style.display="none";
}
}
function alertowner(id)
{
alert("Sorry, you are the owner of the property");
document.getElementById("checkbox"+id).checked=false;
}
/*-----------------END my-properties.php-----------------------*/
function openagentdata()
{
document.getElementById("sign_up_agent1").style.display="block";
}
function closeagentdata()
{
document.getElementById("sign_up_agent1").style.display="none";
}
function signupagentnew(agentno)
{
if(agentno=="Others")
{
document.getElementById("sign_up_agentnew").style.display="block";
}
else
{
document.getElementById("sign_up_agentnew").style.display="none";
}
}
function opennewagencies()
{
document.getElementById("new_agencies").style.display="block";
}
function open_new_agencies(agencies)
{
if(agencies=="Others")
{
document.getElementById("new_agencies_field").style.display="block";
}
else
{
document.getElementById("new_agencies_field").style.display="none";
}
}
function limitText(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
limitCount.value = limitNum - limitField.value.length;
}
}
function limitTextPostProperty(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
document.getElementById("countdown").innerHTML = limitNum - limitField.value.length;
}
}
function checknewcityvalue(value)
{
if(value=="Enter New City") {
document.getElementById("newcity").value="";
}
}
function auto_complete_lotsize()
{
var lotsize_w=document.getElementById("lotsize_w").value;
var lotsize_l=document.getElementById("lotsize_l").value;
if(lotsize_w!="" && lotsize_l!="") {
var totallotsize=lotsize_w * lotsize_l
document.getElementById("lotsize").value=totallotsize;
}
}
function showperpage(rowperpage) {
}
function open_change_password_field() {
document.getElementById("my_profile_change_password_field").style.display="block";
document.getElementById("my_profile_close").style.display="block";
}
function close_change_password_field() {
document.getElementById("my_profile_change_password_field").style.display="none";
document.getElementById("my_profile_close").style.display="none";
document.getElementById("oldpassword").value="";
document.getElementById("newpassword").value="";
document.getElementById("confirmnewpassword").value="";
}
function ManageRefineSearch(type) {
if(document.getElementById(type+"_info").style.display=="block")
{
document.getElementById(type+"_info").style.display="none";
document.getElementById(type+"_bullet").innerHTML="";
}
else
{
document.getElementById(type+"_info").style.display="block";
document.getElementById(type+"_bullet").innerHTML="";
}
}
function ManageRefineSearch_Price(type) {
if(document.getElementById(type+"_info").style.display=="none")
{
document.getElementById(type+"_info").style.display="block";
document.getElementById(type+"_bullet").innerHTML="";
}
else
{
document.getElementById(type+"_info").style.display="none";
document.getElementById(type+"_bullet").innerHTML="";
}
}
function OpenPropertyContent(type) {
if(type=="All")
{
document.getElementById("Residential_content").style.display="none";
document.getElementById("Commercial_content").style.display="none";
document.getElementById("Land_content").style.display="none";
}
else if(type=="Residential")
{
document.getElementById("Residential_content").style.display="block";
document.getElementById("Commercial_content").style.display="none";
document.getElementById("Land_content").style.display="none";
}
else if(type=="Commercial")
{
document.getElementById("Residential_content").style.display="none";
document.getElementById("Commercial_content").style.display="block";
document.getElementById("Land_content").style.display="none";
}
else if(type=="Land")
{
document.getElementById("Residential_content").style.display="none";
document.getElementById("Commercial_content").style.display="none";
document.getElementById("Land_content").style.display="block";
}
}
function validatesearch()
{
myform = document.form1
var keyword=myform.keywords.value;
var a=keyword.indexOf("RS");
var b=keyword.indexOf("RR");
var c=keyword.indexOf("RA");
var d=keyword.indexOf("CS");
var e=keyword.indexOf("CR");
var f=keyword.indexOf("CA");
var g=keyword.indexOf("LS");
var h=keyword.indexOf("LR");
var i=keyword.indexOf("LA");
if(a=="-1" && b=="-1" && c=="-1" && d=="-1" && e=="-1" && f=="-1" && g=="-1" && h=="-1" && i=="-1")
{
if(myform.state.value=="")
{
alert("Please select location");
myform.state.focus();
return false;
}
}
return true;
}
function validateadvancesearch()
{
myform = document.form1
var keyword=myform.keywords.value;
var a=keyword.indexOf("RS");
var b=keyword.indexOf("RR");
var c=keyword.indexOf("RA");
var d=keyword.indexOf("CS");
var e=keyword.indexOf("CR");
var f=keyword.indexOf("CA");
var g=keyword.indexOf("LS");
var h=keyword.indexOf("LR");
var i=keyword.indexOf("LA");
if(a=="-1" && b=="-1" && c=="-1" && d=="-1" && e=="-1" && f=="-1" && g=="-1" && h=="-1" && i=="-1")
{
if(myform.state.value=="")
{
alert("Please select state");
myform.state.focus();
return false;
}
}
return true;
}
function opensharethis()
{
if(document.getElementById("share_this_content").style.display=="block") {
document.getElementById("share_this_content").style.display="none";
document.getElementById("share_this_img").src="/images/plus.gif";
} else {
document.getElementById("share_this_content").style.display="block";
document.getElementById("share_this_img").src="/images/plus.gif";
}
}
function openanswer_question()
{
if(document.getElementById("answer_question_content").style.display=="" || document.getElementById("answer_question_content").style.display=="none") {
document.getElementById("answer_question_content").style.display="block";
} else {
document.getElementById("answer_question_content").style.display="none";
}
}
function OpenViewReply(no)
{
if(document.getElementById("OpenViewReply"+no).style.display=="block") {
document.getElementById("OpenViewReply"+no).style.display="none";
document.getElementById("View_word"+no).innerHTML="View";
}
else {
document.getElementById("OpenViewReply"+no).style.display="block";
document.getElementById("View_word"+no).innerHTML="Close";
}
}
function OpenReplySubContent(no)
{
if(document.getElementById("ReplySubContent"+no).style.display=="block") {
document.getElementById("ReplySubContent"+no).style.display="none";
} else {
document.getElementById("ReplySubContent"+no).style.display="block";
}
}