<!--

if ((navigator.appName.indexOf("Microsoft") != -1) || (navigator.userAgent.indexOf("Opera") != -1) || ( 
(navigator.appName.indexOf("Netscape") != -1) && (parseInt(navigator.appVersion.substring(navigator.appVersion.indexOf(".")-1)) > 4))
 || ((navigator.appName.indexOf("Netscape") != -1) && (navigator.appVersion.indexOf("Mac") != -1) && (parseInt(navigator.appVersion.substring(navigator.appVersion.indexOf(".")-1)) > 3)  ))
  {
    document.write('<link rel="stylesheet" type="text/css" href="css/main.css">');
  } 
else 
  {
  //alert('here');
    document.write('<link rel="stylesheet" type="text/css" href="css/main_netscape.css">');
  }




var isN4, isN6, isIE, isIE5, isIE6, isMAC;
var thebrowser
var coll = "";
var styleobj = "";
var bgcolorobj = "";

if (navigator.appVersion.indexOf("Mac") != -1)
{
isMAC = true;
}
else
{
isMAC = false;
}

if (parseInt(navigator.appVersion) >= 4)
{
	if (navigator.appName == "Netscape")
	{
		if (document.getElementById && !document.all)
		{
		isN6 = true
		thebrowser = 'isN6'
		styleObj = '.style'
		bgcolorobj  = 'backgroundColor'
		}
		else
		{
		if (document.layers)
		{
		isN4 = true
		thebrowser = 'isN4'
		styleObj = ''
		bgcolorobj  = 'bgColor'
		}
		}
	}
	else
	{
	
	if (navigator.userAgent.indexOf("opera") != -1)
		{
		isIE6 = true;
		thebrowser = 'isIE6';
		bgcolorobj  = 'background-color';	
		}
		else
		{
	
		if ((navigator.appVersion.indexOf("MSIE 5") == -1) && document.all && document.getElementById)
		{
		isIE6 = true;
		thebrowser = 'isIE6';
		styleObj = '.style';
		bgcolorobj  = 'backgroundColor';
	}
		else
		{
		if (navigator.appVersion.indexOf("MSIE 5") != -1)
		{
		isIE5 = true;
		thebrowser = 'isIE5';
		styleObj = '.style';
		bgcolorobj  = 'backgroundColor';
		
	}
		else
		{
		if (navigator.appVersion.indexOf("MSIE 4") != -1)
		{
		isIE = true;
		thebrowser = 'isIE4';
		coll = 'all.';
		styleObj = '.style';
		bgcolorobj  = 'backgroundColor';
		}
		}
		}
	}
	}

	if( !isIE && !isIE5 && !isIE6 && !isN4 && !isN6)
	{
	top.location.href = "index-non-dhtml-browser.html";
	}	
	

}

function getObjLeft(obj) {

	if (isN4)
	{
	// this is not working
	return obj.left
	}
	
	if (isIE || isIE5 || isIE6 || isN6)
	{	
	//alert('In getObjLeft ' + obj.pixelLeft );
	return obj.pixelLeft
	}
	
}

function getObj_offsetLeft(obj) {

var left_parentpos, left_objpos

//alert(obj);

	if (isN4)
	{
	left_objpos = obj.x;
	//alert('obj.x - ' + obj.x);
	// this is not working
	return left_objpos
	}	
	
	if (isIE || isIE5 || isIE6 || isN6)
	{	
	//alert('In getObj_offsetLeft ' + obj.offsetLeft );
		left_objpos = obj.offsetLeft;
		
		if(obj.offsetParent)
		{
		left_parentpos = obj.offsetParent;
	  	while (left_parentpos != null) {
	  		left_objpos += left_parentpos.offsetLeft;
	  		left_parentpos = left_parentpos.offsetParent;
	  		}
		}	
			
	return left_objpos
	}
	
}

function getObjTop(obj) {

	if (isN4)
	{
	// this is not working
	return obj.y
	}
	
	if (isIE || isIE5 || isIE6 || isN6)
	{	
	return obj.pixelTop
	}
}

function getObj_offsetTop(obj) {

	if (isN4)
	{
	// this is not working
	return obj.top
	}
	
	if (isIE || isIE5 || isIE6 || isN6)
	{	
	//alert('obj.offsetTop' + obj.offsetTop )
	return obj.offsetTop
	}
}



function getObjHeight(obj) {

	if (isN4)
	{
	// this is not working
	return obj.clip.height
	}
	
	if (isN6)
	{
	return obj.offsetHeight
	}
	
	if (isIE5 || isIE6)
	{	
	return obj.clientHeight
	}
	
	if (isIE)
	{
	// not working in IE4
	return obj.clientHeight
	}

}

function getObjWidth(obj) {

	if (isN4)
	{
	// this is not working
	return obj.clip.width
	}
	
	if (isN6)
	{
	return obj.offsetWidth
	}
	
	if (isIE5 || isIE6)
	{	
	return obj.clientWidth
	}


	if (isIE)
	{
	// not working in IE4	
	return obj.clientWidth
	}
	
	
}

function getInsideWindowWidth() {

	if (isN4 || isN6)
	{
	return window.innerWidth
	}

	
	if (isIE5 || isIE6)
	{
	return document.body.clientWidth
	}

	if (isIE)
	{
	return document.body.innerWidth
	}



}

function getInsideWindowHeight() {

	if (isN4 || isN6)
	{
	return window.innerHeight
	}

	if (isIE5 || isIE6)
	{
	return document.body.clientHeight
	}

	if (isIE)
	{
	return document.body.innerHeight
	}



}

function shiftTo(obj, x, y) {

	if (isN4)
	{
	obj.moveTo(x,y)
	}
	
	if (isIE)
  	{

	document.all.banner.style.pixelLeft = x;
	document.all.banner.style.pixelTop = y;

	// obj.pixelLeft = x
	// obj.pixelTop = y
	}

  	if (isIE5 || isIE6)
  	{
	obj.pixelLeft = x
	obj.pixelTop = y
	}
  
  	if (isN6)
  	{
	obj.left = x
	obj.top = y
	 // document.getElementById("banner").style.left = x;
  	// document.getElementById("banner").style.top = y;
  	}

	
}

function centerIt(idPicked) {

// obj is the dthml positional container object
var obj
var contentObj
var thecon

thecon = "banner";


// if (isIE)
// {
// obj = eval("document." + coll + thecon + ".style");
// contentObj = eval("document." + thecon);
// }


if (isIE)
{

var strw, stry

strx = eval("document.all.banner.clientWidth");
stry = eval("document.all.banner.clientHeight");

// strx = eval("document.all." + idPicked + ".clientWidth");
// stry = eval("document.all." + idPicked + ".clientHeight");


var x = Math.round((getInsideWindowWidth()/2) - (strx/2))
var y = Math.round((getInsideWindowHeight()/2) - (stry/2))

obj= eval("document.all.banner.style");
//contentObj = eval("document.all.banner");

// obj= eval("document." + idPicked + ".style");
// contentObj = eval("document." + idPicked);

}

if (isN4)
{

//Netscape 4 work around
var strw, stry

strx = eval("document." + idPicked + ".clip.width");
stry = eval("document." + idPicked + ".clip.height");

var x = Math.round((getInsideWindowWidth()/2) - (strx/2))
var y = Math.round((getInsideWindowHeight()/2) - (stry/2))

obj= eval("document." + idPicked);
//contentObj = eval("document." + idPicked);

}

if (isN6 || isIE5 || isIE6)
{
obj = eval("document.getElementById('" + idPicked  + "')" + ".style");
contentObj = eval("document.getElementById('" + idPicked  + "')");

//obj = eval("document.getElementById('banner')" + ".style");
//contentObj = eval("document.getElementById('banner')");

var x = Math.round((getInsideWindowWidth()/2) - (getObjWidth(contentObj)/2));
var y = Math.round((getInsideWindowHeight()/2) - (getObjHeight(contentObj)/2));

}

shiftTo(obj, x, y);

obj.visibility = "visible";

}  //end function centerIt()



function moveIt(idPicked, moveDirection) {

// obj is the dthml positional container object
var obj
var contentObj

if (isIE || isN4)
{
obj = eval("document." + coll + idPicked + styleObj)
contentObj = eval("document." + coll + idPicked)
}

if (isN6 || isIE5 || isIE6)
{
obj = eval("document.getElementById('" + idPicked + "')" + ".style");
contentObj = eval("document.getElementById('" + idPicked + "')");
}


var xLeft = getObjLeft(obj);
var yTop = getObjTop(obj);

switch (moveDirection) {

case 'left':
	xLeft += -1;
	yTop += 0;
	break;
case 'right':
	xLeft += 1;
	yTop += 0;
	break;
case 'up':
	xLeft += 0;
	yTop += -1;
	break;
case 'down':
	xLeft += 0;
	yTop += 1;
	break;
}

shiftTo(obj, xLeft, yTop);

obj.visibility = "visible";

}  //end function moveIt(moveDirection)


function showOrHide(idPicked,v) {

// obj is the dthml positional container object
var obj
var contentObj

if (isIE || isN4)
{
obj = eval("document." + coll + idPicked + styleObj);
}

if (isN6 || isIE5 || isIE6)
{
obj = eval("document.getElementById('" + idPicked + "')" + ".style");
}

obj.visibility = v;

}  //end function showOrHide(idPicked,v)

function HideAllObj(pageindex)
{

var allobj;

// All Obj

allobj = new Array();

allobj[0] = 'home';
allobj[1] = 'contactinfo';
allobj[2] = 'skiing';
allobj[3] = 'biking';
allobj[4] = 'pics';
allobj[5] = 'links';
allobj[6] = 'development';

var objx;

//Loop through to create each inner menu link
for (j=0; j < allobj.length; j++)
{

if (isN6 || isIE5 || isIE6)
{
objx = eval("document.getElementById('" + allobj[j] + "')" + ".style");
}

if (isN4)
{
objx = eval("document." + allobj[j]);
}

if (isIE)
{
objx = eval("document.all." + allobj[j] + ".style");
}

objx.visibility =  'hidden';

}// for j

}// HideAllObj()

function showOrHideObj(menuindex,menustatus)
{

HideAllObj();

var vstatus;

// Check whether obj is to be on = 1 or off = 0
if ( menustatus == 1)
{
vstatus = 'visible';
}
else
{
vstatus = 'hidden';
}

var objv;

if (isN6 || isIE5 || isIE6)
{
objv = eval("document.getElementById('" + menuindex + "')" + ".style");
}

if (isN4)
{
objv = eval("document." + menuindex);
//objv = eval("document." + coll + menuindex + styleObj);
}

if (isIE)
{
objv = eval("document.all." + menuindex + ".style");
}

objv.visibility = vstatus;


}// end showOrHideObj



function openWindow(locURL,windowtype)
{

// Initialize Variables for the Screen.


if (windowtype == 'display')
{
XPos = 200;
YPos = 150;
XWidth = 500;
YHeight = 200;
constLocation = 'yes';
constMenubar = 'yes';
constScrollbars = 'yes';
constStatus = 'yes';
constTitlebar = 'yes';
constToolbar = 'yes';
constResizable = 'yes';
window.newWindow = '';
}


if (windowtype == 'pdf')
{
XPos = 0;
YPos = 0;
XWidth = 600;
YHeight = 480;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'yes';
constStatus = 'no';
constTitlebar = 'yes';
constToolbar = 'no';
constResizable = 'yes';
window.newWindow = '';
}

if (windowtype == 'api')
{
XPos = 0;
YPos = 0;
XWidth = 600;
YHeight = 480;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'no';
constStatus = 'no';
constTitlebar = 'yes';
constToolbar = 'no';
constResizable = 'no';
window.newWindow = '';
}


// If the Browser can understand the screen object, set window coordinates

if (window.screen)
	{
	XPos = ((screen.availWidth - XWidth) / 2);
	YPos = ((screen.availHeight - YHeight) / 2);
	}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindow)
	{
	newWindow.location.href = locURL;
	}
else
	{
	newWindow = window.open(locURL,windowtype,'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=640,height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindow.opener)
		{
		newWindow.opener = window;
		}
		
	if (newWindow.focus)
		{
		newWindow.focus();
		}	
		
	}
	
		

}// end of openWindow(locURL)


function openNewWindow(locURL,xp,yp,windowtype)
{

// Initialize Variables for the Screen.
if (windowtype == 'pics')
{
XPos = xp;
YPos = yp;
// XPos = 150;
// YPos = 200;
XWidth = 300;
YHeight = 200;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'yes';
constStatus = 'no';
constTitlebar = 'yes';
constToolbar = 'no';
constResizable = 'yes';
window.newWindow = '';
}
else
{
XPos = xp;
YPos = yp;
// XPos = 200;
// YPos = 150;
XWidth = 300;
YHeight = 200;
constLocation = 'yes';
constMenubar = 'yes';
constScrollbars = 'yes';
constStatus = 'yes';
constTitlebar = 'yes';
constToolbar = 'yes';
constResizable = 'yes';
window.newWindow = '';
}

// If the Browser can understand the screen object, set window coordinates

// if (window.screen)
//	{
	// XPos = ((screen.availWidth - XWidth) / 2);
	// YPos = ((screen.availHeight - YHeight) / 2) + 100;
//	}

// If the window is open, just refresh the contents, otherwise create new window

if (isN6 && (windowtype != 'pics'))
{
location.href = locURL;
}
else
{

if (window.newWindow)
	{
	newWindow.location.href = locURL;
	}
else
	{
	newWindow = window.open(locURL,windowtype,'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=640,height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	// if (! newWindow.opener)
		// {
		// newWindow.opener = window;
		// }
			
	}

if (newWindow.focus)
		{
		newWindow.focus();
		}	

} // if isN6

}// end of openNewWindow(locURL)



function openNewWindowScroll(locURL,winWidth,winHeight)
{

// Initialize Variables for the Screen.

XPos = 400;
YPos = 0;
XWidth = winWidth;
YHeight = winHeight;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'yes';
constStatus = 'no';
constTitlebar = 'no';
constToolbar = 'no';
constResizable = 'yes';
//window.newWindow = '';


// If the Browser can understand the screen object, set window coordinates

if (window.screen)
	{
	YPos = ((screen.availHeight - YHeight) / 2);
	}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindow2)
	{
	if (isN4){
	newWindow2.close();
	}
	else
	{
	newWindow2.close();
	}
	newWindow2 = window.open(locURL,"newWindow2",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	//newWindow.location.href = locURL;
	}
else
	{
	newWindow2 = window.open(locURL,"newWindow2",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindow2.opener)
		{
		newWindow2.opener = window;
		}
	}
	
		
if (newWindow2.focus)
	{
	newWindow2.focus();
	}
}// end of openNewWindowScroll(locURL)


//-->


