
$(document).ready(function() { geo(); 
doExternalLink(); Fat.fade_all(); var ap_clearID = setInterval( ap_registerPlayers, 100 ); document.getElementById('footerTools').innerHTML = '<li><a href="#top" title="Go to the top of this page" class="top">Top of Page</a></li><li id="printPage"><a href="javascript:window.print()" title="Print this Page" class="print">Print this Page</a></li><li id="favorites">'+"<a href=\"javascript:bookmarksite('"+document.title+"', '"+location.href+"')\" title=\"Add this page to your favourites\" class=\"favorites\">Add to Favourites</a></li>"+'<li><a href="/home/" class="home" title="Visit the Jennifer Irvine Home Page" accesskey="1">Home</a></li>'; 



var FO ={movie:"/media/swf/playerNew.swf",width:"290", height:"24", majorversion:"6", build:"40", flashvars:"", quality:"high", wmode:"transparent", menu:"false", idy:"audioplayer2"}; UFO.create(FO, "audio1"); }); 

Array.prototype.count = function() { return this.length; }; var ap_instances = new Array(); function ap_stopAll(playerID) { for(var i = 0;i<ap_instances.length;i++) { try
{ if(ap_instances[i] != playerID) { document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 1); }
else
{ document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 0); }}
catch( errorObject ) { 
}}
}
function ap_registerPlayers() { var objectID; var objectTags = document.getElementsByTagName("object"); for(var i=0;i<objectTags.length;i++) { objectID = objectTags[i].id; if(objectID.indexOf("audioplayer") == 0) { ap_instances[i] = objectID.substring(11, objectID.length); }}}




function bookmarksite(title,url) { if (window.sidebar) 
{ 
window.sidebar.addPanel(title, url, ""); }
else if(window.opera && window.print) { 
var elem = document.createElement('a'); elem.setAttribute('href',url); elem.setAttribute('title',title); elem.setAttribute('rel','sidebar'); elem.click(); } 
else if(document.all) { 
window.external.AddFavorite(url, title); }}






function clearInputs() { if (!document.getElementsByTagName) { return false; }
var all_inputs = document.getElementsByTagName('input'); for (var i=0;i<all_inputs.length;i++) { var current_input = all_inputs[i]; if (current_input.getAttribute('type') == 'text' && current_input.getAttribute('value') != '') { current_input.default_text = current_input.getAttribute('value'); current_input.onfocus = function() { if (this.getAttribute('value') == this.default_text) { this.setAttribute('value',''); };}}}}




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 = "(opens in new window)"; }
else
{ links[i].title = links[i].title + " (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; }}}}





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




function addEvent( 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]; }}





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; };}};}(); addEvent(window,'unload',EventCache.flush); 







var UFO = { req: ["movie", "width", "height", "majorversion", "build","idy"], 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); 
}}, 
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 + "}")); 
_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 { 
var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); }
catch(e) { try { var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); UFO.fv = [6, 0]; _a.AllowScriptAccess = "always"; 
}
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"); 
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); _obj.setAttribute("id", _fo.idy); 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" id="' + _fo.idy + '"><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); }






var sweetTitles = { xCord : 0, 
yCord : 0, 
tipElements : ['a','abbr','acronym'], 
obj : Object, 
tip : Object, 
active : 0, 
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'; addEvent(document,'mousemove',this.updateXY); if ( document.captureEvents ) { document.captureEvents(Event.MOUSEMOVE); }
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++ ) { if ( current[j].title != "") { addEvent(current[j],'mouseover',this.tipOver); addEvent(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() { sweetTitles.obj = this; tID = window.setTimeout("sweetTitles.tipShow()",500)
}, 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' ) { addy = (anch.href.length > 42 ? anch.href.toString().substring(0,42)+"..." : anch.href); var access = ( anch.accessKey ? ' <span>Access key: ['+anch.accessKey+']</span> ' : '' ); } else { addy = anch.firstChild.nodeValue; }
if (addy.indexOf(window.location.hostname) == -1) { this.tip.innerHTML = "<p>"+anch.getAttribute('tip')+"<em>"+access+addy+"</em></p>"; }
else { this.tip.innerHTML = "<p>"+anch.getAttribute('tip')+"<em>"+access+"</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'; }
if (((anch.getAttribute('tip') || access) != "") || (addy.indexOf(window.location.hostname) == -1)) { 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.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(); }






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; }}



function geo() { if (!document.getElementsByTagName) 
{ return false; }
var map = rot13init(); 
var tooltip_js_on = ''; var tooltip_js_off = ''; var links = document.getElementsByTagName('a'); 
function geo_decode(anchor) { 
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; 
if (href != address) { var rot13 = 1; anchor.setAttribute('href','mailto:' + (rot13 ? str_rot13(address,map) : address)+"?subject=From the Jennifer Irvine Web Site"); 
anchor.innerHTML = linktext; 
}}
for (var l = 0 ; l < links.length ; l++) { 
if (links[l].href.search("/mail/") !== -1) { 
links[l].onclick = function() { 
geo_decode(this); }
links[l].onmouseover = function() { 
geo_decode(this); 
}}}}
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; }

Scroller = { 
speed:10, 
gy: function (d) { gy = d.offsetTop
if (d.offsetParent) while (d = d.offsetParent) gy += d.offsetTop
return gy
}, 
scrollTop: function (){ body=document.body
d=document.documentElement
if (body && body.scrollTop) return body.scrollTop
if (d && d.scrollTop) return d.scrollTop
if (window.pageYOffset) return window.pageYOffset
return 0
}, 

add: function(event, body, d) { if (event.addEventListener) return event.addEventListener(body, d,false)
if (event.attachEvent) return event.attachEvent('on'+body, d)
}, 
end: function(e){ if (window.event) { window.event.cancelBubble = true
window.event.returnValue = false
return; }
if (e.preventDefault && e.stopPropagation) { e.preventDefault()
e.stopPropagation()
}}, 
scroll: function(d){ i = window.innerHeight || document.documentElement.clientHeight; h=document.body.scrollHeight; a = Scroller.scrollTop()
if(d>a)
if(h-d>i)
a+=Math.ceil((d-a)/Scroller.speed)
else
a+=Math.ceil((d-a-(h-d))/Scroller.speed)
else
a = a+(d-a)/Scroller.speed; window.scrollTo(0,a)
if(a==d || Scroller.offsetTop==a)clearInterval(Scroller.interval)
Scroller.offsetTop=a
}, 
init: function(){ Scroller.add(window,'load', Scroller.render)
}, 
render: function(){ a = document.getElementsByTagName('a'); Scroller.end(this); window.onscroll
for (i=0;i<a.length;i++) { l = a[i]; if(l.href && l.href.indexOf('#top') != -1 && ((l.pathname==location.pathname) || ('/'+l.pathname==location.pathname)) ){ Scroller.add(l,'click',Scroller.end)
l.onclick = function(){ Scroller.end(this); l=this.hash.substr(1); a = document.getElementsByTagName('a'); for (i=0;i<a.length;i++) { if(a[i].name == l){ clearInterval(Scroller.interval); Scroller.interval=setInterval('Scroller.scroll('+Scroller.gy(a[i])+')',10); }}}}}}}
Scroller.init(); 


function decrement(unit) { 
if (!document.getElementById && !document.getElementById(unit)) return; var amount = parseInt(document.getElementById(unit).lastChild.nodeValue,10); amount--; if (amount == -1) { 
switch(unit) { 
case "seconds":
if (!blastOff()) { decrement("minutes"); amount = 59; } else { amount = 0; }
break; case "minutes":
decrement("hours"); amount = 59; break; case "hours":
decrement("days"); amount = 23; break; case "days":
amount = 0; break; }}
if (amount < 10 ) { amount = "0"+amount; }
document.getElementById(unit).lastChild.nodeValue = amount; }
function blastOff() { var units = ["days","minutes","hours","seconds"]; for (var i=0; i<units.length; i++) { if (!document.getElementById(units[i])) return false; var amount = parseInt(document.getElementById(units[i]).lastChild.nodeValue,10); if (amount>0) return false; }
window.location.href="countdown.html"; return true; }
function countdown() { window.setInterval("decrement('seconds')",1000); }


document.write("<style>html {overflow-y: scroll;} #languageBar {filter:alpha(opacity=80);opacity: 0.8;-moz-opacity:0.8;}</style>");
