/* ******************************
For a complete, uncompressed version of these libraries, 
send an e-mail to alan -at- alanbellows.com.
****************************** */

var IE="MSIE";var MOZILLA="Gecko";var SAFARI="Safari";var OPERA="Opera";var Browser=new BrowserAccess();function BrowserAccess () { this.name="";this.ver=0;this.preload;{ var appVer=navigator.appVersion;var agent=navigator.userAgent;var start;if (window.opera) { this.name=OPERA;this.ver=opera.version();}else if (appVer.indexOf("MSIE") > -1 && document.all) { start=appVer.indexOf("MSIE ")+5;this.name=IE;this.ver=parseFloat(appVer.substring(start, appVer.indexOf(";", start)));}else if (appVer.indexOf("Safari") > -1) { start=appVer.indexOf("AppleWebKit/")+12;this.name=SAFARI;this.ver=parseFloat(appVer.substring(start, appVer.indexOf(" (", start)));}else { start=agent.indexOf("rv:")+3;this.name=MOZILLA;this.ver=parseFloat(agent.substring(start, agent.indexOf(")", start)));}}}BrowserAccess.prototype.preloadImage=function (url) { if (this.preload == null) this.preload=new Array();this.preload[this.preload.length]=new Image();this.preload[this.preload.length-1].src=url;};BrowserAccess.prototype.mailLink=function (beforeAt, afterAt) { window.location="mailto:"+beforeAt+"@"+afterAt;return false;};BrowserAccess.prototype.fixPng=function () { var e;var sizing=arguments[arguments.length-1];var p1="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='";if (this.name == IE && this.ver < 7) { for (var i=0;i < arguments.length-1;i++) { e=DOM.get(arguments[i]);if (e) { if (e.nodeName.toLowerCase() == 'img' && e.src.indexOf(".png") > -1) { var parent=e.parentNode;parent.removeChild(e);parent.style.backgroundImage='none';parent.style.filter=p1+e.src+"',sizingMethod='"+sizing+"')";}else { var bg=e.getCSSValue("background-image");var src=bg.substring(5, bg.length-2);e.style.backgroundImage='none';e.style.filter=p1+src+"',sizingMethod='"+sizing+"')";}}}}};BrowserAccess.prototype.getInnerHeight=function () { var height=0;if (window.innerHeight) { height=window.innerHeight;}else if (document.body && document.body.clientHeight) { height=document.body.clientHeight;}else if (document.documentElement && document.documentElement.clientHeight) { height=document.documentElement.clientHeight;}else { height=0;}return height;};var DOM=new DOMAccess();function DOMAccess () { this.ext=new Array();this.body=null;this.counter=0;}DOMAccess.prototype.getBody=function () { if (this.body == null)this.body=this.extend((document.compatMode && document.compatMode.toLowerCase() != "backcompat") ? document.documentElement : (document.body || null));return this.body;};DOMAccess.prototype.get=function (eID) { var e;if (typeof(eID) == "string") { if (this.ext[eID]) { e=this.ext[eID];}else { if (document.getElementById) e=document.getElementById(eID);else if(document.all) e=document.all[eID];}return this.extend(e);}else { if (eID) { return this.extend(eID);}}};DOMAccess.prototype.extend=function (e) { if (e && ! e.isExtended) { e.isExtended=true;e.addClass=E_addClass;e.removeClass=E_removeClass;e.hide=E_hide;e.show=E_show;e.toggleVisibility=E_toggle;e.getCSSValue=E_getCSSValue;if (! e.id) e.id=e.nodeName+(this.counter++);this.ext[e.id]=e;}return e;};function E_addClass (className) { if (this.className) this.className += " "+className;else this.className=className;}function E_removeClass (className) { if (this.className) this.className=this.className.replace(className, '');}function E_hide (noBlock) { this.style.visibility="hidden";if (noBlock) { this.style.display="none";}}function E_show (block) { this.style.visibility="visible";if (block) this.style.display="block";}function E_toggle (blocking) { if (this.style.visibility == "hidden") { this.show(blocking);}else { this.hide(blocking);}}function E_getCSSValue (p) { var value;if (Browser.name == MOZILLA || Browser.name == SAFARI) { var cs=document.defaultView.getComputedStyle(this,"");if (cs != null) value=cs.getPropertyValue(p);}else { while (p.indexOf("-") > -1 && p.length >= p.indexOf("-")+2) { p=p.substring(0, p.indexOf("-"))+p.charAt(p.indexOf("-")+1).toUpperCase()+p.substr(p.indexOf("-")+2);}if (eval("this.currentStyle && this.currentStyle."+p)){ value=eval("this.currentStyle."+p);}else { value=null;}}if (p != null) { var lcProp=p.toLowerCase();if ( lcProp == ("top") || lcProp == ("right") || lcProp == ("left") || lcProp == ("bottom") || lcProp.indexOf("width") > -1 || lcProp.indexOf("height") > -1 || lcProp.indexOf("padding") > -1 || lcProp.indexOf("margin") > -1 ) { value=parseInt(value);if (isNaN(value)) value=0;}}else { return "";}return value;}function navButton (name) { this.name=name;this.e=DOM.get("button_"+name);this.page=DOM.get("page_"+name);this.timeouts=new Array();this.stop=function () { for (var i=0;i < this.timeouts.length;i++) { clearTimeout(this.timeouts[i]);}this.timeouts=new Array();};this.rollover=function (off) { this.stop();var p1="DOM.get('"+ this.e.id +"').style.backgroundColor='";var colors=new Array( p1+"ffffff'", p1+"f5fbff'", p1+"eaf6ff'", p1+"e0f2ff'", p1+"d6edff'", p1+"cbe9ff'", p1+"c1e4ff'" );if (off) colors=colors.reverse();runSeries(colors, 30, this);};this.activate=function () { for (var i=0;i < allButtons.length;i++) { allButtons[i].page.style.display="none";}this.page.style.display="block";};allButtons[allButtons.length]=this;}function runSeries (list, interval, obj, delay) { if (!delay) delay=0;for (var i=0;i < list.length;i++) { var item=list[i];obj.timeouts[obj.timeouts.length]=setTimeout(item, (interval * i)+delay);}}function init () { if (Browser.name == IE && Browser.ver < 7) { DOM.get("buttons").style.width="741px";Browser.fixPng( DOM.get("logo"), DOM.get("button_resume"), DOM.get("button_websites"), DOM.get("button_graphics"), DOM.get("button_photos"), DOM.get("button_contact"), "image" );Browser.fixPng( DOM.get("bar1"), DOM.get("bar2"), "scale" );}}
