if(!self.PHP_ERROR_WRITTEN){
	function PHPShowErrors(force){
		var nodes = document.getElementsByTagName("blockquote");
		var value = (force || nodes[0] && nodes[0].style.display != "block") ? "block" : "none";
		for(var i=0;i<nodes.length;i++){
			nodes[i].style.display = value;
		}
		
		document.cookie = "PHP_ERROR_COOKIE=" + escape(value == "block" ? 1 : 0) + ";";
	}

	function PHPFormatErrors(){
		var nodes = document.getElementsByTagName("blockquote");
                for(var i=0;i<nodes.length;i++){
			if(nodes[i].getAttribute("done")) continue;
                        if(nodes[i].innerHTML) nodes[i].innerHTML = nodes[i].innerHTML.replace(/(#\d)/g, "<br />$1");

			nodes[i].setAttribute("done", 1);
                }
	}
	
	function PHPShowErrorsCookie(){
		return document.cookie.match(/PHP_ERROR_COOKIE=1/);
	}
	
	function PHPInstallMO(o){
		o.onmouseover = function(){
			if(this.tagName == "IMG") this.src = this.src.replace("/_off/", "_on");
			if(this.tagName == "DIV") this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"http://www.helderhosting.nl/PHPErrors/error_on.png\")";
		}
		o.onmouseover();
		
		o.onmouseout = function(){
			if(this.tagName == "IMG") this.src = this.src.replace("/_on/", "_off");
			if(this.tagName == "DIV") this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"http://www.helderhosting.nl/PHPErrors/error_off.png\")";
		}
	}
	
	document.write("<img src='http://www.helderhosting.nl/PHPErrors/error_off.png' style='cursor:hand;position:absolute;left:2px;top:2px;z-index:1000;display:expression(\"none\")' onclick='PHPShowErrors()' onmouseover='PHPInstallMO(this)'/><div style='cursor:hand;position:absolute;left:2px;top:2px;z-index:1000;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"http://www.helderhosting.nl/PHPErrors/error_off.png\");width:51px;height:58px;display:none;display:expression(\"block\")' onclick='PHPShowErrors()' onmouseover='PHPInstallMO(this)'></div>");
	PHP_ERROR_WRITTEN = true;
}

if(PHPShowErrorsCookie()) PHPShowErrors(true);
PHPFormatErrors();

