var fadeimages1=new Array() 
fadeimages1[0]=["images/fly-fishing-canada1.jpg", "", ""] 
fadeimages1[1]=["images/fly-fishing-canada2.jpg", "", ""] 
fadeimages1[2]=["images/DoolittleGreenBoat.jpg", "", ""] 
fadeimages1[3]=["images/FIshInHand2.jpg", "", ""] 
fadeimages1[4]=["images/Fish-In-Hand.jpg", "", ""] 
fadeimages1[5]=["images/GuideInCanoe.jpg", "", ""] 
fadeimages1[6]=["images/Guides1.jpg", "", ""] 
fadeimages1[7]=["images/Guides2.jpg", "", ""] 
fadeimages1[8]=["images/JanssenCasting.jpg", "", ""] 
fadeimages1[9]=["images/Plane-on-water.jpg", "", ""] 
fadeimages1[10]=["images/ShererCasting.jpg", "", ""] 
fadeimages1[11]=["images/Snyderwithpike.jpg", "", ""] 
fadeimages1[12]=["images/TwoCasters.jpg", "", ""] 
fadeimages1[13]=["images/TwoRiverCasters.jpg", "", ""] 
fadeimages1[14]=["images/WalkingTheCanone.jpg", "", ""] 
fadeimages1[15]=["images/Walking-Water.jpg", "", ""] 

var fadeimages2=new Array() 
fadeimages2[0]=["images/fly-in-lodges1.jpg", "", ""] 
fadeimages2[1]=["images/fly-in-lodges2.jpg", "", ""] 
fadeimages2[2]=["images/fly-in-lodges3.jpg", "", ""] 

var fadeimages3=new Array() 
fadeimages3[0]=["images/Opich-1.jpg", "", ""] 
fadeimages3[1]=["images/Opich-2.jpg", "", ""] 
fadeimages3[2]=["images/Opich-3.jpg", "", ""] 
fadeimages3[3]=["images/Opich-4.jpg", "", ""] 

var fadeimages4=new Array() 
fadeimages4[0]=["images/fishing-canada1.jpg", "", ""] 
fadeimages4[1]=["images/fishing-canada2.jpg", "", ""] 
fadeimages4[2]=["images/fishing-canada3.jpg", "", ""] 
 
var fadeimages5=new Array() 
fadeimages5[0]=["images/doolittle2.jpg", "", ""] 
fadeimages5[1]=["images/2005-ofha-certificate.jpg", "", ""] 
fadeimages5[2]=["images/jim-butcher1.jpg", "", ""] 
fadeimages5[3]=["images/2006-ofha-certificate.jpg", "", ""]

var fadeimages6=new Array() 
fadeimages6[0]=["images/fishing_canada_north_pike.jpg", "", ""] 
fadeimages6[1]=["images/pike2.jpg", "", ""] 
fadeimages6[2]=["images/pike3.jpg", "", ""] 
fadeimages6[3]=["images/pike4.jpg", "", ""]
fadeimages6[4]=["images/pike5.jpg", "", ""]
fadeimages6[5]=["images/pike6.jpg", "", ""]

var fadeimages7=new Array() 
fadeimages7[0]=["images/1-Autumn-DAlton.jpg", "", ""] 
fadeimages7[1]=["images/2-Welcome.jpg", "", ""] 
fadeimages7[2]=["images/3-Guest-two.jpg", "", ""] 
fadeimages7[3]=["images/4-Busload.jpg", "", ""]
fadeimages7[4]=["images/5-Under.jpg", "", ""]
fadeimages7[5]=["images/6-Musgrave.jpg", "", ""]
fadeimages7[6]=["images/7-Musgrave-Interior.jpg", "", ""]
fadeimages7[7]=["images/8-Mojikit.jpg", "", ""]
fadeimages7[8]=["images/9-Mojikit-Cabin.jpg", "", ""]
fadeimages7[9]=["images/10-SPL-Aerial.jpg", "", ""]
fadeimages7[10]=["images/11-SPL-Boats.jpg", "", ""]
fadeimages7[11]=["images/12-Miminiska.jpg", "", ""]
fadeimages7[12]=["images/13-Albany.jpg", "", ""]
fadeimages7[13]=["images/14-Ogoki-Whitewater.jpg", "", ""]
fadeimages7[14]=["images/15-Ogoki.jpg", "", ""]
fadeimages7[15]=["images/16-Northern-Pike.jpg", "", ""]
fadeimages7[16]=["images/17-Walleye.jpg", "", ""]
fadeimages7[17]=["images/18-Otter.jpg", "", ""]
fadeimages7[18]=["images/19-Beaver.jpg", "", ""]
fadeimages7[19]=["images/20-Armstrong-aerial.jpg", "", ""]
fadeimages7[20]=["images/21-Opichuan.jpg", "", ""]
fadeimages7[21]=["images/22-Ogoki.jpg", "", ""]
fadeimages7[22]=["images/23-Guests-Father-Son.jpg", "", ""]

var fadeimages8=new Array() 
fadeimages8[0]=["images/1-Mus-Kil-WElcome.jpg", "", ""] 
fadeimages8[1]=["images/2-Musgrave.jpg", "", ""] 
fadeimages8[2]=["images/3-Musgrave-Boats-Plane.jpg", "", ""] 
fadeimages8[3]=["images/4-Musgrave-Exterior.jpg", "", ""]
fadeimages8[4]=["images/5-Musgrave-Solar.jpg", "", ""]
fadeimages8[5]=["images/6-Musgrave-Sunroom.jpg", "", ""]
fadeimages8[6]=["images/7-Musgrave-Weeds.jpg", "", ""]
fadeimages8[7]=["images/8-Musgrave-Pike.jpg", "", ""]
fadeimages8[8]=["images/9-Musgrave-Bunks.jpg", "", ""]
fadeimages8[9]=["images/10-Kitchen.jpg", "", ""]
fadeimages8[10]=["images/11-Musgrave-Dinner.jpg", "", ""]
fadeimages8[11]=["images/12-Musgrave-Rainbow.jpg", "", ""]
fadeimages8[12]=["images/13-Musgrave.jpg", "", ""]
fadeimages8[13]=["images/14-Musgrave-Otter.jpg", "", ""]

var fadeimages9=new Array() 
fadeimages9[0]=["images/Music1.jpg", "", ""] 
fadeimages9[1]=["images/Music2.jpg", "", ""] 
fadeimages9[2]=["images/Music3.jpg", "", ""] 
fadeimages9[3]=["images/Music4.jpg", "", ""]
fadeimages9[4]=["images/Music5.jpg", "", ""]
fadeimages9[5]=["images/Music6.jpg", "", ""]
fadeimages9[6]=["images/Music7.jpg", "", ""]
fadeimages9[7]=["images/Music8.jpg", "", ""]
fadeimages9[8]=["images/Music9.jpg", "", ""]

var fadeimages10=new Array() 
fadeimages10[0]=["images/project-healing1.jpg", "", ""] 
fadeimages10[1]=["images/project-healing2.jpg", "", ""] 
fadeimages10[2]=["images/project-healing3.jpg", "", ""] 
fadeimages10[3]=["images/project-healing4.jpg", "", ""]
fadeimages10[4]=["images/project-healing5.jpg", "", ""]

var fadeimages11=new Array() 
fadeimages11[0]=["images/Mim-Welcome-Final.jpg", "", ""] 
fadeimages11[1]=["images/Well-Fly-You-There-Final.jpg", "", ""] 
fadeimages11[2]=["images/Boreal-Final.jpg", "", ""] 
fadeimages11[3]=["images/World-Class-Final.jpg", "", ""]
fadeimages11[4]=["images/Fly-In-Day-Trips-Final.jpg", "", ""]
fadeimages11[5]=["images/MIM-ComforFInal.jpg", "", ""] 
fadeimages11[6]=["images/Mim-Power-Final.jpg", "", ""] 
fadeimages11[7]=["images/Native-Neighbours-Final.jpg", "", ""] 
fadeimages11[8]=["images/PHW-Slide-Final.jpg", "", ""]
fadeimages11[9]=["images/Bird-Watchers-final.jpg", "", ""]

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);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;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);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;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 if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
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=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
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()
}
























/* Global Variables */
var url = location.href;
var XEUrl = location.href;
var headerImage = '<table border="0" cellspacing="0" cellpadding="0" class="mainWidth"><tr><td class="sideWidth"><img src="http://www.xe.com/gen/images/clear.gif" width="15" height="1" /></td><td><img src="/gen/images/printHeader.gif" alt="XE header" width="670" height="95" border="0" usemap="#MapHeader" /></td></tr></table>';
var headerPopImage = '<!--[if IE]><![if !IE]><![endif]-->  <table border="0" cellspacing="0" cellpadding="0" class="mainWidth">  <!--[if IE]><![endif]><![endif]--><!--[if lte IE 6]>  <table border="0" cellspacing="0" cellpadding="0" class="mainWidth" style="margin-top:-18px;"><![endif]--><tr><td class="sideWidth"><img src="http://www.xe.com/gen/images/clear.gif" width="15" height="1" /></td><td><img src="/gen/images/printHeaderPop.gif" width="665" height="45" alt="XE header" /></td></tr></table>';

/*
  ------------------------------------
  Changes document element to suit browser
  ------------------------------------
*/
function browser(element){
  if (document.all){
    docElement = document.all.element;
  }else if (document.getElementById && !document.all){
    docElement = document.getElementById(element);
  }else if (document.layers){
    docElement = document.layers[element];
  }
}

/*
  ------------------------------------
  Pop-up window for currency assitants
  ------------------------------------
*/
function XEPCA()
    {
      XEPCAWin = window.open('', 'XEPCAWin', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,height=215,width=650');
      XEPCAWin.location.href = XEPCALocation;
      XEPCAWin.focus();      
    }

/*
  ------------------------------------
  Search functions
  ------------------------------------
*/
function SearchInt() {
      document.xesearch.action = 'http://xesearch-int.xe.com/find.html';
      document.xesearch.method= 'get';
    }

    function SearchExt() {
      document.xesearch.action = 'http://xesearch-ext.xe.com/xe/search.php';
      document.xesearch.method= 'post';
    }

    function SearchSub() {
      document.xesearch.query.value = document.xesearch.q.value;
      document.xesearch.submit();
    }


/*
  ------------------------------------
  Focuses on the form element selected before refresh
  ------------------------------------
*/
function Reset60(URL) {
      xeRefresh=setTimeout("document.location.href=URL",60000);
    }

/*
  ------------------------------------
  Setting focus to first form element
  ------------------------------------
*/
function setFocus() {
  if (document.forms.length > 0) {
    var field = document.forms[formNum];
    for (i = 0; i < field.length; i++) {
      if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
        field.elements[i].focus();
        break;
          }
        }
  }
}

/*
  ------------------------------------
  Creating go to links on currency select objects
  ------------------------------------
*/
    function CheckMore(formName) {
      var from = document.forms[formName].From;
    var to = document.forms[formName].To;

    if (to.options.selectedIndex == -1) {
        to.options.selectedIndex = 0; }
      if (from.options.selectedIndex == -1) {
        from.options.selectedIndex = 0; }

    var toValue = to.options[to.selectedIndex].value;
    var fromValue = from.options[from.selectedIndex].value;

      var txtFrom = from.options[from.options.selectedIndex].text;
    var txtTo = to.options[to.options.selectedIndex].text;
      if (toValue.indexOf("/") != -1) {
    document.location.href = toValue;
    }
    if (fromValue.indexOf("/") != -1) {
    document.location.href = fromValue;
    }

    }


/*
  ------------------------------------
  Creating a Favourite Link
  ------------------------------------
*/
function Bookmark(url,passTitle,amountFrom,to,template) {
	if (to == void 0){
		to="";
  	}else if (amountFrom == void 0){
    	amountFrom="";
  	}else if (template == void 0){
    	template="";
  	}
  	XEQueryString(amountFrom,to,template);
	if (passTitle != void 0){
      var bookmarkTitle = passTitle;
    } else if (document.title){
      var bookmarkTitle = document.title;
    } else {
      var bookmarkTitle = "XE.com - The World's Favorite Currency Site";
    }
    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(bookmarkTitle,url+convertPage,"");
    } else if (window.external) { // IE Favorite
    	window.external.AddFavorite(url+convertPage,bookmarkTitle);
	} else if (window.opera && window.print) { // Opera Hotlist
        //CHANGE THIS WHEN WE GET OTHER LANGUAGES UP!
		document.location = "/ucc/bookmark.php";
		return true;
    }
}
function XEBookmark(url,passTitle,amountFrom,to,template) {
	if (to == void 0){
		to="";
  	}else if (amountFrom == void 0){
    	amountFrom="";
  	}else if (template == void 0){
    	template="";
  	}
  	XEQueryString(amountFrom,to,template);
  	if (passTitle != void 0){
    	var bookmarkTitle = passTitle;
    } else if (document.title){
    	var bookmarkTitle = document.title;
    } else {
    	var bookmarkTitle = "XE.com - The World's Favorite Currency Site";
    }
    if (window.sidebar) { // Mozilla Firefox Bookmark
    	window.sidebar.addPanel(bookmarkTitle,url+convertPage,"");
    } else if (window.external) { // IE Favorite
    	window.external.AddFavorite(url+convertPage,bookmarkTitle);
    } else if (window.opera && window.print) { // Opera Hotlist
        //CHANGE THIS WHEN WE GET OTHER LANGUAGES UP!
		document.location = "/ucc/bookmark.php";
		return true;
    }
}


/*
  ------------------------------------
  General Pop-up Windows
  ------------------------------------
*/
function NewWindow(mypage, myname, w, h, scroll,amountFrom,to,template) {
  if (to == void 0){
    to="";
  }else if (amountFrom == void 0){
    amountFrom="";
  }else if (template == void 0){
    template="";
  }
  XEQueryString(amountFrom,to,template);
  mypage = mypage + convertPage;
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
  win = window.open(mypage, myname, winprops);
}
function XENewWindow(mypage, myname, w, h, scroll,amountFrom,to,template) {
  if (to == void 0){
    to="";
  }else if (amountFrom == void 0){
    amountFrom="";
  }else if (template == void 0){
    template="";
  }
  XEQueryString(amountFrom,to,template);
  mypage = mypage + convertPage;
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
  win = window.open(mypage, myname, winprops);
}

// Pop-up window function to get around Firefox tabs... so not meant to really be a popup, keep address bar, etc.
function XEOpen(mypage) {
	winprops = 'scrollbars=1,menubar=1,resizable=1,location=1,toolbar=1,status=1';
	win = window.open(mypage, 'XEtradeNew', winprops);
}


/*
  ------------------------------------
  Construct proper query string for converters
  ------------------------------------
*/
function XEQueryString(amountFrom,to,template) {
  if (amountFrom == undefined){
    amount = "";
    from = "";
  }else{
    splitArray = amountFrom.split(' ');
    amount = splitArray[0];
    from = splitArray[1];
  }
  if (amount != "" && from != "" && to != "" && template != ""){
    convertPage = 'Amount=' + amount + '&From=' + from + '&To=' + to + '&template=' + template;
  }else{
    convertPage = "";
  }
}


/*
  ------------------------------------
  PVII Menu CSS Express Drop-Down Menu
  by Project Seven Development
  www.projectseven.com
  ------------------------------------
*/
function P7_ExpMenu(){ //v1.1.0.2 by PVII-www.projectseven.com
 if(navigator.appVersion.indexOf("MSIE")==-1){return;}
 var i,k,g,lg,r=/\s*p7hvr/,nn='',c,cs='p7hvr',bv='p7menubar';
 for(i=0;i<10;i++){g=document.getElementById(bv+nn);if(g){
 lg=g.getElementsByTagName("LI");if(lg){for(k=0;k<lg.length;k++){
 lg[k].onmouseover=function(){c=this.className;cl=(c)?c+' '+cs:cs;
 this.className=cl;};lg[k].onmouseout=function(){c=this.className;
 this.className=(c)?c.replace(r,''):'';};}}}nn=i+1;}
}


/*
  ------------------------------------
  Function that finds all occurences of classnames in a page
  getElementsByClassName('popupRollover','span',headerID) -> need classname, tag type, and between which elements
  ------------------------------------
*/
function getElementsByClassName(strClass, strTag, objContElm) {
  strTag = strTag || "*";
  objContElm = objContElm || document;
  var objColl = objContElm.getElementsByTagName(strTag);
  if (!objColl.length &&  strTag == "*" &&  objContElm.all) objColl = objContElm.all;
  var arr = new Array();
  var delim = strClass.indexOf('|') != -1  ? '|' : ' ';
  var arrClass = strClass.split(delim);
  for (var i = 0, j = objColl.length; i < j; i++) {
    var arrObjClass = objColl[i].className.split(' ');
    if (delim == ' ' && arrClass.length > arrObjClass.length) continue;
    var c = 0;
    comparisonLoop:
    for (var k = 0, l = arrObjClass.length; k < l; k++) {
      for (var m = 0, n = arrClass.length; m < n; m++) {
        if (arrClass[m] == arrObjClass[k]) c++;
        if (( delim == '|' && c == 1) || (delim == ' ' && c == arrClass.length)) {
          arr.push(objColl[i]);
          break comparisonLoop;
        }
      }
    }
  }
  return arr;
}
// To cover IE 5.0's lack of the push method
Array.prototype.push = function(value) {
  this[this.length] = value;
}


/*
  ------------------------------------
  Function that swaps, adds or removes classes
  ------------------------------------
*/
function cssjs(a,o,c1,c2)
{
	switch (a){
		case 'swapOnce':
			o.className=!cssjs('check',o,c1) ? o.className.replace(c1,c2):o.className.replace(c1,c2);
		break;
		case 'swap':
			o.className=!cssjs('check',o,c1) ? o.className.replace(c2,c1):o.className.replace(c1,c2);
		break;
		case 'add':
			if(!cssjs('check',o,c1))
			{
				o.className+=o.className?' '+c1:c1;
			}
		break;
		case 'remove':
			var rep=o.className.match(' '+c1)?' '+c1:c1;
			o.className=o.className.replace(rep,'');
		break;
		case 'check':
			return new RegExp('\\b'+c1+'\\b').test(o.className)
		break;
	}
}

/*
  ------------------------------------
  Popup window as css layer
  ------------------------------------
*/
function popupRollover() {
	var navID = document.getElementById('cssLayer');
	//alert(navID);
	var popupRollover = getElementsByClassName('popupRollover','div',navID);
	var popupLayer = getElementsByClassName('hide','div',navID);
	var popupClose = getElementsByClassName('popupClose','div',navID);
	//Finds all popup links (found by classname) in page and adds popup on rollover
	for (var i = 0, j = popupRollover.length; i < j; i++) {
		popupRollover[i].popupLayer=popupLayer[i];
		popupRollover[i].onmouseover=function()
		{
			
			cssjs('swapOnce',this.popupLayer,'hide','popupLayer');
		}
	}
	//Finds all popup links (found by classname) in page and removes popup on rollout
	for (var i = 0, j = popupRollover.length; i < j; i++) {
		popupRollover[i].popupLayer=popupLayer[i];
		popupRollover[i].onmouseout=function()
		{
			
			cssjs('swapOnce',this.popupLayer,'popupLayer','hide');
		}
	}
	/*//Finds all close links (found by classname) in page and adds hide popup with onclick
	for (var i = 0, j = popupRollover.length; i < j; i++) {
		var before=popupClose[i].parentNode;
		while(before.nodeType!=1)
		{
			before=before.parentNode;
		}
		popupClose[i].before=before;
		popupClose[i].onmouseover=function()
		{
			cssjs('swap',this.before,'popupLayer','hide');	
		}
	}*/
}

/*
  ------------------------------------
  Popup window as css layer
  ------------------------------------
*/
function exgisRollover() {
	var navID = document.getElementById('cssLayer');
	var popupRollover = getElementsByClassName('popupRollover','div',navID);
	var popupLayer = getElementsByClassName('hide','div',navID);
	var popupClose = getElementsByClassName('popupClose','div',navID);
	var myPopupLayer = "";
	//Finds all popup links (found by classname) in page and adds popup on rollover
	for (var i = 0, j = popupRollover.length; i < j; i++) {
		popupRollover[i].popupLayer=popupLayer[i];
		popupRollover[i].onmouseover=function()
		{
			cssjs('swapOnce',this.popupLayer,'hide','popupLayer');
			myPopupLayer = getElementsByClassName('popupLayer','div',navID);
		}
	}
	//Finds all popup links (found by classname) in page and removes popup on rollout
	for (var i = 0, j = popupRollover.length; i < j; i++) {
		
		alert(myPopupLayer);
		popupLayer[i].onmouseout=function()
		{
			cssjs('swapOnce',this,'popupLayer','hide');
		}
	}
}

/*
  ------------------------------------
  Search Form Hide and Show Feature
  ------------------------------------
*/
function searchShowHide() {
	var searchID = document.getElementById('search');
	var searchLink = getElementsByClassName('searchLink','div',searchID);
	var searchForm = getElementsByClassName('hide','div',searchID);
	
	//Finds all popup links (found by classname) in page and adds popup on rollover
	for (var i = 0, j = searchLink.length; i < j; i++) {
		searchLink[i].searchForm=searchForm[i];
		searchLink[i].onclick=function()
		{
			cssjs('swap',this.searchForm,'hide','show');
			cssjs('swap',this,'searchLink','hide');
		}
	}
}


/*
  ------------------------------------
  Blinking "Click here!!" ad on PCA input and results and UCC results
  ------------------------------------
*/
function blinkingStart() {
	blinkID = document.getElementById('adBlink');
	blinkRed = getElementsByClassName('XEred','span',blinkID);
	blinkGrey = getElementsByClassName('XEgrey','span',blinkID);
	//setInterval to keep switching classes
	if (blinkRed){
		setInterval("blinkingHide()",750);
	}else{
		setInterval("blinkingShow()",750);
	}
}
function blinkingHide() {
	for (var i = 0, j = blinkRed.length; i < j; i++) {
		cssjs('swap',blinkRed[i],'XEred','XEgrey');
	}
}
function blinkingShow() {
	for (var i = 0, j = blinkGrey.length; i < j; i++) {
		cssjs('swap',blinkGrey[i],'XEgrey','XEred');
	}
}


/*
  ------------------------------------
  Switching the colour of text
  ------------------------------------
*/
function XESwitchClass(){
  if (document.getElementById("XEblink").className == "XEred"){
    document.getElementById("XEblink").className = "XEwhite";
  }else{
    document.getElementById("XEblink").className = "XEred";
  }
}      
function XESwitchClassGrey(){
  if (document.getElementById("XEblink").className == "XEred"){
    document.getElementById("XEblink").className = "XEgrey";
  }else{
    document.getElementById("XEblink").className = "XEred";
  }
}

/*
  ------------------------------------
  FROM SPEC.XE.COM - Clicking on checkbox shows text field underneath
  ------------------------------------
*/
function showOtherText() {
	var navID = document.getElementById('body');
	var formOther = getElementsByClassName('formOther','input',navID);
	var formOtherText = getElementsByClassName('hide','textarea',navID);
	//alert(formOtherText);
	//Finds all checkboxes with classname 'formOther' on page and shows textarea field
	for (var i = 0, j = formOther.length; i < j; i++) {
		formOther[i].formOtherText=formOtherText[i];
		/*if(formOther[i].type=="radio"){
			//length
			radioName = formOther[i].name;
			alert(document.XESpec1.formOther[i].name.length);
			//document.test.myradio.length
		}*/
		if(formOther[i].checked)
		{
			cssjs('swapOnce',formOther[i].formOtherText,'hide','formOtherText');
		}
		formOther[i].onclick=function()
		{
			cssjs('swap',this.formOtherText,'hide','formOtherText');
		}
	}
}

/*
  ------------------------------------
  Switching the radio selection on ICT page
  ------------------------------------
*/
function MoveDot() { document.ICT.historical[1].checked = true; }

/*
  ------------------------------------
  Used instead of window.onload function 
  This function allows you to have multiple onload instances, without screwing up other scripts that need an onload type functionality
  ------------------------------------
*/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}
addLoadEvent(P7_ExpMenu);
addLoadEvent(searchShowHide);




/***********************************************
* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
                
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      


/* content info for scrollers */

var pausecontent=new Array()
//pausecontent[0]='<center><a href="mailto:wayne@wildernessnorth.com" title="Fishing Report Weekly Request">2011 guests can save 10% of their trip costs by taking advantage of the Reel Deal offer.  Ask your trip planner how to qualify.</a></center>'
pausecontent[0]='<center><a href="http://www.wildernessnorth.com/calendar/">To receive our 2012 Full Colour Wall Calendar FREE ...click here</a></center>'
pausecontent[1]='<center><a href="http://www.wildernessnorth.com/calendar/">To receive our 2012 Full Colour Wall Calendar FREE ...click here</a></center>'

//pausecontent[0]='<center><a href="mailto:joe@wildernessnorth.com" title="">Book your 2012 adventure now...</a></center>'
//pausecontent[1]='<center><a href="mailto:joe@wildernessnorth.com" title="">Pay in full by check before December 23 for a 10% discount</a></center>'


//pausecontent[0]='<center><a href="mailto:joe@wildernessnorth.com" title="Fishing Report Weekly Request">Special Savings on Fill-In Trips, Click here for details</center>'
//pausecontent[1]='<center><a href="" title="Fishing Report Weekly Request">Free 2011 full colour wall calendar - Call 800-496-8060 for yours</a></center>'
//pausecontent[2]='<center><a href="mailto:joe@wildernessnorth.com" title="Fishing Report Weekly Request">Special Savings on Fill-In Trips, Click here for details</center>'
//pausecontent[3]='<center><a href="" title="Fishing Report Weekly Request">Free 2011 full colour wall calendar - Call 800-496-8060 for yours</a></center>'
//pausecontent[0]='<center><a href="trip-cost-estimator1.php">New <i>Trip Cost Estimator</i> now available - click here</a></center>'
//pausecontent[1]='<center><a href="podcasts.php">Podcast archives available here</a></center>'
//pausecontent[2]='<center><a href="http://archive.constantcontact.com/fs060/1101968271250/archive/1102151889392.html">Newsletter archives available here</a></center>'
//pausecontent[3]='<center><a href="trip-cost-estimator1.php">We rolled back prices, Plus save 10% more - click here</a></center>'
//pausecontent[4]='<script type="text/javascript">var marqueecontent="test";</script><script type="text/javascript" src="javascripts/marquee.js"></script>'
//pausecontent[4]='<script language="JavaScript" src="javascripts/marquee.js"></script>'


/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


function popupwindow(windowURL) {
bookWindow = window.open(windowURL, 'mailWin', 'width=750, height=550, left=0, top=0, scrollbars=yes, resizable=yes')
bookWindow.focus()
}

