
/***********************************************
* Switch Content script II- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated April 2nd, 2005.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
var memoryduration="7" //persistence in # of days

var contractsymbol='../images/winter/new/minus.gif' //Path to image to represent contract state.
var expandsymbol='../images/winter/new/plus.gif' //Path to image to represent expand state.

//var js_rootPath='http://steelfusion.servehttp.com/lutsen/'
//var js_rootPath='http://www.lutsen.com/'
/////No need to edit beyond here //////////////////////////

function getElementbyClass(rootobj, classname){
var temparray=new Array()
var inc=0
var rootlength=rootobj.length
for (i=0; i<rootlength; i++){
if (rootobj[i].className==classname)
temparray[inc++]=rootobj[i]
}
return temparray
}

function sweeptoggle(ec){
var inc=0
while (ccollect[inc]){
ccollect[inc].style.display=(ec=="contract")? "none" : ""
inc++
}
revivestatus()
}


function expandcontent(curobj, cid){
if (ccollect.length>0){
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="none")? "none" : ""
curobj.src=(document.getElementById(cid).style.display=="none")? expandsymbol : contractsymbol
}
}

function revivecontent(){
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="none"
}

function revivestatus(){
var inc=0
while (statecollect[inc]){
if (ccollect[inc].style.display=="none")
statecollect[inc].src=expandsymbol
else
statecollect[inc].src=contractsymbol
inc++
}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="none")
selectedItem+=ccollect[inc].id+"|"
inc++
}
if (get_cookie(window.location.pathname)!=selectedItem){ //only update cookie if current states differ from cookie's
var expireDate = new Date()
expireDate.setDate(expireDate.getDate()+parseInt(memoryduration))
document.cookie = window.location.pathname+"="+selectedItem+";path=/;expires=" + expireDate.toGMTString()
}
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "switchcontent")
statecollect=getElementbyClass(alltags, "showstate")
if (enablepersist=="on" && get_cookie(window.location.pathname)!="" && ccollect.length>0)
revivecontent()
if (ccollect.length>0 && statecollect.length>0)
revivestatus()
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate

/***********************************************
* 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
***********************************************/



// SAWTOOTH
var menu1=new Array()
menu1[0]='<a href="'+js_rootPath+'summer/sawtooth_park/alpineSlide.cfm">Alpine Slide</a>'
menu1[1]='<a href="'+js_rootPath+'summer/sawtooth_park/mountainTram.cfm">Mountain Tram</a>'
menu1[2]='<a href="'+js_rootPath+'summer/sawtooth_park/summitChalet.cfm">Summit Chalet</a>'
menu1[3]='<a href="'+js_rootPath+'summer/sawtooth_park/hikingCenter.cfm">Hiking Trails</a>'
menu1[4]='<a href="'+js_rootPath+'summer/sawtooth_park/voyageurCanoe.cfm">Voyageur Canoe Tour</a>'
menu1[5]='<a href="'+js_rootPath+'summer/sawtooth_park/mountainBiking.cfm">Mountain Biking</a>'
menu1[6]='<a href="'+js_rootPath+'summer/sawtooth_park/homesteadStables.cfm">Horseback Riding</a>'


// RATES & PACKAGES
var menu2=new Array()
menu2[0]='<a href="'+js_rootPath+'summer/hoursOperationPrint.cfm" target="_blank">Activity Schedule</a>'
menu2[1]='<a href="'+js_rootPath+'summer/online_tickets/index.cfm">Rates &amp; Online Tickets</a>'
menu2[2]='<a href="'+js_rootPath+'summer/online_tickets/packages/byo_packages.cfm">Build Your Own Package</a>'
menu2[3]='<a href="'+js_rootPath+'summer/trueNorthAdventures/TNAdventuresReservations.cfm">Voyageur Canoe Reservations</a>'

//menu2[6]='<a href="'+js_rootPath+'summer/giftCertificates/">Gift Certificates</a>'
// AREA GUIDE


var menu3=new Array()
menu3[0]='<a href="'+js_rootPath+'winter/events/">Events Calendar</a>'

// LODGING GUIDE
var menu4=new Array()
menu4[0]='<a href="'+js_rootPath+'summer/fallGallery.cfm">The Spectacular North Shore</a>'
menu4[1]='<a href="'+js_rootPath+'summer/area_guide/index.cfm">Calendar of Events</a>'

// NEWS
var menu5=new Array()
menu5[0]='<a href="#">What’s New</a>'
menu5[1]='<a href="#">Media Archive</a>'
menu5[2]='<a href="#">Testimonials</a>'
menu5[3]='<a href="#">Press Releases</a>'
menu5[4]='<a href="#">Photo Downloads</a>'

// CONTACT US
var menu6=new Array()
menu6[0]='<a href="'+js_rootPath+'summer/contact_Info/">Contact information</a>'
menu6[1]='<a href="'+js_rootPath+'summer/contact_Info/brochureRequest.cfm">Brochure Request</a>'
menu6[2]='<a href="'+js_rootPath+'summer/contact_Info/howToGetHere.cfm">How to Get Here</a>'

// GROUPS
var menu7=new Array()
menu7[0]='<a href="'+js_rootPath+'summer/groups/weddings.cfm">Weddings &amp; Celebrations</a>'
menu7[1]='<a href="'+js_rootPath+'summer/groups/corporate.cfm">Corporate Groups</a>'
menu7[2]='<a href="'+js_rootPath+'summer/groups/motorcoach.cfm">Motorcoach Groups</a>'
menu7[3]='<a href="'+js_rootPath+'summer/groups/activities.cfm">Group Activities<br />for All Ages</a>'
		
var menuwidth='100px' //default menu width
var menubgcolor='#fff'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

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



function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=300,left=190,top=162');");
}




/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["../images/summer/slideshow08/bridge.jpg", "", ""]
fadeimages[1]=["../images/summer/slideshow08/painting.jpg", "", ""] //image
fadeimages[2]=["../images/summer/slideshow08/waterfall.jpg", "", ""]
fadeimages[3]=["../images/summer/ss20080917/04.jpg", "", ""]
fadeimages[4]=["../images/summer/slideshow08/table.jpg", "", ""]
fadeimages[5]=["../images/summer/slideshow08/gondola.jpg", "", ""]
fadeimages[6]=["../images/summer/slideshow08/hiking.jpg", "", ""]
fadeimages[7]=["../images/summer/ss20080917/03.jpg", "", ""] //image
fadeimages[8]=["../images/summer/slideshow08/sunset.jpg", "", ""] //image
fadeimages[9]=["../images/summer/ss20080917/02.jpg", "", ""] //image

var fadebgcolor="white"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
 
 
/*
 * aScroller js
 * 
 * Copyright (C) 2005-2006
 * by Davide S. Casali
 * www.digitalhymn.com
 *
 * Last release: 2005-11-27
 *
 * Released under CC by-nc-sa 2.5
 * http://creativecommons.org/licenses/by-nc-sa/2.5/
 *
 */

/*
 * This is a simple JavaScript vertical scroller that is crossbrowser and also validates
 * as XHTML Strict.
 *
 * Usage:
 * (1) Define a <div> tag with a specified ID, containing the scrolling text. One <div> for each line.
 * (2) Define an INLINE CSS width and height (important, MUST be inline)
 * (3) Execute the divScroller function, passing id, mode (h or v),  speed (higher number means
 *     slower) and delay (in ms).
 *
 */

/****************************************************************************************************
 * Cross browser getElementByID.
 * From: www.quirksmode.org
 *
 * @param	id
 */
function getObj(name)
{
	if (document.getElementById)
	{
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}
	else if (document.all)
	{
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
	else if (document.layers)
	{
		this.obj = document.layers[name];
		this.style = document.layers[name];
	}
}

/****************************************************************************************************
 * Enables the scrolling for the specified div (matching id).
 *
 * @param	string id of the tag
 * @param	speed
 * @param	delay
 */
function divScroller(id, direction, speed, delay)
{
	if (document.getElementById)
	{
		// DOM3 = IE5+, NS6+, FF0.7+
		// *** Scroller
		var scroller = new getObj(id);
		
		// *** Debug force vars
		//scroller.style.height = "30px";
		//scroller.style.backgroundColor = "#FFEEEE";
		
		// *** Computed Styles
		//alert(scroller.obj.currentStyle.height);
		/*if (!scroller.style.height)
			if (scroller.obj.currentStyle)
				scroller.style.height = scroller.obj.currentStyle.height;
			else
				scroller.style.height = document.defaultView.getComputedStyle(scroller.obj, null).getPropertyValue("height");*/
		
		// *** Needed vars
		scroller.style.position = "relative";
		scroller.style.overflow = "hidden";
		
		// *** Generate scrolling inner <div>
		scroller.obj.innerHTML = "<div id=\"" + id + "_inner\">" + scroller.obj.innerHTML + "</div>";
		
		// *** Inner
		var inner = new getObj(id + "_inner");
		inner.style.position = "absolute";
		inner.style.left = parseInt(scroller.style.width) + "px";
		inner.style.top = parseInt(scroller.style.height) + "px";
		
		// *** Apply sub-styles
		//divScrollItemsStyler(id, direction);
		
		// *** Worker
		if (direction == "h" || direction == "horizontal")
		{
			// ****** HORIZONTAL
			// MouseOver: pauses the ticker
			scroller.obj.onmouseover = function() { divScroll_onMouseOver(id); };
			scroller.obj.onmouseout = function() { divScroll_onMouseOut(id); };
			
			// Create a temp element to evaluate the size (awful, but no better way to do this)
			fxpatch = navigator.userAgent.indexOf("Firefox") > -1 ? " left: -9000px;" : ""; // Firefox different CSS (on every other browser since IE5+ isn't needed)
			spanContent = "<span id=\"" + id + "_widthEval\" style=\"visibility: hidden; position: absolute; top: -100px; left: -1px; z-index: -10; white-space: nowrap;" + fxpatch + "\"><nobr>" + inner.obj.innerHTML + "</nobr></span>";
			if (document.createElement)
			{
				var span = document.createElement('span');
				span.innerHTML = spanContent;
				scroller.obj.appendChild(span);
			}
			else
			{
				document.write(spanContent);
			}
			var widthEval = new getObj(id + "_widthEval");
			
			// Setup the scrolling inner drawer
			inner.style.top = "0px";
			inner.style.whiteSpace = "nowrap";
			inner.style.width = widthEval.obj.offsetWidth + "px";
			limit = parseInt(inner.style.width);
			
			// Execute
			setTimeout("divScrollHelperH(\"" + id + "\", " + limit + ", " + speed + ", " + delay + ")", parseInt(speed));
		}
		else if (direction == "v" || direction == "vertical")
		{
			// ****** VERTICAL
			// Setup the scrolling inner drawer
			inner.style.left = "0px";
			inner.style.width = parseInt(scroller.style.width) + "px";
			limit = inner.obj.getElementsByTagName('div').length * parseInt(scroller.style.height);
			
			// Execute
			setTimeout("divScrollHelperV(\"" + id + "\", " + limit + ", " + speed + ", " + delay + ")", parseInt(speed));
		}
	}
}

/****************************************************************************************************
 * Helper for the HORIZONTAL scrolling for the specified div (matching id).
 * This is the real "ticker" function, executed to move the div.
 *
 * @param	string id of the tag
 * @param	pre-calculated height limit (to speed up execution)
 * @param	speed
 * @param	delay
 */
function divScrollHelperH(id, limit, speed, delay)
{
	if (document.getElementById)
	{
		// DOM3 = IE5+, NS6+, FF0.7+
		var scroller = new getObj(id);
		var inner = new getObj(id + "_inner");
		
		// *** Tick duration
		nextTick = speed;
		
		// *** Avoiding some errors
		if (!inner.style.left) inner.style.left = "0px";
		
		// *** Moving the inner div. At the end, restart.
		if (parseInt(inner.style.left) < -limit)
		{
			inner.style.left = parseInt(scroller.style.width) + "px";
		}
		else if (!scroller.obj.pause || scroller.obj.pause == false)
		{
			inner.style.left = (parseInt(inner.style.left) - 1) + "px";
			
			// Deceiving Opera8 stupidity
			//inner.style.width = parseInt(scroller.style.width) - (parseInt(inner.style.left) - 4) + "px";
		}
		
		// *** Bigger delay on item found
		// Skips borders to make transition without delays on loop
		/*if (!(parseInt(inner.style.left) == parseInt(scroller.style.width)) &&
			!(parseInt(inner.style.left) == -limit) &&
			(parseInt(inner.style.left) % parseInt(scroller.style.width)) == 0)
		{
			nextTick = delay;
		}*/
		
		// *** Tick!
		setTimeout("divScrollHelperH(\"" + id + "\", " + limit + ", " + speed + ", " + delay + ")", parseInt(nextTick));
	}
}

/****************************************************************************************************
 * Helper for the VERTICAL scrolling for the specified div (matching id).
 * This is the real "ticker" function, executed to move the div.
 *
 * @param	string id of the tag
 * @param	pre-calculated height limit (to speed up execution)
 * @param	speed
 * @param	delay
 */
function divScrollHelperV(id, limit, speed, delay)
{
	// DOM3 = IE5+, NS6+, FF0.7+
	var scroller = new getObj(id);
	var inner = new getObj(id + "_inner");
	
	// *** Tick duration
	nextTick = speed;
	
	// *** Avoiding some errors
	if (!inner.style.top) inner.style.top = "0px";
	
	// *** Moving the inner div. At the end, restart.
	if (parseInt(inner.style.top) < -limit)
	{
		inner.style.top = parseInt(scroller.style.height) + "px";
	}
	else
	{
		inner.style.top = (parseInt(inner.style.top) - 1) + "px";
	}
	
	// *** Bigger delay on item found
	// Skips borders to make transition without delays on loop
	if (!(parseInt(inner.style.top) == parseInt(scroller.style.height)) &&
		!(parseInt(inner.style.top) == -limit) &&
		(parseInt(inner.style.top) % parseInt(scroller.style.height)) == 0)
	{
		nextTick = delay;
	}
	
	// *** Tick!
	setTimeout("divScrollHelperV(\"" + id + "\", " + limit + ", " + speed + ", " + delay + ")", parseInt(nextTick));
}

/****************************************************************************************************
 * OnMouseOver helper for the HORIZONTAL scrolling for the specified div (matching id).
 *
 * @param	string id of the tag
 */
function divScroll_onMouseOver(id)
{
	var scroller = new getObj(id);
	scroller.obj.pause = true;
}

function divScroll_onMouseOut(id)
{
	var scroller = new getObj(id);
	scroller.obj.pause = false;
}

/****************************************************************************************************
 * Apply essential working styles to each <div> inside the scroller.
 *
 * @param	string id of the inner div
 */
function divScrollItemsStyler(id, direction)
{
	// DOM3 = IE5+, NS6+, FF0.7+
	var scroller = new getObj(id);
	var inner = new getObj(id + "_inner");
	
	elements = inner.obj.getElementsByTagName('div');
	
	for (var i = 0; i < elements.length; i++)
	{
		var item = elements.item(i);
		
		item.style.width = scroller.style.width;
	}
}



	function doMeta(thisFlip){
	
	
		var tableConditions = document.getElementById('tblconditions');
		var tableWeather = document.getElementById('tblweather');
		var aConditions = document.getElementById('conditions');
		var aWeather = document.getElementById('weather');
		//alert(thisFlip);
		if(thisFlip == 'conditions'){
			tableConditions.style.display = 'block';
			tableConditions.style.width = '203px';
			tableWeather.style.display = 'none';
			aConditions.style.background = 'url('+js_rootPath+'images/winter/shellv2/meta-cond.gif) no-repeat right top';
			aWeather.style.background = 'url('+js_rootPath+'images/winter/shellv2/meta-weat.gif) no-repeat right bottom';
			aConditions.style.color = '#fff';
			aWeather.style.color = '#999';
		}else{
			tableConditions.style.display = 'none';
			tableWeather.style.display = 'block';
			tableWeather.style.width= '403px';
			aConditions.style.background = 'url('+js_rootPath+'images/winter/shellv2/meta-cond.gif) no-repeat right bottom';
			aWeather.style.background = 'url('+js_rootPath+'images/winter/shellv2/meta-weat.gif) no-repeat right top';
			aConditions.style.color = '#999';
			aWeather.style.color = '#fff';
		}
	}
	