ElById = (document.getElementById)? 1:0;
//function ShowSpecs(){
//	vers = navigator.appVersion;
//	if (navigator.appName == "Microsoft Internet Explorer") {
//	pos = vers.lastIndexOf('.'); // find last period (the dot like in 3.0)
// 	vers = vers.substring(pos-1,vers.length); // eliminate everything before pos-1
//	}
//	proper_version = parseFloat(vers); // pick the number off the front of vers
//	document.write(""
//	+ "Here are the specs on your machine:<br /><br />"
// 	+ "<b>Browser Name</b>: "+navigator.appName
// 	+ "<br /><b>Browser Version</b>: "+proper_version
// 	+ "<br />");
//}

//function RefuseOld() {
//	var text ="" 
//	if (!navigator.cookieEnabled){
//	text += '<p>The browser you are using will not function properly with this site.<br /><br />'
//	text += 'If you are attempting to view the McQueen site from your school\'s computer lab,'
//	text += ' please talk with your administrator to have your browsers upgraded.</p>'
//	text += '<p>If you are attempting to view the McQueen website from your'
//	text += ' own personal computer, follow one of the following links to upgrade either'
//	text += ' Netscape or Microsoft\'s Internet Explorer.</P><br />'
//	text += '<a href=\'http://channels.netscape.com/ns/browsers/download.jsp\'>Netscape</a><br /><br />'
//	text += '<a href=\'http://www.microsoft.com/windows/ie/downloads/default.asp\'>Internet Explorer</a>'
//	document.write(text)
//	}
//}
var text ="" 
	if (!navigator.cookieEnabled){
	text += '<title>INCOMPATABLE BROWSER</title><body>'
	text += '<h2>THE BROWSER YOU ARE USING WILL NOT FUNCTION PROPERLY WITH THIS SITE</h2>'
	text += '<h2>YOU CAN STILL ATTEMPT TO ACCESS THE PAGES, BUT YOU WILL NOT BE ABLE TO VIEW ALL CONTENT</h2>'
	text += '<font size = 4><P>If you are attempting to view the McQueen site from your school\'s computer lab,'
	text += ' please talk with your administrator to have your browsers upgraded.</p>'
	text += '<p>If you are attempting to view the McQueen website from your'
	text += ' own personal computer, follow one of the following links to upgrade either '
	text += '<a href=\'http://channels.netscape.com/ns/browsers/download.jsp\'>Netscape</a>'
	text += ' or Microsoft\'s '
	text += '<a href=\'http://www.microsoft.com/windows/ie/downloads/default.asp\'>Internet Explorer</a>.'
	text += '</p><br /><br /></font></body></html>'
	document.write(text)
	}
	else
	{
	text += '<link href=\"mainstyle.css\" rel=\"stylesheet\" type=\"text/css\">'
	document.write(text)
	}
if (document.images) {
   var home = new Image();
   home.src = "images/buttons/bttn_home.jpg";
   var home_roll = new Image();
   home_roll.src = "images/buttons/rl_bttn_home.jpg";
   var downloadb = new Image();
   downloadb.src = "images/buttons/download.gif";
   var rl_downloadb = new Image();
   rl_downloadb.src = "images/buttons/rl_download.gif";
   var htmlviewbttn = new Image();
   htmlviewbttn.src = "images/buttons/html.gif";
   var rl_viewbttn = new Image();
   rl_viewbttn.src = "images/buttons/rl_view.gif";
}

function over_button() {
	if (document.images) {
		document["back"].src = home_roll.src;
	}
}

function up_button() {
	if (document.images) {
		document["back"].src = home.src;

}	}
if (document.images) {
   var newb = new Image();
   newb.src = "images/buttons/bttn_whtsnw.jpg";
   var newb_roll = new Image();
   newb_roll.src = "images/buttons/rl_bttn_whtsnw.jpg";
}


if (document.images) {
   var topb = new Image();
   topb.src = "images/buttons/bttn_toppg.jpg";
   var topb_roll = new Image();
   topb_roll.src = "images/buttons/rl_bttn_toppg.jpg";
}

function over_top_button(variable) {
	if (document.images) {
		document[variable].src = topb_roll.src;
	}
}

function up_top_button(variable) {
	if (document.images) {
		document[variable].src = topb.src;

	}
}
function over_download_button(variable) {
	if (document.images) {
		document[variable].src = rl_downloadb.src;
	}
}
function up_download_button(variable) {
	if (document.images) {
		document[variable].src = downloadb.src;
	}
}
function over_htmlview_button(variable) {
	if (document.images) {
		document[variable].src = rl_viewbttn.src;
	}
}
function up_htmlview_button(variable) {
	if (document.images) {
		document[variable].src = htmlviewbttn.src;
	}
}
function newWindow(newpage) {
	if (newpage == "zipinstr") {
	siteWindow = window.open(newpage+ ".html", "downloadWin", "left=0, top=0, height=340, width=635, scrollbars=yes, toolbar=yes");
	siteWindow.focus();
		}
		else if (newpage == "zipinstrmaps") {
			siteWindow = window.open(newpage+ ".html", "downloadWin", "left=0, top=0, height=340, width=635, scrollbars=yes, toolbar=yes")
			siteWindow.focus()
			}
			else if (newpage == "mainorientslide" || newpage =="overorientslide" || newpage =="dayorientslide" || newpage =="isobelorientslide" || newpage =="orienteeringslide") {
				mainslideWindow = window.open(newpage+ ".html", "mainslideWin", "width=757,height=350, left=0, top=0, scrollbars=no, resizable=no, toolbar=no")
				mainslideWindow.focus()
				}
				else if (newpage == "cabininfo") {
					mainslideWindow = window.open(newpage+ ".html", "mainslideWin", "width=496, height=254, left=0, top=0")
					mainslideWindow.focus()
					}	
					else if (newpage == "isobelmainmap" || newpage=="daymainmap"){	
						siteWindow = window.open(newpage+ ".html", "downloadWin", "left=0, height=340, width=635, top=0, scrollbars=yes, toolbar=no, menubar=no, resizable=yes")
						siteWindow.focus()
						}
						else if (newpage == "sunsetinstr" || newpage == "satinstr"){	
							siteWindow = window.open(newpage+ ".html", "newWin", "left=0, height=500, width=635, top=0, scrollbars=yes, toolbar=no, menubar=no, resizable=yes")
							siteWindow.focus()
							}
			else	{
				siteWindow = window.open(newpage, "downloadWin", "left=0, height=340, width=635, top=0, scrollbars=yes, toolbar=yes, menubar=yes, resizable=yes")
				siteWindow.focus()
				}
}

var x=100
var bgticker
function scrollingMessage() {
	writeLayer("bgtick",'','',homemsg)	//ID,dir,phto,text
	if (document.all) {
		bgticker = document.all.bgtick.style;			
		}
	if (document.layers) {		//For Netscape 4.0
		bgticker = document.bgtick;
		}
	if (document.getElementById) {	//For Netscape 6.0 and up
		bgticker = document.getElementById("bgtick").style;			
		}
	scroll();
}
function scroll() {
		if (x > -900) {// ADJUST DEPENDING ON MESSAGE LENGTH
			x-=1;
			if (document.all) {		//For Explorer
				bgticker.posLeft = x;
			}
			if (document.layers) {		//For Netscape 4.0
				bgticker.left = x;
			}
			if (document.getElementById) {	//For Netscape 6.0 and up
				bgticker.left = x;
			}
		var pause = setTimeout("scroll()",10);
		}	
		else
		{
		x=100;
		scroll();
		}
}

function writeLayer(layerID,dir,phto,txt,resetwin){
	if(resetwin=="reset")scrollpage(0,layerID,'reset');
	if(phto){
            if(document.getElementById){
		if(document.getElementById('displayinfo'))document.getElementById('displayinfo').style.top=0;
                  document.getElementById(layerID).innerHTML="<img src='images/"+dir+"/"+phto+".jpg' name='photosrc' border='0' align='left' /><br clear=left />"+txt;
		
            }else if(document.all){
                  document.all[layerID].innerHTML="<img src='images/"+dir+"/"+phto+".jpg' name='photosrc' border='0' align='left' /><br clear=left />"+txt;
            }else if(document.layers){
                  with(document.layers[layerID].document){
                        open();
                        write("<img src='images/"+dir+"/"+phto+".jpg' name='photosrc' border='0' align='left'><br clear=left />"+txt);
                        close();
                  	}
           	 }
	}
	else
	{
		if(document.getElementById){
                  document.getElementById(layerID).innerHTML=txt;
		
            }else if(document.all){
                  document.all[layerID].innerHTML=txt;
            }else if(document.layers){
                  with(document.layers[layerID].document){
                        open();
                        write(txt);
                        close();
                  	}
           	 }
	}
}
function autodropForm(form){
var URL = document.forms[form].doc.options[document.forms[form].doc.selectedIndex].value;
//passwarn();
window.location.href = URL;
}

function passwarn(){
	alert('If prompted for a password, click \'Cancel\'.');
}

show = new Array();//Not in functions as it only needs to be declared once
function shwpanel(nme){
	if(!ElById) return;
	var elmnt=document.getElementById(nme);
	elmnt.style.visibility="visible";
	show[nme]=1;//Important to declare incase the timeout in hidepanel() is going
}
//function hidepanel(nme){
//	show[nme]=0;
//	copyofnme=nme;	//not declared with 'var' so it stays global
//  	setTimeout("hidepanelnow(copyofnme)",0);// delay beefore hiding layer element after the mouseOut
//}
function hidepanel(nme){
	if(!ElById) return;
	//if(show[nme]==1) return;// check to see if there has been a request to show since the timeout function
	var elmnt=document.getElementById(nme);
	elmnt.style.visibility="hidden";
	show[nme]=0;
}
function printwarn(){
	alert('Make sure you have your \'Page Setup...\' settings to landscape before printing. To set, click \'File\' then \'Page Setup...\' and then select the \'Landscape\' option.');
}
function footer(cls){
	if(!cls){
		cls='footer';
		ahrefcls='footer';
	}
	var d = new Date();
	var curr_year = d.getFullYear();
	if(cls=='night')ahrefcls='nightlight';
	document.write("<center><hr><font face=\'Arial\'><strong class=\'"+cls+"\'>-- For More Information Contact --<br />");
	document.write("<nobr>Art Blackwell (Principal) <a class=\'"+ahrefcls+"\' href=\'mailto:ablackwe@sd73.bc.ca\'>email</a></nobr><br />");
	document.write("<nobr>Wayne Deptuck (Resource Teacher) <a class=\'"+ahrefcls+"\' href=\'mailto:wdeptuck@sd73.bc.ca\'>email</a></nobr><br />Ph: 1(250)376-2266 Fax: 1(250)376-7966");
	document.write("</font></strong><br />");
	document.write("<font size=\'2\' class=\'"+cls+"\'>Last Modified: "+document.lastModified+"</font>");
	document.write("<center><font size=\'-1\'>&copy; Copyright 2001-"+curr_year+" School District 73 </font></center></p>");
}
function bk_deposit(){
	document.write("A non refundable deposit of 50% of the predicted total must be received no less than 90 days prior to arrival or within 10 days if the trip-date is within 90 days of the time of booking.");
}	 
