// JavaScript functions to show dialog boxes, etc// Build a drop-down menufunction BuildMenu(menu_str, id) {    var width=140;	document.write('<div id=dropmenu'+id+' style="position:absolute;left:0;top:0;width:'+width+';layer-background-color:#ffffff;background-color:#ffffff;width:'+width+';visibility:hidden;border:0px solid black;padding:0px">');	document.write('<table width='+width+' border=0 cellspacing=0 cellpadding=1>');  	items = menu_str.length;	logo_img[id]=new Array(items)	for (i=0;i<items;i++) {		// parse text 		pos = 0;		len = menu_str[i].indexOf('|');		menu_text = menu_str[i].substr(pos, len);		pos += len + 1;		len = menu_str[i].indexOf('|', pos) - pos;		menu_link = menu_str[i].substr(pos, len);		pos += len + 1;		len = menu_str[i].indexOf('|', pos) - pos;		menu_logo = len == 0 ? "menuclick.gif" : menu_str[i].substr(pos, len);		pos += len + 1;		len = menu_str[i].indexOf('|', pos) - pos;		xpos = (len > 0) ? menu_str[i].substr(pos, len) : -1;		pos += len + 1;		len = menu_str[i].length - pos;		ypos = (len > 0) ? menu_str[i].substr(pos, len) : -1;		// set up logos		logo_img[id][i] = new Image();		logo_img[id][i].src = "pics/"+menu_logo;				// now build the menu & links						document.write('<tr><td height=25>');		document.write('<div class=dropdown>');		zoomstr = "return zoomit(event, 'zoomimg"+id+"', "+xpos+", "+ypos+", "+id+", "+i+")";		document.write('<span onMouseOver="'+zoomstr+'">');		//document.write('<a href="'+menu_link+'">'+menu_text+'</a>');		document.write('<a href="'+menu_link+'"');		if (menu_link.indexOf('http') < 0)			document.write('target=_self');		document.write(' onClick="if(ns4) return '+zoomstr+'"');		document.write('>'+menu_text+'</a>');		document.write('</span>');		document.write('</div></td></tr>');	}	document.write('</table>');	document.write('</div>');	BuildZoom("flake.gif", id);	if (document.all)		dropmenu0.style.padding="4px"	if (document.layers) {		document.dropmenu0.captureEvents(Event.CLICK)		document.dropmenu0.onclick=hidemenu	}}// Build a zoom imagefunction BuildZoom(img_name, id) {	document.write('<div id=zoomimg'+id+' style="position:absolute;left:0;top:0;width:'+width+';layer-background-color:#ffffff;background-color:#ffffff;width:'+width+';visibility:hidden;border:0px solid black;padding:0px">');    document.write('<ilayer>');   	document.write('<layer visibility=show>');   	document.write('<div class=wrap1>');	document.write('<img src=pics/'+img_name+' align=middle>');	document.write('</div>');	document.write('</layer>');	document.write('</ilayer>');	document.write('</div>');	if (document.all)		zoomimg.style.padding="4px"	if (document.layers) {		document.dropmenu0.captureEvents(Event.CLICK)		document.dropmenu0.onclick=hidemenu	}}//Drop down menu links//Contents for North Tahoe areasvar i = 0var north_tahoe_info=new Array()north_tahoe_info[i++]='Alpine Meadows|http://www.skialpine.com/|alpine.gif|181|286'north_tahoe_info[i++]='Boreal|http://www.borealski.com/|boreal.gif|88|97'north_tahoe_info[i++]='Diamond Peak|http://www.diamondpeak.com/|diamondpeak.gif|470|168'north_tahoe_info[i++]='Donner Ski Ranch|http://www.donnerskiranch.com/|donner.gif|90|107'north_tahoe_info[i++]='Homewood|http://www.skihomewood.com/|homewood.gif|245|387'north_tahoe_info[i++]='Mt. Rose|http://www.mtrose.com/|mtrose.gif|495|105'north_tahoe_info[i++]='Northstar|http://www.skinorthstar.com/|northstar.gif|295|162'north_tahoe_info[i++]='Squaw Valley|http://www.squaw.com/|squaw.jpg|178|250'north_tahoe_info[i++]='Sugar Bowl|http://www.skisugarbowl.com/|sugarbowl.gif|105|136'//Contents for South Tahoe areasi = 0var south_tahoe_info=new Array()south_tahoe_info[i++]='Heavenly|heavenly.html|heavenly.gif|430|85'south_tahoe_info[i++]='Kirkwood|kirkwood.html|kirkwood.gif|280|370'south_tahoe_info[i++]='Sierra @ Tahoe|http://www.sierratahoe.com/|sierra.gif|288|240'//Contents for Central Sierra areasi = 0var cen_sierra_info=new Array()cen_sierra_info[i++]='Badger Pass|http://www.badgerpass.com/|yosemite.gif|250|433'cen_sierra_info[i++]='Bear Valley|http://www.bearvalley.com/|bear.gif|98|15'cen_sierra_info[i++]='Dodge Ridge|http://www.dodgeridge.com/|dodge.gif|135|166'cen_sierra_info[i++]='June Mountain|http://www.junemountain.com/|june.gif|485|380'cen_sierra_info[i++]='Mammoth|http://www.mammoth-mtn.com/|mammoth_text.gif|510|433'//Contents for Southern CA areasi = 0var socal_info=new Array()socal_info[i++]='Bear Mountain|http://www.bearmtn.com/|bearmtn.jpg|468|195'socal_info[i++]='Mountain High|http://www.mthigh.com/|mthigh.jpg|45|115'socal_info[i++]='Mt. Baldy|http://www.mtbaldy.com/|baldy.jpg|85|175'socal_info[i++]='Snow Summit|http://www.bigbearmountainresorts.com/snowsummit/|summit.jpg|455|188'socal_info[i++]='Snow Valley|http://www.snow-valley.com/|snowvalley.gif|372|202'//Contents for Utah areasi = 0var utah_info=new Array()utah_info[i++]='Alta|alta.html|alta.gif|395|278'utah_info[i++]='Brighton|http://www.skibrighton.com/|brighton.gif|425|250'utah_info[i++]='Snowbird|http://www.snowbird.com/|snowbird.gif|365|285'utah_info[i++]='Solitude|http://www.skisolitude.com/|solitude.gif|405|222'//Contents for other areasi = 0var other_info=new Array()other_info[i++]='Mt. Bachelor|http://www.mtbachelor.com/|bachelor.gif||'other_info[i++]='Crested  Butte|http://www.butte.com/|crestbutte.gif||'other_info[i++]='Mt. Ruapehu|http://www.laketaupo.co.nz/skiing/skiopen.htm|||'other_info[i++]='Pajarito Mountain|http://www.skipajarito.com/|||'other_info[i++]='Vail|http://www.vail.com/|vail.jpg||'other_info[i++]='Ski Windham|http://www.skiwindham.com/|windham.gif||'// build the various menusvar logo_img=new Array(5)function BuildMenus() {	BuildMenu(north_tahoe_info, 0);	BuildMenu(south_tahoe_info, 1);	BuildMenu(cen_sierra_info, 2);	BuildMenu(socal_info, 3);	BuildMenu(utah_info, 4);	BuildMenu(other_info, 5);}BuildMenus();