
/*
--------------------------------------------------------------------------- 
Default Javascript File
(c) 2006 Select Performers

Version:	1.00
Date:		06/01/2007
Author:		Ian Anderson Gray
Website:	http://selectperformers.com/
---------------------------------------------------------------------------
Notes:	
		
---------------------------------------------------------------------------
To Do

---------------------------------------------------------------------------
Change Log

---------------------------------------------------------------------------
*/


/*-----------------------------------------------------------------------------*/
// Start of window.onload fix (by Dean Edwards/Matthias Miller/John Resig)
/*-----------------------------------------------------------------------------*/
	function init()
		{
   			// quit if this function has already been called
  	 		if (arguments.callee.done) return;

    		// flag this function so we don't do the same thing twice
    		arguments.callee.done = true;

    		// kill the timer
    		if (_timer) clearInterval(_timer);
			
			
			/*-----------------------------------------------------------------------------*/
			/*-----------------------------------------------------------------------------*/
    		// Start of Javascript to initialise when page loads...
					
			doExternalLink();
			Fat.fade_all();
			if(document.getElementById('printPage')) {document.getElementById('printPage').innerHTML = '<a href="javascript:window.print()" title="Print this Page" class="print">Print this Page</a>';}
			if(document.getElementById('favorites')) {document.getElementById('favorites').innerHTML = "<a href=\"javascript:bookmarksite('"+document.title+"', '"+location.href+"')\" title=\"Add this page to your favourites\" class=\"favorites\">Add to Favourites</a>";}
			geo();
			var FOa = {movie:"/media/swf/player.swf?song_url=/media/audio/spanishDance.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOa, "audio1");
			var FOb = {movie:"/media/swf/player.swf?song_url=/media/audio/chansonDeMatin.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOb, "audio2");
			var FOc = {movie:"/media/swf/player.swf?song_url=/media/audio/ruleBritannia.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOc, "audio3");
			var FOd = {movie:"/media/swf/player.swf?song_url=/media/audio/hungarianDance.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOd, "audio4");
			var FOe = {movie:"/media/swf/player.swf?song_url=/media/audio/romanzaRondo.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOe, "audio5");
			var FOf = {movie:"/media/swf/player.swf?song_url=/media/audio/itDontMeanAThing.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOf, "audio6");
			var FOg = {movie:"/media/swf/player.swf?song_url=/media/audio/aintMisbehavin.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOg, "audio7");
			var FOh = {movie:"/media/swf/player.swf?song_url=/media/audio/negroSpirituals.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOh, "audio8");
			var FOi = {movie:"/media/swf/player.swf?song_url=/media/audio/flightOfTheBumblebee.mp3&amp;b_bgcolor=000000&amp;b_fgcolor=000000&amp;b_colors=cccccc,cccccc,cccccc,cccccc", width:"18", height:"18", majorversion:"7", build:"0", quality:"high"};
			UFO.create(FOi, "audio9");
			// End of Javascript to initialise when page loads
			/*-----------------------------------------------------------------------------*/
			/*-----------------------------------------------------------------------------*/
		};

	/* for Mozilla/Opera9 */
	if (document.addEventListener)
		{
   			document.addEventListener("DOMContentLoaded", init, false);
		}

	/* for Internet Explorer */
	/*@cc_on @*/
	/*@if (@_win32)
   	 	document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
   	 	var script = document.getElementById("__ie_onload");
    	script.onreadystatechange = function()
			{
        		if (this.readyState == "complete")
					{
            			init(); // call the onload handler
        			}
    		};
		/*@end @*/

	/* for Safari */
		if (/WebKit/i.test(navigator.userAgent))
			{ // sniff
    			var _timer = setInterval(function()
					{
        				if (/loaded|complete/.test(document.readyState))
							{
            					init(); // call the onload handler
        					}
    				}, 10);
			}

	/* for other browsers */
		window.onload = init;

/*-----------------------------------------------------------------------------*/
// End of window.onload fix
/*-----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------*/
// Start of Bookmark Site function
/*-----------------------------------------------------------------------------*/
function bookmarksite(title,url)
	{
		if (window.sidebar) 
			{// firefox
				window.sidebar.addPanel(title, url, "");
			}
		else if(window.opera && window.print)
			{ // opera
				var elem = document.createElement('a');
				elem.setAttribute('href',url);
				elem.setAttribute('title',title);
				elem.setAttribute('rel','sidebar');
				elem.click();
			} 
		else if(document.all)
			{// ie
				window.external.AddFavorite(url, title);
			}
	}
/*-----------------------------------------------------------------------------*/
// End of Bookmark Site function
/*-----------------------------------------------------------------------------*/
 

/*-----------------------------------------------------------------------------*/
// Start of externalLink function
// Opens a link in a new window when class = externalLink
/*-----------------------------------------------------------------------------*/
function doExternalLink()
	{
		if (!document.getElementsByTagName)
			{
				return false;
			}
  		var links = document.getElementsByTagName("a");
  		for (var i=0; i < links.length; i++)
			{
    			if (links[i].className.match("externalLink"))
					{
						links[i].className = links[i].className + " newWinStyle";
							if (links[i].title == "")
								{
									links[i].title = "<br />(opens in new window)";
								}
							else
								{
									links[i].title = links[i].title + "<br />(opens in new window)";	
								}
	 						links[i].onclick = function(e)
								{
									if(!e)e=window.event;
									if(e.shiftKey || e.ctrlKey || e.altKey) return;
									window.open(this.href);
									return false;
								}
      				}
    		}
	}
/*-----------------------------------------------------------------------------*/
// End of externalLink Function
/*-----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------*/
// Start of Array Shorthand
/*-----------------------------------------------------------------------------*/
// Shorthand for seeing if something is in an array

Array.prototype.inArray = function (value) {
	var i;
	for (i=0; i < this.length; i++) {
		if (this[i] === value) {
			return true;
		}
	}
	return false;
};
/*-----------------------------------------------------------------------------*/
// End of Array Shorthand
/*-----------------------------------------------------------------------------*/


/*-----------------------------------------------------------------------------*/
// Start of IE Cache Fix
/*-----------------------------------------------------------------------------*/
// Solves an IE caching problem
var EventCache = function(){
	var listEvents = [];
	return {
		listEvents : listEvents,
		add : function(node, sEventName, fHandler){
			listEvents.push(arguments);
		},
		flush : function(){
			var i, item;
			for(i = listEvents.length - 1; i >= 0; i = i - 1){
				item = listEvents[i];
				if(item[0].removeEventListener){
					item[0].removeEventListener(item[1], item[2], item[3]);
				};
				if(item[1].substring(0, 2) != "on"){
					item[1] = "on" + item[1];
				};
				if(item[0].detachEvent){
					item[0].detachEvent(item[1], item[2]);
				};
				item[0][item[1]] = null;
			};
		}
	};
}();
addEventy(window,'unload',EventCache.flush);
/*-----------------------------------------------------------------------------*/
// End of IE Cache Fix
/*-----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------*/
// Start of dropdown menu Function
/*-----------------------------------------------------------------------------*/
/*		This fixes the dropdown menu to work in IE */
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
/*-----------------------------------------------------------------------------*/
// End of dropdown menu fix
/*-----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------*/
// Start of Easy Add Event
/*-----------------------------------------------------------------------------*/
// Easy way of adding an event
function addEventy( obj,type,fn ){
 if (obj.addEventListener){
 obj.addEventListener( type,fn,false );
 EventCache.add(obj,type,fn);
}
 else if (obj.attachEvent){
 obj["e"+type+fn] = fn;
 obj[type+fn] = function(){obj["e"+type+fn]( window.event );}
 obj.attachEvent( "on"+type,obj[type+fn] );
 EventCache.add(obj,type,fn);
}
 else{
 obj["on"+type] = obj["e"+type+fn];
}
}
/*-----------------------------------------------------------------------------*/
// End of Easy Add Event
/*-----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------*/
//		Start of Unobtrusive Flash Objects (UFO) v3.21
/*-----------------------------------------------------------------------------*/
/*	Unobtrusive Flash Objects (UFO) v3.22 <http://www.bobbyvandersluis.com/ufo/>
	Copyright 2005-2007 Bobby van der Sluis
	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
			
	This function inserts the flash objects into the page if the visitor has flash enabled. */


var UFO = {
	req: ["movie", "width", "height", "majorversion", "build"],
	opt: ["play", "loop", "menu", "quality", "scale", "salign", "wmode", "bgcolor", "base", "flashvars", "devicefont", "allowscriptaccess", "seamlesstabbing", "allowfullscreen", "allownetworking"],
	optAtt: ["id", "name", "align"],
	optExc: ["swliveconnect"],
	ximovie: "ufo.swf",
	xiwidth: "215",
	xiheight: "138",
	ua: navigator.userAgent.toLowerCase(),
	pluginType: "",
	fv: [0,0],
	foList: [],
		
	create: function(FO, id) {
		if (!UFO.uaHas("w3cdom") || UFO.uaHas("ieMac")) return;
		UFO.getFlashVersion();
		UFO.foList[id] = UFO.updateFO(FO);
		UFO.createCSS("#" + id, "visibility:hidden;");
		UFO.domLoad(id);
	},

	updateFO: function(FO) {
		if (typeof FO.xi != "undefined" && FO.xi == "true") {
			if (typeof FO.ximovie == "undefined") FO.ximovie = UFO.ximovie;
			if (typeof FO.xiwidth == "undefined") FO.xiwidth = UFO.xiwidth;
			if (typeof FO.xiheight == "undefined") FO.xiheight = UFO.xiheight;
		}
		FO.mainCalled = false;
		return FO;
	},

	domLoad: function(id) {
		var _t = setInterval(function() {
			if ((document.getElementsByTagName("body")[0] != null || document.body != null) && document.getElementById(id) != null) {
				UFO.main(id);
				clearInterval(_t);
			}
		}, 250);
		if (typeof document.addEventListener != "undefined") {
			document.addEventListener("DOMContentLoaded", function() { UFO.main(id); clearInterval(_t); } , null); // Gecko, Opera 9+
		}
	},

	main: function(id) {
		var _fo = UFO.foList[id];
		if (_fo.mainCalled) return;
		UFO.foList[id].mainCalled = true;
		document.getElementById(id).style.visibility = "hidden";
		if (UFO.hasRequired(id)) {
			if (UFO.hasFlashVersion(parseInt(_fo.majorversion, 10), parseInt(_fo.build, 10))) {
				if (typeof _fo.setcontainercss != "undefined" && _fo.setcontainercss == "true") UFO.setContainerCSS(id);
				UFO.writeSWF(id);
			}
			else if (_fo.xi == "true" && UFO.hasFlashVersion(6, 65)) {
				UFO.createDialog(id);
			}
		}
		document.getElementById(id).style.visibility = "visible";
	},
	
	createCSS: function(selector, declaration) {
		var _h = document.getElementsByTagName("head")[0]; 
		var _s = UFO.createElement("style");
		if (!UFO.uaHas("ieWin")) _s.appendChild(document.createTextNode(selector + " {" + declaration + "}")); // bugs in IE/Win
		_s.setAttribute("type", "text/css");
		_s.setAttribute("media", "screen"); 
		_h.appendChild(_s);
		if (UFO.uaHas("ieWin") && document.styleSheets && document.styleSheets.length > 0) {
			var _ls = document.styleSheets[document.styleSheets.length - 1];
			if (typeof _ls.addRule == "object") _ls.addRule(selector, declaration);
		}
	},
	
	setContainerCSS: function(id) {
		var _fo = UFO.foList[id];
		var _w = /%/.test(_fo.width) ? "" : "px";
		var _h = /%/.test(_fo.height) ? "" : "px";
		UFO.createCSS("#" + id, "width:" + _fo.width + _w +"; height:" + _fo.height + _h +";");
		if (_fo.width == "100%") {
			UFO.createCSS("body", "margin-left:0; margin-right:0; padding-left:0; padding-right:0;");
		}
		if (_fo.height == "100%") {
			UFO.createCSS("html", "height:100%; overflow:hidden;");
			UFO.createCSS("body", "margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;");
		}
	},

	createElement: function(el) {
		return (UFO.uaHas("xml") && typeof document.createElementNS != "undefined") ?  document.createElementNS("http://www.w3.org/1999/xhtml", el) : document.createElement(el);
	},

	createObjParam: function(el, aName, aValue) {
		var _p = UFO.createElement("param");
		_p.setAttribute("name", aName);	
		_p.setAttribute("value", aValue);
		el.appendChild(_p);
	},

	uaHas: function(ft) {
		var _u = UFO.ua;
		switch(ft) {
			case "w3cdom":
				return (typeof document.getElementById != "undefined" && typeof document.getElementsByTagName != "undefined" && (typeof document.createElement != "undefined" || typeof document.createElementNS != "undefined"));
			case "xml":
				var _m = document.getElementsByTagName("meta");
				var _l = _m.length;
				for (var i = 0; i < _l; i++) {
					if (/content-type/i.test(_m[i].getAttribute("http-equiv")) && /xml/i.test(_m[i].getAttribute("content"))) return true;
				}
				return false;
			case "ieMac":
				return /msie/.test(_u) && !/opera/.test(_u) && /mac/.test(_u);
			case "ieWin":
				return /msie/.test(_u) && !/opera/.test(_u) && /win/.test(_u);
			case "gecko":
				return /gecko/.test(_u) && !/applewebkit/.test(_u);
			case "opera":
				return /opera/.test(_u);
			case "safari":
				return /applewebkit/.test(_u);
			default:
				return false;
		}
	},
	
	getFlashVersion: function() {
		if (UFO.fv[0] != 0) return;  
		if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") {
			UFO.pluginType = "npapi";
			var _d = navigator.plugins["Shockwave Flash"].description;
			if (typeof _d != "undefined") {
				_d = _d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
				var _m = parseInt(_d.replace(/^(.*)\..*$/, "$1"), 10);
				var _r = /r/.test(_d) ? parseInt(_d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
				UFO.fv = [_m, _r];
			}
		}
		else if (window.ActiveXObject) {
			UFO.pluginType = "ax";
			try { // avoid fp 6 crashes
				var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
			}
			catch(e) {
				try { 
					var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
					UFO.fv = [6, 0];
					_a.AllowScriptAccess = "always"; // throws if fp < 6.47 
				}
				catch(e) {
					if (UFO.fv[0] == 6) return;
				}
				try {
					var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				}
				catch(e) {}
			}
			if (typeof _a == "object") {
				var _d = _a.GetVariable("$version"); // bugs in fp 6.21/6.23
				if (typeof _d != "undefined") {
					_d = _d.replace(/^\S+\s+(.*)$/, "$1").split(",");
					UFO.fv = [parseInt(_d[0], 10), parseInt(_d[2], 10)];
				}
			}
		}
	},

	hasRequired: function(id) {
		var _l = UFO.req.length;
		for (var i = 0; i < _l; i++) {
			if (typeof UFO.foList[id][UFO.req[i]] == "undefined") return false;
		}
		return true;
	},
	
	hasFlashVersion: function(major, release) {
		return (UFO.fv[0] > major || (UFO.fv[0] == major && UFO.fv[1] >= release)) ? true : false;
	},

	writeSWF: function(id) {
		var _fo = UFO.foList[id];
		var _e = document.getElementById(id);
		if (UFO.pluginType == "npapi") {
			if (UFO.uaHas("gecko") || UFO.uaHas("xml")) {
				while(_e.hasChildNodes()) {
					_e.removeChild(_e.firstChild);
				}
				var _obj = UFO.createElement("object");
				_obj.setAttribute("type", "application/x-shockwave-flash");
				_obj.setAttribute("data", _fo.movie);
				_obj.setAttribute("width", _fo.width);
				_obj.setAttribute("height", _fo.height);
				var _l = UFO.optAtt.length;
				for (var i = 0; i < _l; i++) {
					if (typeof _fo[UFO.optAtt[i]] != "undefined") _obj.setAttribute(UFO.optAtt[i], _fo[UFO.optAtt[i]]);
				}
				var _o = UFO.opt.concat(UFO.optExc);
				var _l = _o.length;
				for (var i = 0; i < _l; i++) {
					if (typeof _fo[_o[i]] != "undefined") UFO.createObjParam(_obj, _o[i], _fo[_o[i]]);
				}
				_e.appendChild(_obj);
			}
			else {
				var _emb = "";
				var _o = UFO.opt.concat(UFO.optAtt).concat(UFO.optExc);
				var _l = _o.length;
				for (var i = 0; i < _l; i++) {
					if (typeof _fo[_o[i]] != "undefined") _emb += ' ' + _o[i] + '="' + _fo[_o[i]] + '"';
				}
				_e.innerHTML = '<embed type="application/x-shockwave-flash" src="' + _fo.movie + '" width="' + _fo.width + '" height="' + _fo.height + '" pluginspage="http://www.macromedia.com/go/getflashplayer"' + _emb + '></embed>';
			}
		}
		else if (UFO.pluginType == "ax") {
			var _objAtt = "";
			var _l = UFO.optAtt.length;
			for (var i = 0; i < _l; i++) {
				if (typeof _fo[UFO.optAtt[i]] != "undefined") _objAtt += ' ' + UFO.optAtt[i] + '="' + _fo[UFO.optAtt[i]] + '"';
			}
			var _objPar = "";
			var _l = UFO.opt.length;
			for (var i = 0; i < _l; i++) {
				if (typeof _fo[UFO.opt[i]] != "undefined") _objPar += '<param name="' + UFO.opt[i] + '" value="' + _fo[UFO.opt[i]] + '" />';
			}
			var _p = window.location.protocol == "https:" ? "https:" : "http:";
			_e.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + _objAtt + ' width="' + _fo.width + '" height="' + _fo.height + '" codebase="' + _p + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + _fo.majorversion + ',0,' + _fo.build + ',0"><param name="movie" value="' + _fo.movie + '" />' + _objPar + '</object>';
		}
	},
		
	createDialog: function(id) {
		var _fo = UFO.foList[id];
		UFO.createCSS("html", "height:100%; overflow:hidden;");
		UFO.createCSS("body", "height:100%; overflow:hidden;");
		UFO.createCSS("#xi-con", "position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;");
		UFO.createCSS("#xi-dia", "position:absolute; left:50%; top:50%; margin-left: -" + Math.round(parseInt(_fo.xiwidth, 10) / 2) + "px; margin-top: -" + Math.round(parseInt(_fo.xiheight, 10) / 2) + "px; width:" + _fo.xiwidth + "px; height:" + _fo.xiheight + "px;");
		var _b = document.getElementsByTagName("body")[0];
		var _c = UFO.createElement("div");
		_c.setAttribute("id", "xi-con");
		var _d = UFO.createElement("div");
		_d.setAttribute("id", "xi-dia");
		_c.appendChild(_d);
		_b.appendChild(_c);
		var _mmu = window.location;
		if (UFO.uaHas("xml") && UFO.uaHas("safari")) {
			var _mmd = document.getElementsByTagName("title")[0].firstChild.nodeValue = document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0, 47) + " - Flash Player Installation";
		}
		else {
			var _mmd = document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		}
		var _mmp = UFO.pluginType == "ax" ? "ActiveX" : "PlugIn";
		var _uc = typeof _fo.xiurlcancel != "undefined" ? "&xiUrlCancel=" + _fo.xiurlcancel : "";
		var _uf = typeof _fo.xiurlfailed != "undefined" ? "&xiUrlFailed=" + _fo.xiurlfailed : "";
		UFO.foList["xi-dia"] = { movie:_fo.ximovie, width:_fo.xiwidth, height:_fo.xiheight, majorversion:"6", build:"65", flashvars:"MMredirectURL=" + _mmu + "&MMplayerType=" + _mmp + "&MMdoctitle=" + _mmd + _uc + _uf };
		UFO.writeSWF("xi-dia");
	},

	expressInstallCallback: function() {
		var _b = document.getElementsByTagName("body")[0];
		var _c = document.getElementById("xi-con");
		_b.removeChild(_c);
		UFO.createCSS("body", "height:auto; overflow:auto;");
		UFO.createCSS("html", "height:auto; overflow:auto;");
	},

	cleanupIELeaks: function() {
		var _o = document.getElementsByTagName("object");
		var _l = _o.length
		for (var i = 0; i < _l; i++) {
			_o[i].style.display = "none";
			for (var x in _o[i]) {
				if (typeof _o[i][x] == "function") {
					_o[i][x] = null;
				}
			}
		}
	}

};

if (typeof window.attachEvent != "undefined" && UFO.uaHas("ieWin")) {
	window.attachEvent("onunload", UFO.cleanupIELeaks);
}
// End of UFO Function
/*-----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------*/
// Start of Sweet Titles
/*-----------------------------------------------------------------------------*/
/*
Sweet Titles (c) Creative Commons 2005
http://creativecommons.org/licenses/by-sa/2.5/
Author: Dustin Diaz | http://www.dustindiaz.com
*/
var sweetTitles = { 
	xCord : 0,								// @Number: x pixel value of current cursor position
	yCord : 0,								// @Number: y pixel value of current cursor position
	tipElements : ['a','abbr','acronym'],	// @Array: Allowable elements that can have the toolTip
	obj : Object,							// @Element: That of which you're hovering over
	tip : Object,							// @Element: The actual toolTip itself
	active : 0,								// @Number: 0: Not Active || 1: Active
	init : function() {
		if ( !document.getElementById ||
			!document.createElement ||
			!document.getElementsByTagName ) {
			return;
		}
		var i,j;
		this.tip = document.createElement('div');
		this.tip.id = 'toolTip';
		document.getElementsByTagName('body')[0].appendChild(this.tip);
		this.tip.style.top = '0';
		this.tip.style.visibility = 'hidden';
		var tipLen = this.tipElements.length;
		for ( i=0; i<tipLen; i++ ) {
			var current = document.getElementsByTagName(this.tipElements[i]);
			var curLen = current.length;
			 for ( j=0; j<curLen; j++ ) {
				// Quick check for Tags that don't have 'title'
				if (current[j].getAttribute('title') == null || current[j].getAttribute('title') == "") continue;

				addEventy(current[j],'mouseover',this.tipOver);
				addEventy(current[j],'mouseout',this.tipOut);
				current[j].setAttribute('tip',current[j].title);
				current[j].removeAttribute('title');
			}
		}
	},
	updateXY : function(e) {
		if ( document.captureEvents ) {
			sweetTitles.xCord = e.pageX;
			sweetTitles.yCord = e.pageY;
		} else if ( window.event.clientX ) {
			sweetTitles.xCord = window.event.clientX+document.documentElement.scrollLeft;
			sweetTitles.yCord = window.event.clientY+document.documentElement.scrollTop;
		}
	},
	tipOut: function() {
		if ( window.tID ) {
			clearTimeout(tID);
		}
		if ( window.opacityID ) {
			clearTimeout(opacityID);
		}
		sweetTitles.tip.style.visibility = 'hidden';
	},
	checkNode : function() {
		var trueObj = this.obj;
		if ( this.tipElements.inArray(trueObj.nodeName.toLowerCase()) ) {
			return trueObj;
		} else {
			return trueObj.parentNode;
		}
	},
	tipOver : function(e) {
		sweetTitles.obj = this;
		tID = window.setTimeout("sweetTitles.tipShow()",500);
		sweetTitles.updateXY(e);
	},
	tipShow : function() {		
		var scrX = Number(this.xCord);
		var scrY = Number(this.yCord);
		var tp = parseInt(scrY+15);
		var lt = parseInt(scrX+10);
		var anch = this.checkNode();
		var addy = '';
		var access = '';
		if ( anch.nodeName.toLowerCase() == 'a' ) {
			var addy = anch.href;
			if (addy.substr(0,27) == "http://travellingbytuba.com") { addy = addy.replace("http://travellingbytuba.com","");}
			if (addy == "/") { addy = "/home/";}
			addy = (addy.length > 45 ? addy.toString().substring(0,45)+"..." : addy);
			if (addy.substr(0,7) == "mailto:") { addy = '';}	
			if (addy.substr(0,7) == "/images") { addy = '';}
			var access = ( anch.accessKey ? ' <span>['+anch.accessKey+']</span> ' : '' );
		} else {
			addy = anch.firstChild.nodeValue;
		}
		this.tip.innerHTML = "<p>"+anch.getAttribute('tip')+"<em>"+access+addy+"</em></p>";
		if ( parseInt(document.documentElement.clientWidth+document.documentElement.scrollLeft) < parseInt(this.tip.offsetWidth+lt) ) {
			this.tip.style.left = parseInt(lt-(this.tip.offsetWidth+10))+'px';
		} else {
			this.tip.style.left = lt+'px';
		}
		if ( parseInt(document.documentElement.clientHeight+document.documentElement.scrollTop) < parseInt(this.tip.offsetHeight+tp) ) {
			this.tip.style.top = parseInt(tp-(this.tip.offsetHeight+10))+'px';
		} else {
			this.tip.style.top = tp+'px';
		}
		this.tip.style.visibility = 'visible';
		this.tip.style.opacity = '.1';
		this.tipFade(10);
	},
	tipFade: function(opac) {
		var passed = parseInt(opac);
		var newOpac = parseInt(passed+10);
		if ( newOpac < 80 ) {
			this.tip.style.opacity = '.'+newOpac;
			this.tip.style.filter = "alpha(opacity:"+newOpac+")";
			opacityID = window.setTimeout("sweetTitles.tipFade('"+newOpac+"')",20);
		}
		else { 
			this.tip.style.opacity = '.80';
			this.tip.style.filter = "alpha(opacity:80)";
		}
	}
};
function pageLoader() {
	sweetTitles.init();
}

window.onload=function(){
pageLoader();
}
/*-----------------------------------------------------------------------------*/
// End of Sweet Titles
/*-----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------*/
// Start of F.A.T.
/*-----------------------------------------------------------------------------*/
// @name      The Fade Anything Technique
// @namespace http://www.axentric.com/aside/fat/
// @version   1.0-RC1
// @author    Adam Michela

var Fat = {
	make_hex : function (r,g,b) 
	{
		r = r.toString(16); if (r.length == 1) r = '0' + r;
		g = g.toString(16); if (g.length == 1) g = '0' + g;
		b = b.toString(16); if (b.length == 1) b = '0' + b;
		return "#" + r + g + b;
	},
	fade_all : function ()
	{
		var a = document.getElementsByTagName("*");
		for (var i = 0; i < a.length; i++) 
		{
			var o = a[i];
			var r = /fade-?(\w{3,6})?/.exec(o.className);
			if (r)
			{
				if (!r[1]) r[1] = "";
				if (o.id) Fat.fade_element(o.id,null,null,"#"+r[1]);
			}
		}
	},
	fade_element : function (id, fps, duration, from, to) 
	{
		if (!fps) fps = 30;
		if (!duration) duration = 3000;
		if (!from || from=="#") from = "#FFFF33";
		if (!to) to = this.get_bgcolor(id);
		
		var frames = Math.round(fps * (duration / 1000));
		var interval = duration / frames;
		var delay = interval;
		var frame = 0;
		
		if (from.length < 7) from += from.substr(1,3);
		if (to.length < 7) to += to.substr(1,3);
		
		var rf = parseInt(from.substr(1,2),16);
		var gf = parseInt(from.substr(3,2),16);
		var bf = parseInt(from.substr(5,2),16);
		var rt = parseInt(to.substr(1,2),16);
		var gt = parseInt(to.substr(3,2),16);
		var bt = parseInt(to.substr(5,2),16);
		
		var r,g,b,h;
		while (frame < frames)
		{
			r = Math.floor(rf * ((frames-frame)/frames) + rt * (frame/frames));
			g = Math.floor(gf * ((frames-frame)/frames) + gt * (frame/frames));
			b = Math.floor(bf * ((frames-frame)/frames) + bt * (frame/frames));
			h = this.make_hex(r,g,b);
		
			setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')", delay);

			frame++;
			delay = interval * frame; 
		}
		setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')", delay);
	},
	set_bgcolor : function (id, c)
	{
		var o = document.getElementById(id);
		o.style.backgroundColor = c;
	},
	get_bgcolor : function (id)
	{
		var o = document.getElementById(id);
		while(o)
		{
			var c;
			if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color");
			if (o.currentStyle) c = o.currentStyle.backgroundColor;
			if ((c != "" && c != "transparent") || o.tagName == "BODY") { break; }
			o = o.parentNode;
		}
		if (c == undefined || c == "" || c == "transparent") c = "#FFFFFF";
		var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
		if (rgb) c = this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));
		return c;
	}
}
/*-----------------------------------------------------------------------------*/
// End of F.A.T.
/*-----------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------
 *  Smooth Scroll Anywhere
 *
/*--------------------------------------------------------------------------*/
function ss_fixAllLinks() {
 // Get a list of all links in the page
 var allLinks = document.getElementsByTagName('a');
 // Walk through the list
 for (var i=0;i<allLinks.length;i++) {
   var lnk = allLinks[i];
   if ((lnk.href && lnk.href.indexOf('#') != -1) &&  
       ( (lnk.pathname == location.pathname) ||
   ('/'+lnk.pathname == location.pathname) ) &&  
       (lnk.search == location.search)) {
     // If the link is internal to the page (begins in #)
     // then attach the smoothScroll function as an onclick
     // event handler
     ss_addEvent(lnk,'click',smoothScroll);
   }
 }
}

function smoothScroll(e) {
 // This is an event handler; get the clicked on element,
 // in a cross-browser fashion
 if (window.event) {
   target = window.event.srcElement;
 } else if (e) {
   target = e.target;
 } else return;
 
 // Make sure that the target is an element, not a text node
 // within an element
 if (target.nodeType == 3) {
   target = target.parentNode;
 }
 
 // Paranoia; check this is an A tag
 while (target.nodeName.toLowerCase() != 'a') {
	target = target.parentNode;
	}
 
 // Find the <a name> tag corresponding to this href
 // First strip off the hash (first character)
 anchor = target.hash.substr(1);
 // Now loop all A tags until we find one with that name
 var allLinks = document.getElementsByTagName('a');
 var destinationLink = null;
 for (var i=0;i<allLinks.length;i++) {
   var lnk = allLinks[i];
   if (lnk.name && (lnk.name == anchor)) {
     destinationLink = lnk;
     break;
   }
 }
 
 // If we didn't find a destination, give up and let the browser do
 // its thing
 if (!destinationLink) return true;
 
 // Find the destination's position
 var destx = destinationLink.offsetLeft;  
 var desty = destinationLink.offsetTop;
 var thisNode = destinationLink;
 while (thisNode.offsetParent &&  
       (thisNode.offsetParent != document.body)) {
   thisNode = thisNode.offsetParent;
   destx += thisNode.offsetLeft;
   desty += thisNode.offsetTop;
 }
 
 // Stop any current scrolling
 clearInterval(ss_INTERVAL);
 
 cypos = ss_getCurrentYPos();
 
 ss_stepsize = parseInt((desty-cypos)/ss_STEPS);
 ss_INTERVAL = setInterval('ss_scrollWindow('+cypos+','+desty+',"'+anchor+'")',75);
 
 // And stop the actual click happening
 if (window.event) {
   window.event.cancelBubble = true;
   window.event.returnValue = false;
 }
 if (e && e.preventDefault && e.stopPropagation) {
   e.preventDefault();
   e.stopPropagation();
 }
}

 var idx = 0;
  function ss_scrollWindow(srcy,desty,anchor) {
    window.scrollTo(0,     srcy+Math.round(Math.sin(((idx++)/ss_STEPS)*0.5*Math.PI)*(desty-srcy)));
	if (idx == ss_STEPS) {
		window.scrollTo(0,desty);
		clearInterval(ss_INTERVAL);
		location.hash = anchor;
		idx = 0;
	}
  }

function ss_getCurrentYPos() {
 if (document.body && document.body.scrollTop)
   return document.body.scrollTop;
 if (document.documentElement && document.documentElement.scrollTop)
   return document.documentElement.scrollTop;
 if (window.pageYOffset)
   return window.pageYOffset;
 return 0;
}

function ss_addEvent(elm, evType, fn, useCapture)
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla
// By Scott Andrew
{
 if (elm.addEventListener){
   elm.addEventListener(evType, fn, useCapture);
   return true;
 } else if (elm.attachEvent){
   var r = elm.attachEvent("on"+evType, fn);
   return r;
 }
}  

var ss_INTERVAL;
var ss_STEPS = 25;

ss_addEvent(window,"load",ss_fixAllLinks);









function geo()
	{
		if (!document.getElementsByTagName) // Check for browser support
			{
				return false;
			}
		var map = rot13init(); 
		var tooltip_js_on = '';
		var tooltip_js_off = '';
		var links = document.getElementsByTagName('a'); // Get all anchors
		
		function geo_decode(anchor)
			{ // function to recompose the orginal address
				var href = anchor.getAttribute('href');
				var address = href.replace(/.*mail\/([a-z0-9._%-]+)\+([a-z0-9._%-]+)\+([a-z.]+)/i, '$1' + '@' + '$2' + '.' + '$3');
				var linktext = anchor.innerHTML; // IE Fix
				if (href != address)
					{
						var rot13 = 1;
						anchor.setAttribute('href','mailto:' + (rot13 ? str_rot13(address,map) : address)+"?subject=From the Travelling by Tuba Web Site"); // Add mailto link	
						anchor.innerHTML = linktext; // IE Fix
					}
			}
	
		for (var l = 0 ; l < links.length ; l++)
			{ // Loop through the anchors
				
				if (links[l].href.search("/mail/") !== -1) {
					
				links[l].onclick = function()
					{ // Encode links when clicked
						geo_decode(this);
					}
				links[l].onmouseover = function()
					{ // Display tooltip when links are hovered
						geo_decode(this); // Encode links when hovered (so that the address appears correctly in the browser's status bar)
							
					}
				}
			}
	}


function rot13init() {
	var map = new Array();
	var s = "abcdefghijklmnopqrstuvwxyz";
	for (var i = 0 ; i < s.length ; i++)
		map[s.charAt(i)] = s.charAt((i+13)%26);
	for (var i = 0 ; i < s.length ; i++)
		map[s.charAt(i).toUpperCase()] = s.charAt((i+13)%26).toUpperCase();
	return map;
}

function str_rot13(a,map) {
	var s = "";
	for (var i = 0 ; i < a.length ; i++) {
		var b = a.charAt(i);
		s += (b>='A' && b<='Z' || b>='a' && b<='z' ? map[b] : b);
	}
	return s;
}

/*------------------------------------------------------------
 *						END OF CODE
/*-----------------------------------------------------------*/
document.write("<style>#miniBasket { filter:alpha(opacity=80);-moz-opacity:.80;opacity:.80;-moz-border-radius:5px;} #nav li ul { filter:alpha(opacity=95);-moz-opacity:.95;opacity:.95;} body div#toolTip { -moz-border-radius:5px; } html {overflow-y: scroll;}</style>");