// convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase();
// *** BROWSER VERSION ***
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
// Note: Opera and WebTV spoof Navigator.  We do strict client detection.
// If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    var is_mac    = (agt.indexOf("mac")!=-1);
	
	function EditPageOnLoad() {
	// if ( document.forms.length == 0 ) return;
	// formfields.Add(new validatedfield(form1.FirstName, 's', 'First Name', true));
							  }

var a = Math.random(); 
var zzzzadslotzzzz= a * 100000;

function goto_URL(object) {window.open(object.options[object.selectedIndex].value,'windowName');}

function funClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date(); var hours = runTime.getHours(); var minutes = runTime.getMinutes(); var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 12) {dn = "PM"; hours = hours - 12;}
if (hours == 0) {hours = 12; }
if (minutes <= 9) {minutes = "0" + minutes;}
if (seconds <= 9) {seconds = "0" + seconds;}
movingtime = hours + ":" + minutes + dn;
if (document.layers) {document.layers.clock.document.write(movingtime);document.layers.clock.document.close();}
else if (document.all) {clock.innerHTML = movingtime;}
setTimeout("funClock()", 1000)
}
window.onload = funClock;


function soda(url,name,w,h) {at='scrollbars=no,resizable=yes,width='+w+',height='+h; pt=window.open(url,name,at)}










/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code ***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.powdermag.com/resortguide/mammothmountain/mammoth">Mammouth</a>'
menu1[1]='<a href="http://www.powdermag.com/resortguide/alpinemeadows/alpinemeadows">Alipine Meadows</a>'
menu1[2]='<a href="http://www.powdermag.com/resortguide/kirkwood/kirkwood">Kirkwood</a>'
menu1[3]='<a href="http://www.powdermag.com/resortguide/squawvalley/squawvalley">Squaw Valley</a>'
menu1[4]='<a href="http://www.powdermag.com/resortguide/sugarbowl/sugarbowl">Sugar Bowl</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://www.powdermag.com/resortguide/mountbaker/mountbaker">Mount Baker</a>'
menu2[1]='<a href="http://www.powdermag.com/resortguide/crystalmountain/crystalmountain">Crystal Mtn</a>'
menu2[2]='<a href="http://www.powdermag.com/resortguide/sunvalley/sunvalley">Sunny Valley</a>'
menu2[3]='<a href="http://www.powdermag.com/resortguide/schweitzermountain/schweitzermountain">Schweitzer Mtn</a>'
menu2[4]='<a href="http://www.powdermag.com/resortguide/mounthood/mounthood">Mount Hood</a>'
menu2[5]='<a href="http://www.powdermag.com/resortguide/mountbachelor/mountbachelor">Mount Bachelor</a>'

//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="http://powdermag.com/resortguide/vail/vail">Vail</a>'
menu3[1]='<a href="http://powdermag.com/resortguide/telluride/telluride">Telluride</a>'
menu3[2]='<a href="http://powdermag.com/resortguide/crestedbutte/crestedbutte">Crested Butte</a>'
menu3[3]='<a href="http://powdermag.com/resortguide/taosskivalley/taosskivalley">Taosski Valley</a>'
menu3[4]='<a href="http://powdermag.com/resortguide/breckenridge/breckenridge">Breckenridge</a>'
menu3[5]='<a href="http://powdermag.com/resortguide/arapahoebasin-keystone/arapahoebasin-keystone">A-Basin/Keystone</a>'
menu3[6]='<a href="http://powdermag.com/resortguide/steamboatsprings/steamboatsprings">Steamboat Springs</a>'
menu3[7]='<a href="http://powdermag.com/resortguide/coppermountain/coppermountain">Copper Mountain</a>'
menu3[8]='<a href="http://powdermag.com/resortguide/winterpark-maryjane/winterpark-maryjane">Winterpark-Maryjane</a>'
menu3[0]='<a href="http://powdermag.com/resortguide/silverton/silverton">Silverton</a>'
menu3[10]='<a href="http://powdermag.com/resortguide/snowmass/snowmass">Snowmass</a>'
menu3[11]='<a href="http://powdermag.com/resortguide/aspenmountain/aspenmountain">Aspen Mountain</a>'
menu3[12]='<a href="http://powdermag.com/resortguide/aspenhighlands/aspenhighlands">Aspen Highlands</a>'



//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="http://powdermag.com/resortguide/jacksonhole/jacksonhole">Jacksonhole</a>'
menu4[1]='<a href="http://powdermag.com/resortguide/grandtarghee/grandtarghee">Grandtarghee</a>'
menu4[2]='<a href="http://powdermag.com/resortguide/moonlightbasin-bigsky/moonlightbasin-bigsky">Moonlightbasin-Bigsky</a>'
menu4[3]='<a href="http://powdermag.com/resortguide/bridgerbowl/bridgerbowl">Bridger Bowl</a>'
menu4[4]='<a href="http://powdermag.com/resortguide/whitefishmountain/whitefishmountain">White Fish Mountain</a>'
menu4[5]='<a href="http://powdermag.com/resortguide/alta-snowbird/alta-snowbird">Alta-Snowbird</a>'
menu4[6]='<a href="http://powdermag.com/resortguide/brighton-solitude/brighton-solitude">Brighton-Solitude</a>'
menu4[7]='<a href="http://powdermag.com/resortguide/parkcity/parkcity">Park City</a>'
menu4[8]='<a href="http://powdermag.com/resortguide/thecanyons/thecanyons">The Canyons</a>'
menu4[9]='<a href="http://powdermag.com/resortguide/snowbasin/snowbasin">Snow Basin</a>'

//Contents for menu 5, and so on
var menu5=new Array()
menu5[0]='<a href="http://powdermag.com/resortguide/jaypeak/jaypeak">Jay Peak</a>'

menu5[1]='<a href="http://powdermag.com/resortguide/sugarbush/sugarbush">Sugar Bush</a>'
menu5[2]='<a href="http://powdermag.com/resortguide/madriverglen/madriverglen">Mad River Glen</a>'
menu5[3]='<a href="http://powdermag.com/resortguide/stowe/stowe">Stowe</a>'
menu5[4]='<a href="http://powdermag.com/resortguide/killington/killington">Killington</a>'
menu5[5]='<a href="http://powdermag.com/resortguide/sundayriver/sundayriver">Sundayriver</a>'
menu5[6]='<a href="http://powdermag.com/resortguide/monttremblant/monttremblant">Monttremblant</a>'
menu5[7]='<a href="http://powdermag.com/resortguide/cannonmountain/cannonmountain">Cannon Mtn</a>'
menu5[8]='<a href="http://powdermag.com/resortguide/loonmountain-watervillevalley/loonmountain-watervillevalley">Loon Mtn - Waterville Valley</a>'

//Contents for menu 6, and so on
var menu6=new Array()
menu6[0]='<a href="http://powdermag.com/resortguide/whistler-blackcomb/whistler-blackcomb">Whistler-Blackcomb</a>'
menu6[1]='<a href="http://powdermag.com/resortguide/ferniealpineresort/ferniealpineresort">Ferniealpine Resort</a>'
menu6[2]='<a href="http://powdermag.com/resortguide/redmountain-whitewater/redmountain-whitewater">Redmountain-Whitewater</a>'
menu6[3]='<a href="http://powdermag.com/resortguide/lakelouise-banff/lakelouise-banff">Lakelouise-Banff</a>'
menu6[4]='<a href="http://powdermag.com/resortguide/kickinghorse/kickinghorse">Kickinghorse</a>'
menu6[5]='<a href="http://powdermag.com/resortguide/alyeska/alyeska">Alyeska</a>'


	
var menuwidth='165px' 
var menubgcolor='white'  
var disappeardelay=1000 
onMouseout (in miliseconds) 
var hidemenu_onclick="yes" 
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; }


function showhide(obj, e, visible, hidden, menuwidth){ if (ie4||ns6) dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") obj.visibility=visible else if (e.type=="click") obj.visibility=hidden }

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body }

function clearbrowseredge(obj, whichedge){ var edgeoffset=0 if (whichedge=="rightedge"){ var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){ if (window.event) event.cancelBubble=true else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

