// ================================
// All common js functions should be
// added here 
// ================================
function toggle(id) {  
   var state = document.getElementById(id).style.display;  
    if (state == 'block') {  
        document.getElementById(id).style.display = 'none';  
    } else {  
        document.getElementById(id).style.display = 'block';  
   }  
} 
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){x.src=x.oSrc;}}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3){if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc){x.oSrc=x.src;}
x.src=a[i+2];}}}
function MM_findObj(n,d){var p,i,x;if(!d){d=document;}
if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all){x=d.all[n];}
for(i=0;!x&&i<d.forms.length;i++){x=d.forms[i][n];}
for(i=0;!x&&d.layers&&i<d.layers.length;i++){x=MM_findObj(n,d.layers[i].document);}
if(!x&&d.getElementById){x=d.getElementById(n);}
return x;}
var newWindow=null;function pop(_8,x,y,z){var a="resizable=yes,scrollbars=yes, width="+y+",height="+z;if(newWindow!=null){if(newWindow.closed){newWindow=window.open(x,_8,a);}else{newWindow.resizeTo(y,z);newWindow.location=x;newWindow.focus();}}else{newWindow=window.open(x,_8,a);newWindow.focus();}}
function addBasicBookmark(_d,_e){if(window.sidebar){window.sidebar.addPanel(_e,_d,"");}else{if(window.external){window.external.AddFavorite(_d,_e);}else{if(window.opera&&window.print){var _f=document.createElement("a");_f.setAttribute("rel","sidebar");_f.setAttribute("href",_d);_f.setAttribute("title",_e);_f.click();}else{alert("Sorry this feature is not available on your browser please do so manually");}}}}
function goLocation(_10){document.property.q.value=_10;document.property.submit();}
function toggleTab(_4,_5){var _6;if(_5=="lower"){_6=lowertabs;}else{_6=uppertabs;}
var _7=document.getElementById(_4).firstChild;var _8=_7.getAttribute("id").split("_");var _5=_8[0];var _9=_8[2];var _a=(_9=="on")?"off":"on";var id;if(_9=="on"){return;}
resizeMap(_5);for(var i=0;i<_6.length;i++){if(_6[i]==_5){document.getElementById(_6[i]+"_tab_"+_9).setAttribute("id",_6[i]+"_tab_"+_a);var _4=location_root+_6[i]+"_"+_a+".gif";setRollovers(location_root,_6[i],_a);document.getElementById(_6[i]+"_tab_"+_a).src=_4;document.getElementById("paging_"+_6[i]).style.display="block";if(_6[i]=="school"){showMarkers("school");}else{if(_6[i]=="sexoffender"){showMarkers("offender");}else{if(_6[i]=="sports"){document.getElementById("business_palette_location").style.display="none";}}}}else{id=(document.getElementById(_6[i]+"_tab_"+_a))?_6[i]+"_tab_"+_a:_6[i]+"_tab_"+_9;document.getElementById(id).setAttribute("id",_6[i]+"_tab_"+_9);var _4=location_root+_6[i]+"_"+_9+".gif";setRollovers(location_root,_6[i],_9);document.getElementById(_6[i]+"_tab_"+_9).src=_4;document.getElementById("paging_"+_6[i]).style.display="none";if(_6[i]=="school"){hideMarkers("school");}else{if(_6[i]=="sexoffender"){hideMarkers("offender");}else{if(_6[i]=="sports"){document.getElementById("business_palette_location").style.display="block";}}}}}}



