
function bookmarksite(title,url){if(document.all)
window.external.AddFavorite(url,title);else if(window.sidebar)
window.sidebar.addPanel(title,url,"")}
function open_small_window(page,width,height){if(width==null){width=600;}
if(height==null){height=400;}
OpenWin=this.open(page,"CtrlWindow","toolbar=no,menubar=no,location=yes,scrollbars=yes,resizable=yes,width="+width+",height="+height);OpenWin.focus();}
var isMenuAct=false;function actMenuItem(imgName){isMenuAct=true;act(imgName);}
function inactMenuItem(imgName){isMenuAct=false;if(document.images){inact(imgName);}}
function act(imgName){if(document.images)
document[imgName].src=eval(imgName+"on.src");}
function inact(imgName){if(document.images)
document[imgName].src=eval(imgName+"off.src");}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function textbox_default(box,defval,focused){var val=box.value.toLowerCase();if(focused){if(val==defval.toLowerCase()){box.value='';}}else{if(val==defval.toLowerCase()||val==''){box.value=defval;}}}
function BrowserDetect(){var ua=navigator.userAgent.toLowerCase();this.isGecko=(ua.indexOf('gecko')!=-1&&ua.indexOf('safari')==-1);this.isAppleWebKit=(ua.indexOf('applewebkit')!=-1);this.isKonqueror=(ua.indexOf('konqueror')!=-1);this.isSafari=(ua.indexOf('safari')!=-1);this.isOmniweb=(ua.indexOf('omniweb')!=-1);this.isOpera=(ua.indexOf('opera')!=-1);this.isIcab=(ua.indexOf('icab')!=-1);this.isAol=(ua.indexOf('aol')!=-1);this.isIE=(ua.indexOf('msie')!=-1&&!this.isOpera&&(ua.indexOf('webtv')==-1));this.isMozilla=(this.isGecko&&ua.indexOf('gecko/')+14==ua.length);this.isFirebird=(ua.indexOf('firebird/')!=-1);this.isNS=((this.isGecko)?(ua.indexOf('netscape')!=-1):((ua.indexOf('mozilla')!=-1)&&!this.isOpera&&!this.isSafari&&(ua.indexOf('spoofer')==-1)&&(ua.indexOf('compatible')==-1)&&(ua.indexOf('webtv')==-1)&&(ua.indexOf('hotjava')==-1)));this.isIECompatible=((ua.indexOf('msie')!=-1)&&!this.isIE);this.isNSCompatible=((ua.indexOf('mozilla')!=-1)&&!this.isNS&&!this.isMozilla);this.geckoVersion=((this.isGecko)?ua.substring((ua.lastIndexOf('gecko/')+6),(ua.lastIndexOf('gecko/')+14)):-1);this.equivalentMozilla=((this.isGecko)?parseFloat(ua.substring(ua.indexOf('rv:')+3)):-1);this.appleWebKitVersion=((this.isAppleWebKit)?parseFloat(ua.substring(ua.indexOf('applewebkit/')+12)):-1);this.versionMinor=parseFloat(navigator.appVersion);if(this.isGecko&&!this.isMozilla){this.versionMinor=parseFloat(ua.substring(ua.indexOf('/',ua.indexOf('gecko/')+6)+1));}
else if(this.isMozilla){this.versionMinor=parseFloat(ua.substring(ua.indexOf('rv:')+3));}
else if(this.isIE&&this.versionMinor>=4){this.versionMinor=parseFloat(ua.substring(ua.indexOf('msie ')+5));}
else if(this.isKonqueror){this.versionMinor=parseFloat(ua.substring(ua.indexOf('konqueror/')+10));}
else if(this.isSafari){this.versionMinor=parseFloat(ua.substring(ua.lastIndexOf('safari/')+7));}
else if(this.isOmniweb){this.versionMinor=parseFloat(ua.substring(ua.lastIndexOf('omniweb/')+8));}
else if(this.isOpera){this.versionMinor=parseFloat(ua.substring(ua.indexOf('opera')+6));}
else if(this.isIcab){this.versionMinor=parseFloat(ua.substring(ua.indexOf('icab')+5));}
this.versionMajor=parseInt(this.versionMinor);this.isDOM1=(document.getElementById);this.isDOM2Event=(document.addEventListener&&document.removeEventListener);this.mode=document.compatMode?document.compatMode:'BackCompat';this.isWin=(ua.indexOf('win')!=-1);this.isWin32=(this.isWin&&(ua.indexOf('95')!=-1||ua.indexOf('98')!=-1||ua.indexOf('nt')!=-1||ua.indexOf('win32')!=-1||ua.indexOf('32bit')!=-1||ua.indexOf('xp')!=-1));this.isMac=(ua.indexOf('mac')!=-1);this.isUnix=(ua.indexOf('unix')!=-1||ua.indexOf('sunos')!=-1||ua.indexOf('bsd')!=-1||ua.indexOf('x11')!=-1)
this.isLinux=(ua.indexOf('linux')!=-1);this.isNS4x=(this.isNS&&this.versionMajor==4);this.isNS40x=(this.isNS4x&&this.versionMinor<4.5);this.isNS47x=(this.isNS4x&&this.versionMinor>=4.7);this.isNS4up=(this.isNS&&this.versionMinor>=4);this.isNS6x=(this.isNS&&this.versionMajor==6);this.isNS6up=(this.isNS&&this.versionMajor>=6);this.isNS7x=(this.isNS&&this.versionMajor==7);this.isNS7up=(this.isNS&&this.versionMajor>=7);this.isIE4x=(this.isIE&&this.versionMajor==4);this.isIE4up=(this.isIE&&this.versionMajor>=4);this.isIE5x=(this.isIE&&this.versionMajor==5);this.isIE55=(this.isIE&&this.versionMinor==5.5);this.isIE5up=(this.isIE&&this.versionMajor>=5);this.isIE6x=(this.isIE&&this.versionMajor==6);this.isIE6up=(this.isIE&&this.versionMajor>=6);this.isIE4xMac=(this.isIE4x&&this.isMac);}
var browser=new BrowserDetect();if((browser.isIE55||browser.isIE6up)&&browser.isWin32){var pngAlpha=true;}
function getCookie(check_name){var a_all_cookies=document.cookie.split(';');var a_temp_cookie='';var cookie_name='';var cookie_value='';var b_cookie_found=false;for(i=0;i<a_all_cookies.length;i++)
{a_temp_cookie=a_all_cookies[i].split('=');cookie_name=a_temp_cookie[0].replace(/^\s+|\s+$/g,'');if(cookie_name==check_name)
{b_cookie_found=true;if(a_temp_cookie.length>1)
{cookie_value=unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,''));}
return cookie_value;break;}
a_temp_cookie=null;cookie_name='';}
if(!b_cookie_found)
{return null;}}
function clearDefault(el){if(el.defaultValue==el.value)el.value=""}
function showAccountMenu(show){var accountdd=document.getElementById('account-dd');if(show){setLyr(accountdd,'account-dd-content',false);}else{setLyr(accountdd,'account-dd-content',true);}}
function setLyr(obj,lyr,hide)
{var x=document.getElementById(lyr);x.showing=!hide;var coors=findPos(obj);var mytop=coors[1]+26;x.style.top=mytop+'px';x.style.left=coors[0]+'px';if(!hide){x.style.visibility='visible';x.onmouseover=function(e){this.style.visibility='visible';x.showing=true;};x.onmouseout=function(e){this.style.visibility='hidden';x.showing=false;};}
if(hide){if(!x.showing){x.style.visibility='hidden';}}}
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 writeCHFFeaturedIframe(config){wi=0;ht=0;one_ht=125;one_wi=120;one_ht=125;one_wi=120;buffer=5;arrow_wi=32*2+5;arrow_ht=32+10;if(undefined===config.featured_type){featured_type="listing";}else{featured_type=config.featured_type;if(featured_type=="realtor"){if(undefined!=config.initial_realtor_image_width){one_wi=config.initial_realtor_image_width;}else{one_wi=133;}
one_ht=Math.round(1.46*one_wi)+35;}}
if(undefined===config.num_listings){num_listings="3";}else{num_listings=config.num_listings;}
if(undefined===config.orientation){orientation="h";}else{orientation=config.orientation;}
if(undefined===config.siteid){siteid="1";}else{siteid=config.siteid;}
if(orientation==="v"){if(undefined!=config.display_under_image){if(config.display_under_image=="p"){one_ht-=10;}}
for(i=0;i<num_listings;i++){ht+=one_ht;ht+=buffer;}
ht-=buffer;wi=one_wi;if(undefined!=config.fade){if(config.fade==1){ht+=arrow_ht
if(undefined!=config.hide_arrows){if(config.hide_arrows==1){ht-=arrow_ht}}}}}else{if(undefined!=config.display_under_image){if(config.display_under_image=="p"){wi-=10;}}
for(i=0;i<num_listings;i++){wi+=one_wi;wi+=buffer;}
wi-=buffer;ht=one_ht;if(undefined!=config.fade){if(config.fade==1){wi+=arrow_wi
if(undefined!=config.hide_arrows){if(config.hide_arrows==1){wi-=arrow_wi}}}}}
if(undefined!=config.featured_gallery_link){ht+=(4*buffer);}
var iframe_host='http://www.cohomefinder.com/static/';if(undefined!=config.iframe_url_prefix){iframe_host=config.iframe_url_prefix;}
var filename='featuredListings';if(featured_type=="realtor"){filename='featuredRealtors';}
var feat_src=iframe_host+filename+'.html?';feat_src+='&sid='+siteid;feat_src+='&ori='+orientation;feat_src+='&num='+num_listings;if(undefined!=config.candidate_list_size){feat_src+='&can='+config.candidate_list_size;}
if(undefined!=config.link_host){feat_src+='&lho='+encodeURIComponent(config.link_host);}
if(undefined!=config.source_id){feat_src+='&soi='+config.source_id;}
if(undefined!=config.jsp_displayed_ids){feat_src+='&jdi='+config.jsp_displayed_ids;}
if(undefined!=config.details_data_host){feat_src+='&ddh='+encodeURIComponent(config.details_data_host);}
if(undefined!=config.initial_realtor_image_width){feat_src+='&irw='+config.initial_realtor_image_width;}
if(undefined!=config.featured_data_host){feat_src+='&fdh='+encodeURIComponent(config.featured_data_host);}
if(undefined!=config.hide_arrows){feat_src+='&nar='+config.hide_arrows;}
if(undefined!=config.click_action){feat_src+='&cla='+config.click_action;if(config.click_action==='LB'){config.display_inline=1;}}
if(undefined!=config.dispid){dispid=config.dispid;}else{dispid="1";}
if(undefined!=config.open_new_window){feat_src+='&opn='+config.open_new_window;}
if(undefined!=config.fade){feat_src+='&fad='+config.fade;if(undefined!=config.fade_duration){feat_src+='&fdu='+config.fade_duration;}}
if(undefined!=config.featured_gallery_link){feat_src+='&fgl='+config.featured_gallery_link;if(config.featured_gallery_link){config.display_inline=1;}}
if(undefined!=config.no_links){feat_src+='&nl='+config.no_links;}
if(undefined!=config.load_images_immediately){feat_src+='&limg='+config.load_images_immediately;}
if(undefined!=config.static_image_base_url){feat_src+='&sib='+config.static_image_base_url;}
if(undefined!=config.display_under_image){feat_src+='&dis='+config.display_under_image;}
if(undefined!=config.preview_listing_start){feat_src+='&pls='+config.preview_listing_start;}
if(undefined!=config.alternate_preview){feat_src+='&apr='+config.alternate_preview;}
if(undefined!=config.featured_type){feat_src+='&typ='+config.featured_type;}
feat_src+='&ht='+ht;feat_src+='&wi='+wi;if(undefined!=config.relevance_tag){feat_src+='&rel='+escape(config.relevance_tag);}
if(undefined!=config.attach_to_spans&&config.attach_to_spans==1){feat_src+='&ats=1';config.only_write_config=1;}
if(config.display_inline!=1&&undefined!=config.bgcolor&&(navigator.appName=="Microsoft Internet Explorer"&&navigator.appVersion>="4.0")){feat_src+='&bgc='+config.bgcolor;}
if(config.display_inline){divstr_start='<div style="margin-left: auto; margin-right: auto; height: '+ht+'px; width: '+wi+'px" >';divstr_end='</div>';if(config.put_in_span){divstr_start='';divstr_end='';}
if(config.loaded_via_xhr==1){divstr=divstr_start+'<span id="featured-'+featured_type+'-display-home-'+dispid+'"><span id="featured-'+featured_type+'-display-config-'+dispid+'" style="display:none">'+feat_src+'</span>'+divstr_end;return divstr;}
divstr=divstr_start+'<span id="featured-'+featured_type+'-display-home-'+dispid+'"><img src="http://i.chf2.com/i/large-loading.gif" /> Loading...</span><span id="featured-'+featured_type+'-display-config-'+dispid+'" style="display:none">'+feat_src+'</span>'+divstr_end;if(config.only_write_config==1){divstr='<span id="featured-'+featured_type+'-display-config-'+dispid+'" style="display:none">'+feat_src+'</span>';}
if(undefined!=config.map_api_key){divstr+='<script src="http://maps.google.com/maps?file=api&v=2&key='+config.map_api_key+'" type="text/javascript"></script>';}
if(undefined!=config.gwt_module_url){divstr+='<script language="javascript" src="'+config.gwt_module_url+'" type="text/javascript"></script>';if(undefined!=config.featured_data_host){divstr+='<link rel="stylesheet" href="'+config.featured_data_host+'/css/chf.css" type="text/css" />';}}
document.write(divstr);}else{document.write('<ifr'+'ame'+' src='+feat_src+' width='+wi+' height='+ht+' frameborder='+'0'+' hspace=0'+' vspace=0'+' scrolling=no'+' marginwidth=0'+' marginheight=0'+' allowtransparency=true'+' ></ifr'+'ame>');}}
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}}
function printpage(){window.print();}
function Set_Cookie(name,value,expires,path,domain,secure)
{var today=new Date();today.setTime(today.getTime());if(expires)
{expires=expires*1000*60*60*24;}
var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+
((expires)?";expires="+expires_date.toGMTString():"")+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
((secure)?";secure":"");}
var getElementsByClassName=function(className,tag,elm){if(document.getElementsByClassName){getElementsByClassName=function(className,tag,elm){elm=elm||document;var elements=elm.getElementsByClassName(className),nodeName=(tag)?new RegExp("\\b"+tag+"\\b","i"):null,returnElements=[],current;for(var i=0,il=elements.length;i<il;i+=1){current=elements[i];if(!nodeName||nodeName.test(current.nodeName)){returnElements.push(current);}}
return returnElements;};}
else if(document.evaluate){getElementsByClassName=function(className,tag,elm){tag=tag||"*";elm=elm||document;var classes=className.split(" "),classesToCheck="",xhtmlNamespace="http://www.w3.org/1999/xhtml",namespaceResolver=(document.documentElement.namespaceURI===xhtmlNamespace)?xhtmlNamespace:null,returnElements=[],elements,node;for(var j=0,jl=classes.length;j<jl;j+=1){classesToCheck+="[contains(concat(' ', @class, ' '), ' "+classes[j]+" ')]";}
try{elements=document.evaluate(".//"+tag+classesToCheck,elm,namespaceResolver,0,null);}
catch(e){elements=document.evaluate(".//"+tag+classesToCheck,elm,null,0,null);}
while((node=elements.iterateNext())){returnElements.push(node);}
return returnElements;};}
else{getElementsByClassName=function(className,tag,elm){tag=tag||"*";elm=elm||document;var classes=className.split(" "),classesToCheck=[],elements=(tag==="*"&&elm.all)?elm.all:elm.getElementsByTagName(tag),current,returnElements=[],match;for(var k=0,kl=classes.length;k<kl;k+=1){classesToCheck.push(new RegExp("(^|\\s)"+classes[k]+"(\\s|$)"));}
for(var l=0,ll=elements.length;l<ll;l+=1){current=elements[l];match=false;for(var m=0,ml=classesToCheck.length;m<ml;m+=1){match=classesToCheck[m].test(current.className);if(!match){break;}}
if(match){returnElements.push(current);}}
return returnElements;};}
return getElementsByClassName(className,tag,elm);};function forwardFromDD(cknm,ckval,fwdloc){window.location=fwdloc;return true;}
if(!this.JSON){this.JSON={};}
(function(){function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());function showMapColumns(show){var style='';if(!show){style='none';}
var tds=getElementsByClassName("mapitTD","td");var th=getElementsByClassName("mapitTH","th");for(var obj in tds){tds[obj].style.display=style;}
for(var obj in th){th[obj].style.display=style;}}