

function OpWin(image){

window.open('','Home','width=320,height=388,scrollbars=1,scrollbar=yes');

}


//Build arrays for each counties cities
Locations=new Array(6);
Locations[0]=new Array(1);
Locations[1]=new Array(15);
Locations[2]=new Array(5);
Locations[3]=new Array(19);
Locations[4]=new Array(20);
Locations[5]=new Array(1);

Locations[0][0]="-----Select the City-----";


//Davis
Locations[1][0]="Clearfield";
Locations[1][1]="Clinton";
Locations[1][2]="Farmington";
Locations[1][3]="Fruit Heights";
Locations[1][4]="Kaysville";
Locations[1][5]="Layton";
Locations[1][6]="Sunset";
Locations[1][7]="Bountiful";
Locations[1][8]="Centerville";
Locations[1][9]="North Salt Lake";
Locations[1][10]="South Weber";
Locations[1][11]="Val Verda";
Locations[1][12]="West Bountiful";
Locations[1][13]="West Point";
Locations[1][14]="Woods Cross";

			
//Morgan
Locations[2][0]="Morgan";
Locations[2][1]="Croydon";
Locations[2][2]="Mountain Green";
Locations[2][3]="Peterson";
Locations[2][4]="Porterville";



//Weber
Locations[3][0]="Huntsville";
Locations[3][1]="Marriot Slaterville";
Locations[3][2]="North Ogden";
Locations[3][3]="Ogden";
Locations[3][4]="Plain City";
Locations[3][5]="Pleasant View";
Locations[3][6]="Riverdale";
Locations[3][7]="Roy";
Locations[3][8]="South Ogden";
Locations[3][9]="South Weber";
Locations[3][10]="Uintah";
Locations[3][11]="Eden";
Locations[3][12]="West Warren";
Locations[3][13]="West Haven";
Locations[3][14]="West Weber";
Locations[3][15]="Washington Terrace";
Locations[3][16]="Warren";
Locations[3][17]="Hooper";
Locations[3][18]="Harrisville";


//Box Elder
Locations[4][0]="Brigham";
Locations[4][1]="Logan";
Locations[4][2]="Collinston";
Locations[4][3]="Corrinne";
Locations[4][4]="Deweyville";
Locations[4][5]="Elwood";
Locations[4][6]="Fielding";
Locations[4][7]="Garland";
Locations[4][8]="Grouse Creek";
Locations[4][9]="Honeyville";
Locations[4][10]="Howell";
Locations[4][11]="Mantua";
Locations[4][12]="Park Valley";
Locations[4][13]="Perry";
Locations[4][14]="Plymouth";
Locations[4][15]="Portage";
Locations[4][16]="Riverside";
Locations[4][17]="Snowville";
Locations[4][18]="Tremonton";
Locations[4][19]="Willard";


Locations[5][0]="Other";
		



function Init()
{
   document.form.locn_code.selectedIndex=0;
   document.form.locn_code.options.length=0;
}


//Call this to build the Location list for the specified District

function BuildLocations(num)
{
   //Select the first Location
   document.form.locn_code.selectedIndex=0;
   document.form.locn_code.options.length=0;
   //For every location in the array for this district, add a new option
   for(ctr=0;ctr<Locations[num].length;ctr++)
   {
      document.form.locn_code.options[ctr]=new Option(Locations[num][ctr],Locations[num][ctr]);
   }
   //Set the length of the select list
   document.form.locn_code.length=Locations[num].length;
}



function jumpPage(buy) {
    calc = 'calculator.htm';
    window.location.href = calc;
    }


function floor(number)
{
  return Math.floor(number*Math.pow(10,2))/Math.pow(10,2);
}

function dosum()
{
  var mi = document.temps.IR.value / 1200;
  var base = 1;
  var mbase = 1 + mi;
  for (i=0; i<document.temps.YR.value * 12; i++)
  {
    base = base * mbase
  }
  document.temps.PI.value = floor(document.temps.LA.value * mi / ( 1 - (1/base)))
  document.temps.MT.value = floor(document.temps.AT.value / 12)
  document.temps.MI.value = floor(document.temps.AI.value / 12)
  var dasum = document.temps.LA.value * mi / ( 1 - (1/base)) +
	document.temps.AT.value / 12 + 
	document.temps.AI.value / 12;
  document.temps.MP.value = floor(dasum);
}



x = "Nobody Sells More Real Estate Than RE/MAX!!!!!             "
x = x + x
i = 0

function Scroll(){
    window.defaultStatus=x.substring(i,x.length) + x
    i++
    if (i==x.length)
       i=0 ;
    tid=setTimeout("Scroll()", 100)
}

y="  "
function stopScroll(){
    window.defaultStatus=" "
    window.clearTimeout(tid);
} 