window.dhtmlHistory={isIE:false,isOpera:false,isSafari:false,isKonquerer:false,isGecko:false,debugMode:false,hideStyles:'left:-1000px;top:-1000px;width:1px;height:1px;border:0;position:absolute;',showStyles:'border:0;margin:0;padding:0;',create:function(a){if(typeof a!=="undefined"){if(a.debugMode){this.debugMode=a.debugMode}if(a.toJSON){this.toJSON=a.toJSON}if(a.fromJSON){this.fromJSON=a.fromJSON}}var b=this;if(a&&a.baseTitle){if(a.baseTitle.indexOf("@@@")<0&&this.debugMode){throw new Error("Programmer error: options.baseTitle must contain the replacement parameter"+" '@@@' to be useful.");}this.baseTitle=a.baseTitle}var c=navigator.userAgent.toLowerCase();var d=navigator.platform.toLowerCase();var e=navigator.vendor||"";if(e==="KDE"){this.isKonqueror=true;this.isSupported=false}else if(typeof window.opera!=="undefined"){this.isOpera=true;this.isSupported=true}else if(typeof document.all!=="undefined"){this.isIE=true;this.isSupported=true}else if(e.indexOf("Apple Computer, Inc.")>-1){this.isSafari=true;this.isSupported=(d.indexOf("mac")>-1)}else if(c.indexOf("gecko")!=-1){this.isGecko=true;this.isSupported=true}if(this.isSafari){this.createSafari()}else if(this.isOpera){this.createOpera()}var f=this.getCurrentLocation();this.currentLocation=f;if(this.isIE){if(a&&a.blankURL){var u=a.blankURL;this.blankURL=(u.indexOf("?")!=u.length-1?u+"?":u)}this.createIE(f);this.ignoreLocationChange=true}else{this.ignoreLocationChange=false;this.fireOnNewListener=true}var g=function(){b.checkLocation()};setInterval(g,100)},initialize:function(a){this.originalTitle=document.title;if(this.isIE){this.fireOnNewListener=true}if(a){this.addListener(a)}},addListener:function(a){this.listener=a;if(this.fireOnNewListener){this.fireHistoryEvent(this.currentLocation);this.fireOnNewListener=false}},changeTitle:function(a){var b=(a&&a.newTitle?this.baseTitle.replace('@@@',a.newTitle):this.originalTitle);if(document.title==b){return}document.title=b;if(this.isIE){this.iframe.contentWindow.document.title=b}if(!this.isIE&&!this.isOpera){var c=decodeURIComponent(document.location.hash);if(c!=""){var d=encodeURIComponent(this.removeHash(c));document.location.hash=d}else{}}},
add:function(a,b){
	var c=this;
	var d=encodeURIComponent(this.removeHash(a));
	if(this.isSafari){
		this.currentLocation=d;window.location.hash=d;this.putSafariState(d);this.changeTitle(b)
	}else{
		var f=function(){
			if(c.currentWaitTime>0){
				c.currentWaitTime=c.currentWaitTime-c.waitTime
			}
			if(document.getElementById(d)&&c.debugMode){
				var e="Exception: History locations can not have the same value as _any_ IDs that might be in the document,"+" due to a bug in IE; please ask the developer to choose a history location that does not match any HTML"+" IDs in this document. The following ID is already taken and cannot be a location: "+a;
				throw new Error(e);
			}
			c.ignoreLocationChange=true;
			c.ieAtomicLocationChange=true;
			c.currentLocation=d;
			window.location.hash=d;
			if(c.isIE){
				c.iframe.src=c.blankURL+d}
				c.ieAtomicLocationChange=false;
				c.changeTitle(b)
		};
		window.setTimeout(f,this.currentWaitTime);
		this.currentWaitTime=this.currentWaitTime+this.waitTime
	}
},getVersion:function(){return this.VERSIONNUMBER},PAGELOADEDSTRING:"DhtmlHistory_pageLoaded",VERSIONNUMBER:"0.8",baseTitle:"@@@",originalTitle:null,blankURL:"blank.html?",listener:null,waitTime:200,currentWaitTime:0,currentLocation:null,iframe:null,safariHistoryStartPoint:null,safariStack:null,safariLength:null,ignoreLocationChange:null,fireOnNewListener:null,ieAtomicLocationChange:null,addEventListener:function(o,e,l){if(o.addEventListener){o.addEventListener(e,l,false)}else if(o.attachEvent){o.attachEvent('on'+e,function(){l(window.event)})}},createIE:function(a){this.waitTime=400;var b=(this.debugMode?'width: 800px;height:80px;border:1px solid black;':this.hideStyles);var c="rshHistoryFrame";var d='<iframe frameborder="0" id="'+c+'" style="'+b+'" src="'+this.blankURL+a+'"></iframe>';document.write(d);this.iframe=document.getElementById(c)},createOpera:function(){this.waitTime=400;var a='<img src="javascript:location.href=\'javascript:dhtmlHistory.checkLocation();\';" style="'+this.hideStyles+'" />';document.write(a)},createSafari:function(){var a="rshSafariForm";var b="rshSafariStack";var c="rshSafariLength";var d=this.debugMode?this.showStyles:this.hideStyles;var e=(this.debugMode?'width: 800px;height:80px;border:1px solid black;':this.hideStyles);var f=(this.debugMode?'width:800px;height:20px;border:1px solid black;margin:0;padding:0;':this.hideStyles);var g='<form id="'+a+'" style="'+d+'">'+'<textarea style="'+e+'" id="'+b+'">[]</textarea>'+'<input type="text" style="'+f+'" id="'+c+'" value=""/>'+'</form>';document.write(g);this.safariStack=document.getElementById(b);this.safariLength=document.getElementById(c);this.safariHistoryStartPoint=history.length},getCurrentLocation:function(){var r=(this.isSafari?this.getSafariState():this.getCurrentHash());return r},getCurrentHash:function(){var r=window.location.href;var i=r.indexOf("#");return(i>=0?r.substr(i+1):"")},getSafariStack:function(){var r=this.safariStack.value;return this.fromJSON(r)},getSafariState:function(){var a=this.getSafariStack();var b=a[history.length-this.safariHistoryStartPoint-1];return b},putSafariState:function(a){var b=this.getSafariStack();b[history.length-this.safariHistoryStartPoint]=a;this.safariStack.value=this.toJSON(b)},fireHistoryEvent:function(a){var b=decodeURIComponent(a);this.listener.call(null,b)},checkLocation:function(){if(!this.isIE&&this.ignoreLocationChange){this.ignoreLocationChange=false;return}if(!this.isIE&&this.ieAtomicLocationChange){return}var a=this.getCurrentLocation();if(a==this.currentLocation){return}this.ieAtomicLocationChange=true;if(this.isIE&&this.getIframeHash()!=a){this.iframe.src=this.blankURL+a}else if(this.isIE){return}this.currentLocation=a;this.ieAtomicLocationChange=false;this.fireHistoryEvent(a)},getIframeHash:function(){var a=this.iframe.contentWindow.document;var b=String(a.location.search);if(b.length==1&&b.charAt(0)=="?"){b=""}else if(b.length>=2&&b.charAt(0)=="?"){b=b.substring(1)}return b},removeHash:function(a){var r;if(a===null||a===undefined){r=null}else if(a===""){r=""}else if(a.length==1&&a.charAt(0)=="#"){r=""}else if(a.length>1&&a.charAt(0)=="#"){r=a.substring(1)}else{r=a}return r},iframeLoaded:function(a){if(this.ignoreLocationChange){this.ignoreLocationChange=false;return}var b=String(a.search);if(b.length==1&&b.charAt(0)=="?"){b=""}else if(b.length>=2&&b.charAt(0)=="?"){b=b.substring(1)}window.location.hash=b;this.fireHistoryEvent(b)}};
