var def_path = "";

if (document.images) {
var imap = new Image();			
imap.src = def_path+"http://ssgtahoe.com/Library/images/map/map_off.gif";
var imap_bea = new Image();		
imap_bea.src = def_path+"http://ssgtahoe.com/Library/images/map/map_beaches.gif";
var imap_hik = new Image();		
imap_hik.src = def_path+"http://ssgtahoe.com/Library/images/map/map_hiking.gif";
var imap_boa = new Image();		
imap_boa.src = def_path+"http://ssgtahoe.com/Library/images/map/map_boating.gif";
var imap_gam = new Image();		
imap_gam.src = def_path+"http://ssgtahoe.com/Library/images/map/map_gaming.gif";
var imap_gol = new Image();		
imap_gol.src = def_path+"http://ssgtahoe.com/Library/images/map/map_golf.gif";
var imap_ski = new Image();
imap_ski.src = def_path+"http://ssgtahoe.com/Library/images/map/map_ski.gif";
var imap_xcs = new Image();		
imap_xcs.src = def_path+"http://ssgtahoe.com/Library/images/map/map_xcski.gif";
}

function swapem(sname,rname){
    sname.src = rname.src;
}

function id2elem(id) {
	if (typeof(id) != 'string') {
		return id;
	}
	if (document.getElementById) {
		id = document.getElementById(id);
	} else if (document.all) {
		id=document.all[id];
	} else {
		id = null;
	}
	return id;
}
function popup(url,width,height){
    nw = window.open(url,"newwindow","width="+width+",height="+height+",status=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,location=0");
    nw.focus();
}

function checkForm(){
if (document.subscribeForm.elements['Email Address'].value.length > 0){
 return true;
 } 
else{
 alert('Please enter your email address.');
 document.subscribeForm.elements['Email Address'].focus();
 return false;
 }
}


// DROP-DOWN MENU CODE

if (!document.layers&&!document.all&&!document.getElementById)
event="test"
function showtip(current,e,text){

if (document.all||document.getElementById){
thetitle=text.split('<br>')
if (thetitle.length>1){
thetitles=''
for (i=0;i<thetitle.length;i++)
thetitles+=thetitle[i]
current.title=thetitles
}
else
current.title=text
}

else if (document.layers){
document.tooltip.document.write('<layer bgColor="white" style="border:1px solid black;font-size:12px;">'+text+'</layer>')
document.tooltip.document.close()
document.tooltip.left=e.pageX+5
document.tooltip.top=e.pageY+5
document.tooltip.visibility="show"
}
}
function hidetip(){
if (document.layers)
document.tooltip.visibility="hidden"
}

function change(id, newClass)
{
	identity=document.getElementById(id);
	identity.className=newClass;
}


