
var location_drops=new Array('location_state','location_city','location_neigh');function toggleTabsNoEffects(tab_arr,tab_id){o_id='';if(tab_arr.length&&tab_arr.length>0){for(i=0;i<tab_arr.length;i++){o=document.getElementById(tab_arr[i]);if(o.id==tab_id){o_id=tab_id;}else if(o.id!=tab_id){o.style.display='none';}}}
if(o_id!=''){o=document.getElementById(o_id);o.style.display='inline';}}
function toggleTabs(tab_arr,tab_id){o_id='';if(document.getElementById(tab_id).style.display!='none')return;if(tab_arr.length&&tab_arr.length>0){for(i=0;i<tab_arr.length;i++){o=document.getElementById(tab_arr[i]);if(o.id==tab_id){o_id=tab_id;}else if(o.id!=tab_id){new Effect.BlindUp(tab_arr[i],{duration:0.5});}}}
if(o_id!=''){new Effect.BlindDown(o_id,{duration:0.5});}}
function hideDivObj(obj){obj.style.visibility='hidden';obj.style.display='none';}
function showDivObj(obj){obj.style.visibility='visible';obj.style.display='block';}
function showHideDivObj(obja,objb){showDivObj(obja);hideDivObj(objb);}
function hideDiv(id){obj=document.getElementById(id);hideDivObj(obj);}
function showDiv(id){obj=document.getElementById(id);showDivObj(obj);}
function toggleDiv(id){obj=document.getElementById(id);if(obj.style.visibility=='hidden'&&obj.style.display=='none'){showDivObj(obj);}else{hideDivObj(obj);}}
function searchToggle(on){if(on){hideDiv('location_specs');showDiv('loc_specs_button');showDiv('search_price');showDiv('search_specs');}else{showDiv('location_specs');hideDiv('loc_specs_button');hideDiv('search_price');hideDiv('search_specs');}}
function showHideDiv(ida,idb){obja=document.getElementById(ida);objb=document.getElementById(idb);showHideDivObj(obja,objb);}
function hideTabs(arr){for(i=0;i<arr.length;i++){hideDivObj(document.getElementById(arr[i]));}}
function showHideTabs(id,arr){hideTabs(arr);showDiv(id);}
function findPos(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}}
return[curleft,curtop];}
function findPosAdjusted(obj,x,y){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}
curleft+=x;curtop+=y;}
return[curleft,curtop];}
function popDiv(par_id,id,x,y){par=document.getElementById(par_id);obj=document.getElementById(id);pos=findPosAdjusted(par,x,y);if(pos[0]!=0){obj.style.top=pos[1]+'px';obj.style.left=pos[0]+'px';}
showDivObj(obj);}
function unPopDiv(id){hideDivObj(document.getElementById(id));}
function setLoc(obj,id){document.getElementById(id).value=obj.options[obj.options.selectedIndex].value;}
function clearBox(obj){obj.value='';}
function clearBoxValueIf(obj,val){if(obj.value==val){clearBox(obj);}
if(obj.value=="Reply to this comment."){clearBox(obj);}
if(obj.value=="Reply to this answer."){clearBox(obj);}}
function addCommas(nStr){nStr+='';x=nStr.split('.');x1=x[0];x2=x.length>1?'.'+x[1]:'';var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,'$1'+','+'$2');}
return x1+x2;}
function isInteger(sText){validChars="0123456789";isInt=true;for(i=0;i<sText.length&&isInt==true;i++){c=sText.charAt(i);if(validChars.indexOf(c)==-1){isInt=false;}}
return isInt;}
function getCssProperty(obj,prop){if(obj.currentStyle){prop=prop.replace(/-\D/gi,function(sMatch){return sMatch.charAt(sMatch.length-1).toUpperCase();});return obj.currentStyle[prop];}else if(document.defaultView){return document.defaultView.getComputedStyle(obj,null).getPropertyValue(prop);}else return null;}
function stripToInt(sText){validChars="0123456789";builtStr=[];for(i=0;i<sText.length;i++){c=sText.charAt(i);if(validChars.indexOf(c)>-1){builtStr.push(c);}}
return builtStr.join('');}
