function setPage(ndx)
  {
  var str = ""
  str += "<html><head><meta http-equiv='Content-Type' content='text/html;charset=utf-8'>"
  str += "<link rel=stylesheet type='text/css' href='mc_css.css'>"
  str += "<script type=text/javascript src='mc_main.js'></script></head>" 
  str += "<body bgcolor='#FFFFFF' style='margin-top:10px;margin-left:10px;height:413px;'>"
  if(ndx==0)
    {
     str += "<img align=right src='river.jpg'>"
    if(navigator.appVersion.substring(40,51) == "AppleWebKit")
     {
     str += "<p style='line-height:10px;'></p>" 
     }
    else
     {
     str += "<br><br>"
     } 
     str += "<span class='about'>Marjolein (Marjo) Cardon is a naturalized citizen from the Netherlands. She works at her office in town as well as at home so she can spend time with her family. Her business background includes starting Aurora Travel which was one of the two principal travel agencies in Homer for over 10 years. Marjo is simply a worker and can be found working at the office most days and also enjoys working from her home office as she is raising a daughter and stays very close to her.</span><br><br>" 
     str += "<span class='about'>Marjo owned and operated Aurora Travel on her commercial property here in downtown Homer. As owner and operator of this business with 9 agents in her employ, she became extremely successful setting up people's travel plans as well as holding up the business end of the agency, particularly all of the details involved in owning and operating such a large business under the wings of all the major airlines of the world. Marjo loves showing homes, kitchens, living rooms and our spectacular views, oceans, rivers and miles of gorgeous forested lands.</span>"
    if(navigator.appVersion.substring(40,51) == "AppleWebKit")
     {
     str += "<div style='line-height:3px;'></div>" 
     }
    else
     {
     str += "<br><br>"
     } 
     str += "<span class='about'>There are very few places more beautiful than Homer and selling real estate to people around this area is a total pleasure. Her attitude is if it takes a day or a year, she will help you search until you find what you are looking for. Aiming to please is number 1 in her book. Her strong business background and her enjoyment of meeting and helping people find simply what they want, make her a powerful ally.</span>"
    if(navigator.appVersion.substring(40,51) == "AppleWebKit")
     {
     str += "<div style='height:12px;'></div>" 
     }
     else
     {
     str += "<br><br>"
     } 
     str += "<img src='inbox.jpg' width=815 height=70>"
     str += "</body></html>"
     parent.pDetail.document.open()
     parent.pDetail.document.write(str)
     parent.pDetail.document.close()
     }

  if(ndx==1)
    {
    str += "<table cellspacing=0 cellpadding=0 style='width:815px;'><tr valign=top><td align='left'>"
    str += "<span class='about'><b>HOW TO REDUCE YOUR MORTGAGE:</b> "
    str += "It&#39;s easy and can save you thousands of dollars.  All you need to do is in the course of one year, try to make an extra mortgage payment and make sure that it is applied towards the principal of your loan.</span><ul>"
    str += "<li>Eg: A mortgage note of $100,000 over a 30 year period at 6.5% fixed interest rate.  You pay a total of $227,542.98 over that 30 years which comes to  $127,542.98 in interest payments....</li>"
    str += "<li>On this note, if you pay a one-time $5,000 payment  on the first day of year 6 for example, you will pay a total of $204,710.75 and the loan will be paid of in 27 years.  You save $22,832.23 !!!!!!!!!</li>"
    str += "</ul>"
    if(navigator.appVersion.substring(40,51)!="AppleWebKit")
    {
     str+= "<br>"
    } 
    str += "<span class='about'><b>HOW TO  IMPROVE YOUR CREDIT SCORE:</b> "
    str += "It is almost impossible to improve your credit score in the time that you are shopping for a home. You  really can&#39;t improve your  score at a moment&#39;s notice, but you can  work on it over a period of time to get it as high as possible.</span><ul>"
    str += "<li>1. Your payment history is very important, keep your payments on time And under the 30 day pay<br>&nbsp;&nbsp;&nbsp;&nbsp;period. Late payments work against you.</li>"
    str += "<li>2. Keep an eye on money in and money out, your budget, so you can stay On track. (Budget balancing)</li>"
    str += "<li>3. Don&#39;t &#34;max&#34; out your  credit cards.  Lower balances show Positive  on your credit ratings.</li>"
    str += "</ul><br>"
    str += "<span class='info'>Order a copy of your credit report: www.freecredit.com"
    str += "Sometimes the three credit reporting bureaus have debts  on your report that should have gone away a long time ago.  You will need to submit resolution of those items and then they will remove them from your credit report.  That can be time consuming but will be to your advantage.</span>"
    if(navigator.appVersion.substring(40,51)!="AppleWebKit")
    {
     if((navigator.appName=="Microsoft Internet Explorer") || (navigator.appName=="Opera"))
      {
      str+= "<br style='line-height:7px;'><br style='line-height:7px;'>"
      }
     else
      {
      str+= "<br style='line-height:10px;'><br style='line-height:10px;'>"
      }
    } 
    str += "</td><td class='apps' align='center'><span class='heading'>Bank Apps</span><br><br>"
    if (navigator.appVersion.substring(40,51)!= "AppleWebKit")
      {
      str += "<br>"
      }
    str += "<a href='https://www.alaskausa.org/realEstate/' target='_blank' class='cost'>Alaska USA</a><br><br>"
    str += "<a href='http://fnbalaska.mortgagewebcenter.com/Default.asp?bhcp&bhcp=1' target='_blank' class='cost'>First National Bank Alaska</a><br><br>"
    str += "<a href='https://www.wellsfargo.com/mortgage/' target='_blank' class='cost'>Wells Fargo</a><br><br>"
    str += "<a  class='cost' href='http://www.homeloansyoucanuse.com/' target='_blank'>Residential Mortgage</a><br><br><br>"
    if (navigator.appVersion.substring(40,51)!= "AppleWebKit")
      {
      str += "<br><br>"
      }
    str += "<a class='cost' href='List_of_Closing_Costs.pdf' target='_blank'>View List of<br>Closing Costs (pdf)</a><br>"
    str += "</td></tr></table>"
    if(navigator.appVersion.substring(40,51)!="AppleWebKit")
    {
     str+= "<br style='line-height:14px;'>"
    } 
    str += "<img src='inbox.jpg' width=815 height=70>"
    str += "</body></html>"
    parent.pDetail.document.open()
    parent.pDetail.document.write(str)
    parent.pDetail.document.close()
    }   

  if(ndx==3)
   {
    str += "<table cellspacing='0' cellpadding='0' style='width:815px;height:220px;'><tr><td>"
    if(navigator.appVersion.substring(40,51)=="AppleWbKit")
     {
     str += "<p style='height:72px';></p>"
     }
    else
     {
     if((navigator.appName!='Opera') && (navigator.appName!='Microsoft Internet Explorer'))
       {
       str += "<p style='height:3px';></p>"
       }
     }    
    str += "<div class='ihead'>View the Alaska Real Estate Commission<br><a class='acp' href='Alaska_Consumer_Pamphlet.pdf' target='_blank'>Consumer Pamphlet</a></div><br>"
    str += "<table cellspacing='0' cellpadding='0' style='height:210px;'><tr>"
    str += "<td class='ihead'>Important Links</td></tr>"
    str += "<tr><td><table class='info' cellspacing='0' cellpadding='0'>"
    str += "<tr><td align='center'><a class='info' href='http://www.borough.kenai.ak.us/' target='_blank'>Kenai Peninsula Borough</a></td>" 
    str += "<td align='center'><a class='info' href='http://www.ci.homer.ak.us/' target='_blank'>City of Homer</a></td></tr>" 
    str += "<tr><td align='center'><a class='info' href='http://www.homeralaska.org/' target='_blank'>Homer Chamber of Commerce</a></td><td></td></tr>" 
    str += "<table><br>"
    str += "<td class='ihead'>Favorite B&amp;Bs</td></tr>"
    str += "<table class='info' cellspacing='0' cellpadding='0'>"
    str += "<tr><td align='center' class='info'><a class='info' href='http://www.spruceacrecabins.com/' target='_blank'>Spruce Acre Cabins</a></td>"
    str += "<td align='center'><a class='info' href='http://www.kachemakridgehouse.com/' target='_blank'>Kachemak Ridge House</a></td></tr>"
    str += "<tr><td align='center'><a class='info' href='http://www.homeroceanhouse.com/' target='_blank'>Ocean House Inn</a></td>"
    str += "<td align='center'></td></tr>"
    str += "<table><br>"
    str += "<td class='ihead'>Favorite Charters</td></tr>"
    str += "<table class='info' cellspacing='0' cellpadding='0'>"
    str += "<tr><td align='center'><a class='info' href='http://captmike.com' target='_blank'>Captain Mike's Charters</a></td>"
    str += "<td align='center'><a class='info' href='http://www.magicwaterscharters.com/' target='_blank'>Magic Waters Charters</a></td></tr>"
    str += "<tr><td align='center'><a class='info' href='http://www.spiritcharters.com/' target='_blank'>Spirit Charters</a></td>"
    str += "<td align='center'><a class='info' href='http://falconcharters.com' target='_blank'>Falcon Charters</a></td></tr>"
    str += "</table><br></td></tr></table>"
    str += "</td><td align='center'>"
    str += "<span class='map'>Click on the map below to visit Google Maps, Satellite or Map views.<br><br>" 
    str += "<a href='http://maps.google.com/maps?f=q&hl=en&q=Homer,+AK+99603&ie=UTF8&z=13&ll=59.634087,-151.501808&spn=0.076105,0.326843&t=k&om=1' target='_blank'><img src='map.jpg' width='400' height='275' border='0'></a></span>"
    str += "</td></tr></table>"
    if(navigator.appName=='Opera')
      { 
      str += "<div style='height:27px';></div>"
      }
    else
      {
      if(navigator.appName=='Microsoft Internet Explorer')
        {
        str += "<div style='height:22px';></div>"
        }
      else
        {
        str += "<br>"
        } 
      }
    str += "<img src='inbox.jpg' width=815 height=70>"
    str += "</body></html>"
    parent.pDetail.document.open()
    parent.pDetail.document.write(str)
    parent.pDetail.document.close()
    }
  
  if(ndx==4)
   {
    str += "<table cellspacing=0 cellpadding=0 style='width:815px;'><tr><td>"
    str += "<a href='http://www.homer.alaska.remax.com/' class='ccontact'>RE/MAX of Homer</a><br><span class='ccontact'>Office:&nbsp;907-235-7733</span><br><br>"
    str += "<a class='ccontact' href='mailto:marjolein@alaska.net'>Marjolein@alaska.net</a><br><br>"
    str += "<table class='ctable'><tr><td align=right><table cellspacing=0 cellpadding=0 class='stamp'><tr><td><span class='stamp'>Place<br>Stamp<br>Here</td></tr></table></td></tr>"
    str += "<tr><td><span class='mcontact'>Marjolein Cardon</span><br><span class='mcontact'>RE/MAX of Homer</span><br><span class='mcontact'>412 E. Pioneer Ave. Suite 100</span><br><span class='mcontact'>Homer,&nbsp;AK</span><br>"
    str += "<span class='zcontact'>99603</span></td></tr></table></td>"
    if(navigator.appName == "Microsoft Internet Explorer")
      {
      str += "<br><br>"
      }

    if(navigator.appName=='Opera')
      {
      str += "<br style='line-height:34px;'>"
      }
    str += "<td align=center><div class='fheader'>Complete the Form below to receive more Information</div>"
    if(navigator.appName != "Microsoft Internet Explorer")
      {
      str += "<br><br>"
      }
    str += "<form name='wform' action='mc_Rcpt.asp' method='post'>"
    str += "<table cellspacing=0 cellpadding=8 style='width:370px;background:#EFEFEF;border:solid #000000 1px;font-family:Arial;font-size:10pt;'>"
    str += "<tr valign=bottom><td align=center><span class='map'>Enter List Number</span><br><br style='line-height:5px;'>"
    str += "<input type='text' size='5' name='List' id='List'></td>"
    str += "<td><span class='map'>OR</span></td>"
    str += "<td align=center><span class='map'>Select Property Type</span><br><br style='line-height:5px;'>"
    str += "<select name='Type' id='Type'>"
    str += "<option selected value='all'>All Properties</option>"
    str += "<option value='Homes'>Homes</option>"
    str += "<option value='Acreage'>Acreage</option>"
    str += "<option value='Commercial'>Commercial</option>"
    str += "</select></td></tr>"
    str += "<tr><td align='right' colspan='3'><span class='map'>Enter Email Address:</span><input type='text' name='Email' id='Email' size='32'><br><br style='line-height:5px;'></td></tr>"
    str += "<tr><td colspan=3><span class='map'>Additional Information:</span><br><textarea rows='3' cols='40' wrap='on' name='Information' id='Information'></textarea><br><br style='line-height:5px;'>"
    str += "<p style='text-align:right;margin:0px;'><input type='submit' value='Send'></p></tr></td></table>"
    str += "</form></td></tr></table>"
    if(navigator.appName == "Microsoft Internet Explorer")
     {
     str += "<p style='height:32px;margin:0px;'></p>"
     }
     else
     {
     if(navigator.appVersion.substring(40,51) == "AppleWebKit")
       {
       str += "<p style='height:37px;margin:0px;'></p>"
       }
     else
       {
       str += "<p style='height:10px';></p>"
       }
     }     
    str += "<img src='inbox.jpg' width=815 height=70>"
    str += "</body></html>"
    parent.pDetail.document.open()
    parent.pDetail.document.write(str)
    parent.pDetail.document.close()
   }  

  }

function data(mlist, marea, descript, price, lotsize, zone, taxID, mtype) 
{
this.mlist = mlist
this.marea = marea
this.descript = descript
this.price = price
this.lotsize = lotsize
this.zone = zone
this.taxID = taxID
this.mtype = mtype
}

function ReadList(arg)
{
var i
var x
var ptype
i = 0
x = 0
ptype = arg
var str = ""
var tok = ""
str += "<html><head><link rel=stylesheet type='text/css' href='mc_css.css'>"
str += "<script type=text/javascript src='mc_listing.js'></script>"
str += "<script type=text/javascript src='mc_main.js'></script>"
str += "</head><body style='margin-top:10px;margin-left:10px;height:420px;' bgcolor='#FFFFFF'>"
str += "<center><span class='heading'>"
if(ptype == "h")
  {
  str+= "Area Homes"
  }
if(ptype == "l")
  {
  str+= "Lots and Acreage"
  }
if(ptype == "c")
  {
  str+= "Commercial Property"
  }

str += "</span></center><br>"
for(i=0;i<getData.length;i++)
  {
  if(getData[i].mtype == ptype)
    {
    if(x%2)
      {
      str += "<table class='featureA'><tr><td rowspan=2>"
      }
      else
      {
      str += "<table class='featureB'><tr><td>"
      }
    str += "<img src='images/" + getData[i].mlist + ".jpg' width=260 height=195 alt='" + getData[i].mlist + " photo'></td>"
    str += "</td><td><span class='headtxt'>MLS Number: </span><span class='feature'>" + getData[i].mlist + "</span>&nbsp;&nbsp;&nbsp;&nbsp;"  
    str += "<span class='headtxt'>MLS Area: </span><span class='feature'>" + getData[i].marea + "</span><br><br><span class='headtxt'>Price: </span><span class='feature'>" + getData[i].price + "</span><br><span class='headtxt'>Lot size: </span><span class='feature'>" + getData[i].lotsize + " Acres</span><br>"
    str += "<span class='headtxt'>Zoning: </span><span class='feature'>" + getData[i].zone + "</span><br><span class='headtxt'>Tax ID: </span><span class='feature'>" + getData[i].taxID + "<br>"
    str += "<span class='headtxt'>Description: </span><br><span class='feature'>" + getData[i].descript + "</span></td></tr></table>"
    tok = ""
    x++
    }
  }

parent.pDetail.document.open()
parent.pDetail.document.write(str)
parent.pDetail.document.close()
}

function setBox(form)
{
form.uType.selectedIndex = 0
}

function passForm(form)
  {
  var tmp
  var chk
  chk = true
  tmp = wform.wlist.value
  if((tmp.length > 4) || (tmp.length > 1 && tmp.length < 4))
    {
    alert('Invalid List Number')
    chk = false
    }
  else
    {
    for(i=0;i<tmp.length+1;i++)
      {   
      if(isNaN(tmp.substring(i,i+1)) == true)
        { 
        alert('Invalid List Number')
        chk = false
        i = tmp.length + 1
        }
      }
    }
  tmp = wform.wmail.value
  if(tmp != wform.wmail2.value)
    {
    alert('Email Verification Does Not Match')
    chk = false
    }    
  if(chkMail(tmp)==false)
    {
    alert('Invalid Email Address')
    chk = false
    }

  tmp = wform.wlist.value
  tmp = wform.wcomment.value
  wform.wcomment.value=chkComment(tmp)
  wform.method = 'post'
  wform.action='mailto:Marjolein@alaska.net?Subject=Web_Page_Post'
  return chk
  }

function chkMail(t)
  {
   var p
   var x
   x = 0
   p = 0
   for(i=0;i<t.length-1;i++)
    {
     if(t.charAt(i)=='@')
       {
       p = 1
       x = i + 1
       i = t.length-1
       }
     }
   for(i=x;i<t.length-2;i++)
     {
     if(t.charAt(i)=='.')
       {
       p = p + 1
       i = t.length-2
       }
     }
  if(p < 2)
    {
    return false
    }
  else
    {
    return true
    }  
  }

function chkComment(t)
  {
  var tok
  tok = ''
  for(i=0;i<t.length;i++)
    {
    if(t.charAt(i)!='<' && t.charAt(i)!='>')
      {
       if(t.charAt(i)!='{' && t.charAt(i)!='}')
        {
        tok += t.substring(i,i+1)
        }
      }
    }
  return tok
  }


