function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

//Homes JS

function printPage() {
  if (window.print)
    window.print()
  else
    alert("Sorry, your browser doesn't support this printing feature.");
}

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops);
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function stayFocused() {
    self.focus();
    setTimeout('stayFocused()',100);
}

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message = "This site's content, images and design are protected by US and international copyright laws.";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// Tax Calculator Code

function Calculate(theForm)
{
  if(theForm.Taxable_Value.value.match(/,/))
  {
    alert("No Commas in Market Value Please!");
    theForm.Taxable_Value.focus();
    return false;
  }

  if (theForm.Homestead[0].checked)
  {
    theForm.Estimated_Taxes.value = formatCurrency((theForm.Tax_District.value/1000) * (0.40*theForm.Taxable_Value.value-10000) );
  }
  else
  {
    theForm.Estimated_Taxes.value = formatCurrency(theForm.Tax_District.value/1000 * (0.40*theForm.Taxable_Value.value));
  } 

  return(false);
}

function ChangeValue()
{
  f.Estimated_Taxes.value = " Click Calculate Estimated Taxes";
}

function formatCurrency(num) {

if (num <= 0)
{
  return('0.00');
}
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '$' + num + '.' + cents);
}