// lazy abbreviation

d=document;

// image rollovers

if (d.images){
  homeon = new Image();
  homeon.src = "../images/global/nav/home_on.gif";
  homeoff = new Image();
  homeoff.src = "../images/global/nav/home_off.gif";
  abouton = new Image();
  abouton.src = "../images/global/nav/about_on.gif";
  aboutoff = new Image();
  aboutoff.src = "../images/global/nav/about_off.gif";
  hfson = new Image();
  hfson.src = "../images/global/nav/hfs_on.gif";
  hfsoff = new Image();
  hfsoff.src = "../images/global/nav/hfs_off.gif";
  toolkiton = new Image();
  toolkiton.src = "../images/global/nav/toolkit_on.gif";
  toolkitoff = new Image();
  toolkitoff.src = "../images/global/nav/toolkit_off.gif";
  schoolon = new Image();
  schoolon.src = "../images/global/nav/school_on.gif";
  schooloff = new Image();
  schooloff.src = "../images/global/nav/school_off.gif";
  summiton = new Image();
  summiton.src = "../images/global/nav/summit_on.gif";
  summitoff = new Image();
  summitoff.src = "../images/global/nav/summit_off.gif";
  buysellon = new Image();
  buysellon.src = "../images/global/nav/buysell_on.gif";
  buyselloff = new Image();
  buyselloff.src = "../images/global/nav/buysell_off.gif";
  newsletteron = new Image();
  newsletteron.src = "../images/global/nav/newsletter_on.gif";
  newsletteroff = new Image();
  newsletteroff.src = "../images/global/nav/newsletter_off.gif";
  linkson = new Image();
  linkson.src = "../images/global/nav/links_on.gif";
  linksoff = new Image();
  linksoff.src = "../images/global/nav/links_off.gif";
  contacton = new Image();
  contacton.src = "../images/global/nav/contact_on.gif";
  contactoff = new Image();
  contactoff.src = "../images/global/nav/contact_off.gif";
}

	function changeImages() {
 	 if (d.images) {
   	 for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

// turn topnav to on state

function setnav(){
	
if (location.href.indexOf("/home/") != -1){
  homeoff = new Image();
  homeoff.src = "../images/global/nav/home_on.gif";
  d.home.src="../images/global/nav/home_on.gif";
  }
else if (location.href.indexOf("/about/") != -1){
  aboutoff = new Image();
  aboutoff.src = "../images/global/nav/about_on.gif";
  d.about.src="../images/global/nav/about_on.gif";
  }
else if (location.href.indexOf("/hfs/") != -1){
  hfsoff = new Image();
  hfsoff.src = "../images/global/nav/hfs_on.gif";
  d.hfs.src="../images/global/nav/hfs_on.gif";
  }
else if (location.href.indexOf("/toolkit/") != -1){
  toolkitoff = new Image();
  toolkitoff.src = "../images/global/nav/toolkit_on.gif";
  d.toolkit.src="../images/global/nav/toolkit_on.gif";
  }
else if (location.href.indexOf("/school/") != -1){
  schooloff = new Image();
  schooloff.src = "../images/global/nav/school_on.gif";
  d.school.src="../images/global/nav/school_on.gif";
  }
else if (location.href.indexOf("/summit/") != -1){
  summitoff = new Image();
  summitoff.src = "../images/global/nav/summit_on.gif";
  d.summit.src="../images/global/nav/summit_on.gif";
  }
else if (location.href.indexOf("/buysell/") != -1){
  buyselloff = new Image();
  buyselloff.src = "../images/global/nav/buysell_on.gif";
  d.buysell.src="../images/global/nav/buysell_on.gif";
  }
else if (location.href.indexOf("/newsletter/") != -1){
  newsletteroff = new Image();
  newsletteroff.src = "../images/global/nav/newsletter_on.gif";
  d.newsletter.src="../images/global/nav/newsletter_on.gif";
  }
else if (location.href.indexOf("/links/") != -1){
  linksoff = new Image();
  linksoff.src = "../images/global/nav/links_on.gif";
  d.links.src="../images/global/nav/links_on.gif";
  }
else if (location.href.indexOf("/contact/") != -1){
  contactoff = new Image();
  contactoff.src = "../images/global/nav/contact_on.gif";
  d.contact.src="../images/global/nav/contact_on.gif";
  }
}


	
// window pop

function popwin(url,name,width,height){
window.name="daddy";
window.open(url,name,'width='+width+',height='+height+',location=0,address=0,noresize,resizable=0,toolbar=0,scrollbars=0');
}


// form validator

function checkrequired(which) {
var pass=true;
if (d.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please make sure the "+shortFieldName+" field was properly completed.");
return false;
}
else
return true;
}

// testimonials- scattered randomly throughout site

function writetest(){

<!-- how many testimonials are there in this city? -->
testimonial = new Array(36);

<!-- arrays for testimonials -->

testimonial[0] = "&quot;The Team was not only very professional and friendly they marketed and closed my condo in about 1/3 the time I expected.  Thanks Debbie and Team-&quot; <b>Tom Hoban</b>";

testimonial[1] = "&quot;Wendy Peppard listened to us and selected perfect mountain properties for us to consider.  She made buying our Colorado house fun.&quot; <b>Audrey Corson, MD</b>";

testimonial[2] = "&quot;Margaret and Everyone at Tri-Mountain are very upbeat and fun to work with.  And they were so involved through every step.  Truly made the process easy as possible.&quot; <b>Elizabeth Petrey</b>";

testimonial[3] = "&quot;We are so happy we chose Tri mountain RE for the sale of our DVW condo and the purchase of a larger townhome.  Debbie, Wendy, Margaret and Kelly surpassed our expectations and we will recommend Tri Mtn to all of our friends.&quot; <b>Rob and Heidi Stenhammer</b>";

testimonial[4] = "&quot;Wendy proved that not all Realtors are worthless, like the ones that we have previously experienced!  She knows everyone in Summit County.   Debbie Belcher's Mtn Team work together to get the job done.  They are persistent, knowledgeable, and a pleasure to work with.&quot; <b>Teena Ofsowitz</b>";

testimonial[5] = "&quot;Tri Mountain was very good to deal with and knowledgeable about the going market rate.  When it came to crunch time they really came through for us.&quot; <b>Chuck Glady</b>";

testimonial[6] = "&quot;Dear Tri-Mtn Real Estate, you have inundated me with wonderful gifts!  Now I'm the one who should Thank You!  The Summit Hiker Book is a treasure, The Welcome plaque is very special & the Blockbuster card will be lots of fun!  When the time arises, I will seek your services in the future.  In the meantime, I'll refer- as long as our special Margaret is close by!&quot; <b>Lisa Avery</b>";

testimonial[7] = "&quot;Debbie, Wendy, Kelli, Margaret- Thank you, to all of you, for a beautiful holiday party.  Obviously, alot of time and work went into it- & it was well done!   Thanks, also, for all of the goodies Bob & I keep receiving- the book, the welcome plaque, and the movie gift certificate.  It's fun to receive all these little things!&quot; <b>Bob and Susie Bergman</b>";

testimonial[8] = "&quot;Thank you for sponsoring the coloring contest and for the bags of popcorn.  The kids had a great time and really appreciate your generosity.&quot; <b>Lavone Haskins</b>";

testimonial[9] = "&quot;Dear Tri-Mountain Real Estate,  Thank you so much for the wonderful scooter.  I will really enjoy it.  I think it is a very  generous and cool gift!&quot; <b>Thomas Sawyer, Summit Cove Elementary</b>";

testimonial[10] = "&quot;Dear Debbie & Team,  It was a joy to be a part of the purchase of your DVE listing.  This was Dan's first exposure & he was spoiled.  Let's do another deal.&quot;  <b>Nancy Gregory, GRI  Coldwell Banker, Colorado Rockies Real Estate.</b>";

testimonial[11] = "&quot;Margaret & Debbie,  Hello!  Thank you so much for finding my new home in Dillon!  Trumyn (my Dog) and I are so happy here and the neighbors are wonderful.  You were able to find the right price, location, & size for my first home.&quot; <b>Melody Dunn</b>";

testimonial[12] = "&quot;Debbie,  Thanks so much for helping Tom.  He is a great guy!  I have another cadet looking to buy in Dillon soon.  I will pass him on to you.  I have lots of ways to market for you and will help grow both of our businesses!!  Give me a call and lets work together.&quot;  <b>Robyn Bryant, Front Range Home Mortgage, Inc.</b>";

testimonial[13] = "&quot;When I was ready to sell my Silver Queen West condo I called Debbie and Margaret at Tri-Mountain Real Estate.  They listened to my needs and helped me decide on an asking price.  I needed to get top dollar for my home and Debbie and Margaret made sure that I did.  They were extremely helpful from our first conversation to moving day and beyond.  They even helped me find my new home.  I highly recommend The Mountain Team at Tri-Mountain Real Estate to help you with all your real estate needs.&quot; <b>Jaye Stretesky</b>";

testimonial[14] = "&quot;When I was ready to upgrade from a condo to a Single Family Home I called Debbie and Margaret at Tri- Mountain Real Estate.  They listened to my needs and wants and kept me updated on all of the available homes in my price range.  Debbie and Margaret made sure that I found a home that was just right for me.  They were extremely helpful from our first conversation to moving day and beyond.  They even helped me sell my condo for top dollar.  I highly recommend the Mountain Team at Tri- Mountain Real Estate to help you with all your real estate needs.&quot;";

testimonial[15] = "&quot;Dear Wendy and Margaret:  Thanks so much for stepping up and speaking at our home buyers class.  You did a great job.&quot; <b>Eileen Friedman</b>";

testimonial[16] = "&quot;I must say this to all the Mountain Team, Thank you for your excellence & patience & serving me effectively.  I'm really enjoying my 1st home, as in alone.  It wouldn't have happened until my good buddy Bruce mentioned Margaret Williams.  Margaret, Thank you very much for getting out there and making this all become my stepping stone for the future in the Summit.  Thanks for the house warming gift.  I will recommend Debbie Belcher's Mountain Team to family and friends.&quot; <b>Johnny Reynolds</b>";

testimonial[17] = "&quot;As our first time buying a home, we felt that we were in good hands with Tri-Mountain.  They were always so friendly and willing to answer questions.  We will surely recommend Tri-Mountain to our family and friends.&quot;  <b>Jamie Worster and Anthony Cammarata</b>";

testimonial[18] = "&quot;We have had such a wonderful experience with Tri-Mountain Real Estate.  We have recommended them to friends who are now using the Mountain Ream for their own realestate needs.  The Tri-Mountain Real Estate Team provided us with a seamless experience.&quot; <b>Kimmie Watson</b>";

testimonial[19] = "&quot;Very Knowledgeable, You guys Hustle, Great Friendly Staff, Integrity in their work.&quot; <b>Kimberly Eickhoff</b>";

testimonial[20] = "&quot;Tri-Mountain Real Estate took the time to understand my financial limits and they type of property I wanted.  I would definitely recommend Tri-Mountain Real Estate for first time home buyers!&quot; <b>Estrella K. Woods</b>.";

testimonial[21] = "&quot;I never thought buying a condo from 2,000 miles away would be such a pleasure.  Wendy helped us every step of the way.&quot; <b>JC & Lisa Flowers</b>";

testimonial[22] = "&quot;Everything went very smooth every time we had a question, Wendy was one step ahead with the answer.&quot;";

testimonial[23] = "&quot;The Best&quot; <b>Jennifer Hren and Alan Lofton</b>";

testimonial[24] = "&quot;Great experience with a great team.&quot; <b>Bill & Heidi Sodetz</b>";

testimonial[25] = "&quot;Truly defining that there is no &quot;I&quot; in team.&quot; <b>Mike & Megan Pierson</b>";

testimonial[26] = "&quot;Excellent Experience&quot;";

testimonial[27] = "&quot;Tri-Mountain Real Estate took the time to understand my financial limits and the type of property I wanted.  I would definitely recommend Tri-Mountain Real Estate for first time home buyers!&quot; <b>Estrella K Woods</b>";

testimonial[28] = "&quot;Working with Debbie and her team was a great experience. I highly recommend Tri-Mountain Real Estate for your next real estate transaction.&quot; <b>Murray & Sharon McNeil</b>";

testimonial[29] = "&quot;Wendy & everyone at Tri-Mtn was terrific.  Always friendly & helpful.&quot; <b>Marianne & Aaron Gallo</b>";

testimonial[30] = "&quot;Don't use anyone other than theTri-Mountain Team!  They make it a wonderful experience!&quot; <b>Juliana Van Vliet and Jerame Maes</b>";

testimonial[31] = "&quot;Zoomers would like to thank you for your generous contributions to our early learning center.  Your continued support is sincerely appreciated.&quot; <b>Sincerely, Susan E. Wilt, Director</b>";

testimonial[32] = "&quot;Debbie, You made the process of selling a home and buying land so easy.  You were always on top of everything letting us know how thins were going all along the way.  We didn't have to worry about anything.&quot; <b>Chuck & Rashelle </b>";

testimonial[33] = "&quot;Friendly knowledgeable staff&quot; <b>Diana and Carl Strobel</b>";

testimonial[34] = "&quot;Debbie and Kelli were both very pleasant, helpful and available throughout the entire process.&quot; <b>Jan Ross</b>";

testimonial[35] = "&quot;You did a magnificent job -- as proven by the rapid and successful response.  Your professionalism and caring is obvious.&quot; <b>Ed Krieg</b>";

index1 = Math.floor(Math.random() * 35);
index2 = index1+1;
d.write(testimonial[index1]+"<br><br>");
d.write("<hr color=ffffff size=1 noshade>");
d.write(testimonial[index2]+"<br><br>");
}

// clock writer

function writetime(){
mydate = new Date();
myday = mydate.getDay();
mymonth = mydate.getMonth();
myweekday= mydate.getDate();
year = mydate.getYear();
if (year < 2000) year = year + 1900;
arday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
armonth = new Array("January ","February ","March ","April ","May ","June ","July ","August ","September ", "October ","November ","December ")
ardate = new Array("0th","1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th","11th","12th","13th","14th","15th","16th","17th","18th","19th","20th","21st","22nd","23rd","24th","25th","26th","27th","28th","29th","30th","31st");
var time = ("&nbsp;&nbsp;<b>"+arday[myday] +", " + armonth[mymonth] +" "+ardate[myweekday] + ", " + year+" </b>");
document.write(time);
}
