/* Output from Intronics GZip Javascript Streamer v1.01
	Several Javascript source files are included in this single compressed stream.
	Modules Included in Output (in order): DOM, alerts, stats  */

// DOM.js

var eDebug = '';
function Throw(object) {
	window.setTimeout(function() {throw object;}, 0.01);
}
function $() {
	var result = [];
	for(i = 0; i < arguments.length; i++) {
		result.push(arguments[i] && arguments[i].parentNode ? arguments[i] : document.getElementById('' + arguments[i]));
	}
	return result.length > 1 ? result : result[0];
}
function $Tag(tagName,parent) {
	return ($(parent) || document).getElementsByTagName(tagName);
}
if (document.defaultView && document.defaultView.getComputedStyle) {
	eDebug = 'Style Model: Computed';
	function StyleSet(item) {
		var styles = document.defaultView.getComputedStyle(item, '');
		var re = /([A-Z])/g;
		this.get = function(k) {
			return styles.getPropertyValue(k.replace(re, '-$1').toLowerCase());
		}
	}
} else {
	eDebug = 'Style Model: Current';
	function StyleSet(item) {
		var styles = item.currentStyle ? item.currentStyle : item.style;
		this.get = function(key) {
			return styles[key];
		}
	}
}
StyleSet.prototype.getInt = function(key) {
	var v = parseInt(this.get(key));
	return isNaN(v) ? 0 : v;
}
function hasClass(item, classname) {
	return item.className ? item.className.search(new RegExp("\\b" + classname + "\\b")) > -1 : false;
}
function addClass(item, classname) {
	if (hasClass(item, classname)) return false;
	item.className += ' ' + classname;
	return true;
}
function removeClass(item, classname) {
	if (!hasClass(item, classname)) return false;
	item.className = item.className.replace(new RegExp("\\s?" + classname), '');
	return true;
}
function replaceClass(item, oldClass, newClass) {
	if (!hasClass(item, classname)) return false;
	item.className = item.className.replace(hasClassCache[oldClass], newClass);
	return true;
}
function applyStyles(item, theStyles) {
	var att;
	for (att in theStyles) {
		try {
			item.style[att] = theStyles[att];
		} catch (problem) {
			try {
				var att2 = att.replace(/[A-Z]/, '-$0').toLowerCase();
				item.style.setProperty(att2, theStyles[att], null);
			} catch (furtherProblem) {
				alert(problem + '\n\n' + furtherProblem + '\n\n' + item.nodeName + '[' + att2 + '] = ' + theStyles[att] + ' Failed\n\n' + item.namespaceURI);
			}
		}
	}
}
function Create() {
	var result = [];
	for(var i = 0; i < arguments.length; i++) {
		result.push(document.createElement(arguments[i]));
	}
	return result.length > 1 ? result : result[0];
}
var testElement = Create('div');
if (navigator.userAgent.search(/Safari/) > -1) {
	document.createElement = function(t) {
		return document.createElementNS(document.documentElement.namespaceURI, t);
	}
}
function Navigate(item, path) {
	var path = path.split('');
	for(var i = 0; i < path.length; i++) {
		switch (path[i]) {
			case '-':
				item = item.parentNode;
				break;
			case '>':
				do {
					item = item.nextSibling;
				} while (item.nodeType != 1);
				break;
			case '<':
				do {
					item = item.previousSibling;
				} while (item.nodeType != 1);
				break;
			case '+':
				item = item.firstChild;
				while (item.nodeType != 1) item = item.nextSibling;
				break;
		}
	}
	return item;
}
function Collect(item, pathSet) {
	var result = [];
	var pathSet = pathSet.split(' ');
	for (var i = 0; i < pathSet.length; i++) {
		result.push(item = Navigate(item, pathSet[i]));
	}
	return result;
}
if (testElement.getBoundingClientRect) {
	eDebug += '\nBox Model: W3C New';
	function BBox(item) {
		var box = item.getBoundingClientRect();
		var t = document.documentElement && document.documentElement.scrollTop ? document.documentElement : document.body;
		this.w = (this.r = box.right + t.scrollLeft) - (this.l = box.left + t.scrollLeft);
		this.h = (this.b = box.bottom + t.scrollTop) - (this.t = box.top + t.scrollTop);
	}
} else if (document.getBoxObjectFor) {
	eDebug += '\nBox Model: XUL';
	function BBox(item) {
		var box = document.getBoxObjectFor(item);
		var s = new StyleSet(item);
		var dl = s.getInt('borderLeftWidth');
		var dt = s.getInt('borderTopWidth');
		var dr = s.getInt('borderRightWidth') + s.getInt('paddingLeft') + s.getInt('paddingRight');
		var db = s.getInt('borderBottomWidth') + s.getInt('paddingTop') + s.getInt('paddingBottom');
		this.r = (this.l = box.x - dl - s.getInt('marginLeft')) + box.width;
		this.b = (this.t = box.y - dt - s.getInt('marginTop')) + box.height;
		this.w = +box.width - dl - dr;
		this.h = +box.height - dt - db;
	}
} else if (!testElement.getBoundingClientRect) {
	eDebug += '\nBox Model: DOM';
	function BBox(item) {
		item = $(item);			var s = new StyleSet(item);
			this.b = (this.t = item.offsetTop - s.getInt('borderTopWidth')) + item.clientHeight;
			this.r = (this.l = item.offsetLeft - s.getInt('borderLeftWidth')) + item.clientWidth;
			this.r -= s.getInt('paddingLeft') + s.getInt('paddingRight');
			this.b -= s.getInt('paddingTop') + s.getInt('paddingBottom');
		this.w = item.clientWidth;
		if (BBox.TDhack && item.nodeName.toLowerCase() == 'td') {
			item = item.offsetParent;
			this.b = (this.t = item.offsetTop) + item.clientHeight;
			this.l += item.offsetLeft;
			this.r += item.offsetLeft;
		}
		this.h = item.clientHeight;
		var pt, pl, pb, pr;
		var op = item;
		while (op = op.offsetParent) {
			if (pt = op.offsetTop) {
				this.t = (this.t < 0) ? pt : this.t + pt;
				this.b += pt;
			}
			if (pl = op.offsetLeft) {
				this.l = (this.l < 0) ? pl : this.l + pl;
				this.r += pl;
			}
			if (op.offsetParent == document.documentElement) break;
			pb = pt + op.offsetHeight;
			if (this.b > pb) this.b = pb;
			pr = pl + op.offsetWidth;
			if (this.r > pr) this.r = pr;
		}
	}
	BBox.TDhack = navigator.userAgent.search(/safari/i) > -1;
} else {
	eDebug += '\nBox Model: IE';
	document.BBox = function(item) {
		var box = item.getBoundingClientRect();
		var t = document.documentElement && document.documentElement.scrollTop ? document.documentElement : document.body;
		this.w = (this.r = box.right + t.scrollLeft) - (this.l = box.left + t.scrollLeft);
		this.h = (this.b = box.bottom + t.scrollTop) - (this.t = box.top + t.scrollTop);
	}
}
function Box(l,t,r,b) {
	this.l = l;
	this.r = r;
	this.w = r > l ? r - l : l - r;
	this.t = t;
	this.b = b;
	this.h = b > t ? b - t : t - b;
}
function Point(event) {
	this.pageX = event.pageX;
	this.pageY = event.pageY;
}
Point.prototype.distanceTo = function(point) {
	with (Math) return sqrt(pow(this.pageX - point.pageX, 2) + pow(this.pageY - point.pageY, 2));
}
Box.prototype.apply = BBox.prototype.apply = function(item) {
	item.style.left = +this.l + 'px';
	item.style.width = +this.w + 'px';
	item.style.top = +this.t + 'px';
	item.style.height = +this.h + 'px';
}
BBox.prototype.inspect = function() {
	return this.w + 'w • ' + this.h + 'h @ ' + this.l + ', ' + this.t;
}
Box.prototype.expand = BBox.prototype.expand = function(p) {
	this.l -= p;
	this.t -= p;
	this.r += p;
	this.b += p;
	return this;
}
Box.prototype.contains = BBox.prototype.contains = function(pt) {
	return ((pt.pageX >= this.l) && (pt.pageX <= this.r) && (pt.pageY >= this.t) && (pt.pageY <= this.b));
}
function Min() {
	var v = arguments[0];
	for(var i = 1; i < arguments.length; i++) {
		if (arguments[i] < v) v = arguments[i];
	}
	return v;
}
function Max() {
	var v = arguments[0];
	for(var i = 1; i < arguments.length; i++) {
		if (arguments[i] > v) v = arguments[i];
	}
	return v;
}
function DocumentBounds() {
	var dW, dH;
	var el = document.documentElement ? document.documentElement : document.body;
	var dsH = el.scrollHeight;
	var doH = el.offsetHeight;
	var dcH = el.clientHeight;
	switch (dH = Max(dsH, doH, dcH, self.innerHeight)) {
		case dsH: dW = el.scrollWidth; break;
		case doH: dW = el.offsetWidth; break;
		case dcH: dW = el.clientWidth; break;
		default: dW = self.innerWidth;
	}
	return {w: dW, h: dH};
}
function RGB(color) {
	if (arguments.length == 3) {
		this.r = +arguments[0];
		this.g = +arguments[1];
		this.b = +arguments[2];
	} else if(color.search('rgb') == 0) {
		var rgb = color.match(/rgb\((\d+), ?(\d+), ?(\d+)\)/);
		this.r = +rgb[1];
		this.g = +rgb[2];
		this.b = +rgb[3];
	} else {
		var rgb = color.toLowerCase().match(/^#?([\da-f]{3}|[\da-f]{6})$/);
		if (rgb[1].length == 3) {
			rgb = rgb[1].replace(/([\da-f])/g, '$1$1');
		} else rgb = rgb[1];
		this.r = +('0x' + rgb.slice(0,2));
		this.g = +('0x' + rgb.slice(2,4));
		this.b = +('0x' + rgb.slice(4,6));
	}
}
RGB.prototype.toString = function() {
	return '#' +
		('00' + this.r.toString(16)).slice(-2) +
		('00' + this.g.toString(16)).slice(-2) +
		('00' + this.b.toString(16)).slice(-2);
}
if (testElement.addEventListener) {
	eDebug += '\nEvent Model: DOM v2';
	var BindEvent = function(callback, item, evt, capture) {
		item.addEventListener(evt, callback, capture);
	}
	var DetachEvent = function(callback, item, evt, capture) {
		item.removeEventListener(evt, callback, capture);
	}
} else if (!testElement.attachEvent) {
	eDebug += '\nEvent Model: Traditional';
	var BindEvent = function(callback,item,evt) {
		item['on' + evt] = callback;
	}
	var DetachEvent = function(callback,item,evt) {
		item['on' + evt] = null;
	}
} else {
	eDebug += '\nEvent Model: IE';
	var BindEvent = function(callback, item, evt) {
		item.attachEvent('on' + evt, callback);
	}
	var DetachEvent = function(callback, item, evt) {
		item.detachEvent('on' + evt, callback);
	}
}
if (typeof testElement.attachEvent == 'undefined') {
	eDebug += '\nEvent Passing: Arguments (W3C)';
	var FixEvent = function(event) {
		if (event.target.nodeType != 3) return event;
		event.target = event.target.parentNode;
		return event;
	}
	var CancelEvent = function(event) {
		if (event.type) {
			event.stopPropagation();
			event.preventDefault();
		}
		return false;
	}
} else {
	eDebug += '\nEvent Passing: Window (IE)';
	var FixEvent = function() {
		var event = window.event;
		event.pageX = event.clientX + document.body.scrollLeft;
		event.pageY = event.clientY + document.body.scrollTop;
		if (!event.target) event.target = event.srcElement;
		return event;
	}
	var CancelEvent = function(event) {
		event.cancelBubble = true;
		return event.returnValue = false;
	}
}
function getRoot() {
	var e = $('rootElement');
	return e ? e : document.body;
}
function sortChildren(element, keyFunction, callback, skip) {
	if (!element.firstChild) return;
	var c = [];
	var cn = element.childNodes;
	var p = element.parentNode;
	var ns = element.nextSibling;
	p.removeChild(element);
	var cl = cn.length;
	while (cl--) {
		var ci = cn[cl];
		if (ci.nodeType == 1) {
			ci._curPos = cl;
			ci._sortKey = keyFunction(ci);
			c.push(ci);
		} else element.removeChild(ci);
	}
	if (typeof skip == 'number') while (skip--) element.appendChild(c.shift());
	c.sort((typeof callback == 'function') ? callback :
		function(a,b) {return a._sortKey == b._sortKey ? a._curPos - b._curPos : (a._sortKey > b._sortKey ? 1 : -1)} );
	var cl = c.length;
	i = 0;
	while (i < cl) element.appendChild(c[i++]);
	p.insertBefore(element, ns);
}
BindEvent(function(event) {
	with (FixEvent(event)) {
		if (112 == (keyCode ? keyCode : which)) {
			alert(eDebug);
			return CancelEvent(event);
		}
	}
}, document, 'keydown', true);

// alerts.js
// TODO: Rewrite the pageAlert function to take advantage of features in DOM.js
function pageAlert(title, message, url, imgURL) {
	if (!imgURL) var imgURL = '_img/top_alert.png';
	if (typeof document.createElement == 'function') {
		var div = document.createElement('div');
		with (div.style) {
			top = '0';
			left = '0';
			right = '0';
			var isIE = (typeof filter != 'undefined');
			if (isIE) width = '100%';
			if (isIE) filter = 'alpha(opacity:95)';
			else mozOpacity = opacity = "0.95";
			textAlign = 'left';
			margin = '3px';
			padding = '7px 58px';
			border = '1px solid black';
			background = "#ffb url('" + imgURL + "') 4px 50% no-repeat";
			marginBottom = '8px';
			overflow = 'hidden';
		}
		var img = document.createElement('img');
		img.src = '_img/top_close.png';
		with (img.style) {
			display = 'block';
			position = 'absolute';
			img.setAttribute('style.float', 'right');
			img.style['float'] = 'right';
			top = '9px';
			right = '9px';
			cursor = 'pointer';
		}
		div.appendChild(img);
		var h3 = document.createElement('h4');
		with (h3.style) {
			margin = "0";
			padding = "0 0 2px 0";
		}
		var text = document.createTextNode(title);
		h3.appendChild(text);
		div.appendChild(h3);
		text = document.createTextNode(message + " ");
		div.appendChild(text);
		if (url) {
			var link = document.createElement('a');
			link.href = url;
			text = document.createTextNode('>>');
			link.appendChild(text);
			div.appendChild(link);
		}
		var root = document.getElementById('rootElement');
		root.insertBefore(div, root.firstChild);
		img.onclick = function() {root.removeChild(div)};
		return div;
	} else {
		alert(title + "\n\n" + message + (url ? '\n[link unavailable; browser too old]' : ''));
	}
}
function xmlSupported() {
	var r;
	try {
		r = new XMLHttpRequest();
	} catch(tryIE6) {
		try {
			r = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(olderIE) {
			try {
				r = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(failure) {
				return false;
			}
		}
	}
	return true;
}
if (!xmlSupported()) window.onload = function() {
	pageAlert("Some Features are Missing",
		"The program you are using to access this web site does not support a major feature (often called AJAX) that we employ to make the site easier to use.  If you are using AOL to access this site, just run Internet Explorer or FireFox (recommended) when you are signed in to AOL and you will gain access to all these additional conveniences.  If you are already running a stand-alone web browser, you may need to download a new one.  Click the arrow to download our favorite, Mozila Firefox:",
		'http://www.mozilla.com/firefox');
}
if (typeof Rewrite != 'undefined') {
	function DRpageAlert(xml) {
		var title = xml.title ? xml.title : xml.getAttribute('title');
		var url = xml.href ? xml.href : xml.getAttribute('href');
		var message = xml.firstChild.nodeValue;
		pageAlert(title, message, url);
	}
	Rewrite.registerHandler('alert', DRpageAlert);
}

// stats.js
// http://www.phpmyvisites.net/
function pmv_plugMoz(pmv_pl) {
	if (pmv_tm.indexOf(pmv_pl) != -1 && (navigator.mimeTypes[pmv_pl].enabledPlugin != null))
		return '1';
	return '0';
}
function pmv_plugIE(pmv_plug){
	pmv_find = false;
	document.write('<SCR' + 'IPT LANGUAGE=VBScript>\n on error resume next \n pmv_find = IsObject(CreateObject("' + pmv_plug + '")) </SCR' + 'IPT>\n');
	if (pmv_find) return '1';
	return '0';
}
var pmv_jav='0'; if(navigator.javaEnabled()) pmv_jav='1';
var pmv_agent = navigator.userAgent.toLowerCase();
var pmv_moz = (navigator.appName.indexOf("Netscape") != -1);
var pmv_ie= (pmv_agent.indexOf("msie") != -1);
var pmv_win = ((pmv_agent.indexOf("win") != -1) || (pmv_agent.indexOf("32bit") != -1));
var pmv_cookie=(navigator.cookieEnabled)? '1' : '0';
if ((typeof (navigator.cookieEnabled) =="undefined") && (pmv_cookie == '0')) { 
	document.cookie="pmv_testcookie"
	pmv_cookie=(document.cookie.indexOf("pmv_testcookie")!=-1)? '1' : '0';
}
var pmv_dir = '0'; 
var pmv_fla = '0'; 
var pmv_pdf = '0'; 
var pmv_qt = '0'; 
var pmv_rea = '0'; 
var pmv_wma = '0'; 
if (!pmv_win || pmv_moz){
	var pmv_tm = '';
	for (var i=0; i < navigator.mimeTypes.length; i++)
		pmv_tm += navigator.mimeTypes[i].type.toLowerCase();
	pmv_dir = pmv_plugMoz("application/x-director");
	pmv_fla = pmv_plugMoz("application/x-shockwave-flash");
	pmv_pdf = pmv_plugMoz("application/pdf");
	pmv_qt = pmv_plugMoz("video/quicktime");
	pmv_rea = pmv_plugMoz("audio/x-pn-realaudio-plugin");
	pmv_wma = pmv_plugMoz("application/x-mplayer2");
} else if (pmv_win && pmv_ie){
	pmv_dir = pmv_plugIE("SWCtl.SWCtl.1");
	pmv_fla = pmv_plugIE("ShockwaveFlash.ShockwaveFlash.1");
	if (pmv_plugIE("PDF.PdfCtrl.1") == '1' || pmv_plugIE('PDF.PdfCtrl.5') == '1' || pmv_plugIE('PDF.PdfCtrl.6') == '1') 
		pmv_pdf = '1';
	pmv_qt = pmv_plugIE("Quicktime.Quicktime");
	pmv_rea = pmv_plugIE("rmocx.RealPlayer G2 Control.1");
	pmv_wma = pmv_plugIE("wmplayer.ocx");
}
	
var pmv_do = document;
var pmv_rtu = '';
try {pmv_rtu = top.pmv_do.referrer;} catch(e) {
	if (parent) {
		if (parent.pmv_getReferer) {
			try {pmv_rtu = parent.pmv_getReferer;} catch(E3) {pmv_rtu = '';}
		}
		else  {
			try {pmv_rtu = parent.document.referrer;} catch(E) {
				try {pmv_rtu = document.referrer;} catch(E2) {pmv_rtu = '';}
			}
		}
		parent.pmv_getReferer = document.location.href;
	}
	else {
		try {pmv_rtu = document.referrer;} catch(E3) {pmv_rtu = '';}
	}
}
function pmv_getUrlStat(pmv_urlPmv, pmv_site, pmv_urlDoc, pmv_pname, pmv_typeClick, pmv_vars)
{
	var pmv_getvars='';
	if (pmv_vars) {
		for (var i in pmv_vars){
			if (!Array.prototype[i]){
				pmv_getvars = pmv_getvars + '&a_vars['+ escape(i) + ']' + "=" + escape(pmv_vars[i]);
			}
		}
	}
	
	var pmv_da = new Date();
	var pmv_src = pmv_urlPmv;
	pmv_src += '?url='+escape(pmv_urlDoc)+'&pagename='+escape(pmv_pname)+pmv_getvars;
	pmv_src += '&id='+pmv_site+'&res='+screen.width+'x'+screen.height+'&col='+screen.colorDepth;
	pmv_src += '&h='+pmv_da.getHours()+'&m='+pmv_da.getMinutes()+'&s='+pmv_da.getSeconds();
	pmv_src += '&flash='+pmv_fla+'&director='+pmv_dir+'&quicktime='+pmv_qt+'&realplayer='+pmv_rea;
	pmv_src += '&pdf='+pmv_pdf+'&windowsmedia='+pmv_wma+'&java='+pmv_jav+'&cookie='+pmv_cookie;
	if ((pmv_typeClick) && (pmv_typeClick != "")) pmv_src += '&type='+escape(pmv_typeClick);
	pmv_src += '&ref='+escape(pmv_rtu);
	
	return pmv_src;
}
function pmv_click (pmv_urlPmv, pmv_site, pmv_urlDoc, pmv_pname, pmv_typeClick, pmv_vars)
{
	var pmv_src = pmv_getUrlStat(pmv_urlPmv, pmv_site, pmv_urlDoc, pmv_pname, pmv_typeClick, pmv_vars);
	var pmv_img = new Image();
	pmv_img.src = pmv_src;
}
function pmv_log(pmv_urlPmv, pmv_site, pmv_pname, pmv_vars)
{
	var pmv_urlCur = pmv_do.location.href;
	var pmv_pos = pmv_urlCur.indexOf("//");
	if (pmv_pos > 0) {
		pmv_urlCur = pmv_urlCur.substr(pmv_pos);
	}
	var r;
	try {
		r = new XMLHttpRequest();
	} catch(tryIE6) {
		try {
			r = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(olderIE) {
			try {
				r = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(failure) {
				return true;
			}
		}
	}
	var pmv_src = pmv_getUrlStat(pmv_urlPmv, pmv_site, pmv_urlCur, pmv_pname, "", pmv_vars);
	r.onreadystatechange = function() {
	};
	r.open("GET", pmv_src, true);
	r.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	r.send(null);
}
var phpmyvisitesURL = "/_inc/stats.php";
var phpmyvisitesSite = 1;
var pagename = document.title;
var a_vars = Array();
BindEvent(function() {
	pmv_log(phpmyvisitesURL, phpmyvisitesSite, pagename, a_vars);
}, window, 'load');

