// -- building scripts, script version 1
// -- cacheJavascript(); has been run

// -- Attempting to load:/includes/jslib/contentBuffer/contentBuffer.4.js

// ------------------------------------------------------------------------------------------------------------
/*
Documentation: http://barney.wallst.com/wsodwiki/index.php/Content_Buffer

ContentBuffer()
generic data buffering object

usage:

var c = new ContentBuffer();
c.load({
	url: "data.asp",
	method: "get",
	onload: a,
	debug: true
});

function a (connection) {
	alert("x:" + connection.getResult());
};

*/
// ------------------------------------------------------------------------------------------------------------

if (typeof Controller == "undefined")
{
	if (typeof dbg != "function")
	{
		var dbg = function () {};
	};
}
else
{
	Controller.require("/includes/jslib/debug.js");
};

function ContentBuffer ()
{
	this.connections = [];
	this.connectionsMax = 100;
	this.connectionsActive = 0;
	this.connectionsPending = [];
	this.debug = false;
	this.context = window;
	this.connectionId = 0;

	if (arguments.length && typeof arguments[0] == "object")
	{
		this.context = arguments[0];
	};
};


// ------------------------------------------------------------------------------------------------------------
// load(contentPackge)
/*

contentPackge:
	.url: page to load in the hidden buffer
	.onload: function reference that gets called on a successful buffer load [optional]
	.onerror: function reference that gets called on an unsuccessful buffer load [optional]
	.method: get|post [optional]
	.postdata: synonym for .data [deprecated]
	.data: {name: value} list [optional]
	.[arbitrary]: optional arbitrary parameters that get passed to .callback; allows for state management with an asynch request

*/
// ------------------------------------------------------------------------------------------------------------
ContentBuffer.prototype.load = function (contentPackage)
{
	if (typeof Controller == "undefined")
	{
		//dbg("Missing Dependency", "Controller.js", "ff0000");
	};


	// data validation
	try
	{
		contentPackage.method = contentPackage.method.toLowerCase();

		if (contentPackage.method != "get" && contentPackage.method != "post")
		{
			contentPackage.method = "get";
		};
	}
	catch (e)
	{
		contentPackage.method = "get";
	};

	if (contentPackage.postdata && !contentPackage.data)
	{
		contentPackage.data = contentPackage.postdata;
	}
	else if (!contentPackage.data)
	{
		contentPackage.data = {};
	};

	// enable cache flushing
	if (document.location.search.match(/\.\.nocache\.\.=on/i))
	{
		contentPackage.data["..nocache.."] = "on";
	};

	// pass debugchartsrv
	var dbgChartSrv = document.location.search.match(/\.\.debugchartsrv\.\.=([a-zA-Z]+)/i);
	if (dbgChartSrv) {
		contentPackage.data["..debugchartsrv.."] = dbgChartSrv[1];
	}

	return new Connection(this, this.connectionId++, contentPackage);
};

// ------------------------------------------------------------------------------------------------------------
// loadXMLHTTP()
// ------------------------------------------------------------------------------------------------------------
ContentBuffer.prototype._loadXMLHTTP = function (connection) {

    var thisConnection = connection;
    var contentPackage = thisConnection.contentPackage;

	function stateMonitor () {
		thisBuffer._monitorConnectionState(thisConnection);
	};

	this.connectionsActive++;

    /*
	if (!this.connections.length) {
		if (!this.initConnection()) {
			if (this.debug || contentPackage.debug) {
				dbg("ContentBuffer initialization error", "unsupported", "red");
			};
			return;
		};
	};
    */

	var dataPackage = null;
	var thisBuffer = this;

	thisConnection.active = true;
	//contentPackage.connectionId = this.connectionId++; // necessary?

	if (typeof contentPackage.contentType == "string") {
		contentPackage.data["..contenttype.."] = contentPackage.contentType;
	};

	// uniquely identify contentbuffer requests
	contentPackage.data["..requester.."] = "ContentBuffer";

	if (contentPackage.method == "post") {

		dataPackage = "";

		for (var i in contentPackage.data) {
			dataPackage += (dataPackage.length ? "&" : "") + this.encode(i) + "=" + this.encode(contentPackage.data[i]);
		};

		if (this.debug || contentPackage.debug) {
			dbg("ContentBuffer post data", dataPackage);
		};

	} else {
		for (var i in contentPackage.data) {
			contentPackage.url += (contentPackage.url.indexOf("?") == -1 ? "?" : "&") + this.encode(i) + "=" + this.encode(contentPackage.data[i]);
		};
	};

	if (this.debug || contentPackage.debug) {
		dbg("ContentBuffer loading [" + thisConnection.connectionId + "]", contentPackage.url + " [" + contentPackage.method + "]");
	};

	if (this.debug || contentPackage.debug) {

		var debugUrl = contentPackage.url;

		if (dataPackage) {
			debugUrl += (debugUrl.indexOf("?") == -1 ? "?" : "&") + dataPackage;
		};

		debugUrl = debugUrl.replace(/\&?\.\.[^\=\&]*\.\.\=[^\&]*/g, "");

		if (debugUrl.indexOf("/") != 0 && debugUrl.indexOf("http") != 0) {
			var path = String(window.location).replace(/https*:\/\//, "");
			debugUrl = path.substr(path.indexOf("/"), path.lastIndexOf("/") + 1 - path.indexOf("/")) + debugUrl;
		}

		dbg("ContentBuffer URL", "<a href=\"" + debugUrl + "\"  target=\"_blank\">" + debugUrl + "</a>");
	};

	try {
		// netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
    	thisConnection.c.open(contentPackage.method.toUpperCase(), contentPackage.url, true);
		thisConnection.c.onreadystatechange = stateMonitor;
	} catch (e) {
		// alert(e);
	};

	if (contentPackage.method == "post") {
		thisConnection.c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	};

	//thisConnection.contentPackage = contentPackage;
	//dbg(thisConnection.c.send(), "trying connectionId");

	thisConnection.c.send(dataPackage);

	//return thisConnection;
};

// ------------------------------------------------------------------------------------------------------------
// monitorConnectionState()
// ------------------------------------------------------------------------------------------------------------
ContentBuffer.prototype._monitorConnectionState = function (connection) {

	try {

		if (connection.c.readyState == 4) {

			if (connection.c.status != 200) {

				if (this.debug || connection.contentPackage.debug) {
					dbg("ContentBuffer load error", connection.c.status, "red");
					dbg("ContentBuffer result [" + connection.connectionId + "]", connection.c.responseText);
				};

				try {
					var result = connection.c.responseText;
				} catch (e) {
					var result = null;
				};

				connection.contentPackage.result = result;

				if (typeof connection.contentPackage.onerror == "function") {
					connection.contentPackage.onerror.apply(connection.context, [connection]);
				};

				return;
			};

			var responseType = connection.contentPackage.contentType || connection.c.getResponseHeader("Content-Type");
			var result = null;

			if (responseType == "text/html" || responseType == "text/plain") {
				result = connection.c.responseText;
			} else if (responseType == "text/xml") {
				result = connection.c.responseXML;
			} else if (responseType == "text/javascript") {
				try {
					result = connection.c.responseText;

					if (!connection.contentPackage.preventEval) {

                       connection.context.__evalBuffer = function() {
                           eval(result);
                       }

                       connection.context.__evalBuffer();

					};

				} catch (e) {
					if (this.debug || connection.contentPackage.debug) {
						dbg("ContentBuffer javascript eval error", e.message, "red");
						if (typeof dbgObject != "undefined"){ dbgObject(e); }
					};
				};
			};

			connection.contentPackage.result = result;

			if (this.debug || connection.contentPackage.debug) {
				// dbg("ContentBuffer result [" + connection.contentPackage.connectionId + "]", result.replace(/\</g, "&lt;").replace(/\>/g, "&gt;"));
			};

			if (typeof connection.contentPackage.onload == "function") {
				connection.contentPackage.onload.apply(connection.context, [connection]);
			};

			this.finishConnection(connection);
		};

	} catch (e) {
		if (this.debug || connection.contentPackage.debug) {
			dbg("state monitoring error", e.message, "red");
			if (typeof dbgObject != "undefined"){ dbgObject(e); }
		};

		this.finishConnection(connection);
	};
};

// ------------------------------------------------------------------------------------------------------------
// isActive
// ------------------------------------------------------------------------------------------------------------
ContentBuffer.prototype.isActive = function() {
	for (var i=0; i<this.connections.length; i++) {
		if (this.connections[i].active) {
			return true;
		}
	}

	return false;
}

// ------------------------------------------------------------------------------------------------------------
// abortRequests()
// ------------------------------------------------------------------------------------------------------------
ContentBuffer.prototype.abortRequests = function () {
	for (var i = 0; i < this.connections.length; i++) {
		this.connections[i].abort();
	};
}

// ------------------------------------------------------------------------------------------------------------
// abortRequests()
// ------------------------------------------------------------------------------------------------------------
ContentBuffer.prototype.abortRequests = function () {
	for (var i = 0; i < this.connections.length; i++) {
		this.connections[i].abort();
	};
}

// ------------------------------------------------------------------------------------------------------------
// encode()
// ------------------------------------------------------------------------------------------------------------
ContentBuffer.prototype.encode = function(str) {
	//return escape(str);

	/* escape() doesn't account for the + symbol, which Serializer() sometimes includes in its Base64 encoding.  encodeURIComponent() includes everything escape() does, and includes the + symbol */
	return encodeURIComponent(str);
}

ContentBuffer.prototype.finishConnection = function(connection)
{
	if(connection.active)
	{
		this.connectionsActive--;
		connection.active = false;
	}

	if(this.connectionsPending.length)
	{
		this._loadXMLHTTP(this.connectionsPending.shift());
	}

	for (var x=0; x < this.connections.length; x++){
		if (connection === this.connections[x]){
			this.connections.splice(x,1);
			break;
		}
	}
}


// ------------------------------------------------------------------------------------------------------------
// Connection class
// ------------------------------------------------------------------------------------------------------------
function Connection(contentBuffer, id, contentPackage) {
	this.active = false;
	this.parent = contentBuffer;
	this.connectionId = id;
	this.contentPackage = contentPackage;
	this.context = contentPackage.context || this.parent.context;
	this._init();
};

Connection.prototype._init = function() {
    var c = false;

	try {
		c = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			c = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (f) {
			c = false;
		};
	};

	if (!c && typeof XMLHttpRequest != "undefined") {
		c = new XMLHttpRequest();
	};

	if (c) {
		this.c = c;
	} else {
	   dbg("Content Buffer initialization error.", "Not supported by this browser", "red");
	};

    if (this.parent.connectionsActive < this.parent.connectionsMax) {
        this.parent.connections.push(this);
        this.parent._loadXMLHTTP(this);
    } else {
        dbg("queuing request");
        this.parent.connectionsPending.push(this);
    };
};

Connection.prototype.getResult = function() {
    return this.contentPackage.result;
};

Connection.prototype.status = function() {
	return (this.c.readyState == 4 && this.c.status == 200);
};

Connection.prototype.abort = function() {
	if (this.active) {
		try {
			this.c.onreadystatechange = function() {};
			this.c.abort();
		} catch (e) {
			dbg("connection abort failed", e, "red");
		};

		this.parent.finishConnection(this);
	};
};
// -- Loaded:/includes/jslib/contentBuffer/contentBuffer.4.js

// -- Attempting to load:/includes/jslib/parseSelector/parseSelector.1.5.beta.js
function ParseSelector() {
	
	this.reParseSelector = /^([^#.>`]*)(#|\.|\>|\`)(.+)$/;
	this.reListSplitter = /\s*\,\s*/;
	
}

ParseSelector.prototype.getElements = function(sSelector, oParentNode) {
	var listSelectors = sSelector.split(this.reListSplitter);
	var listReturn = [];
	for(var i = 0; i < listSelectors.length; i++){
		listReturn = listReturn.concat(this.doParse(listSelectors[i], oParentNode));
	}
	
	return listReturn;
};

ParseSelector.prototype.doParse = function(sSelector, oParentNode, sMode) {
	sSelector = sSelector.replace(" ", "`");
	var selector = sSelector.match(this.reParseSelector);
	var node, listNodes, listSubNodes, subselector, i, limit;
	var listReturn = [];
	
	if(selector == null){ selector = [sSelector, sSelector] };
	if(selector[1] == ""){ selector[1] = "*" };
	if(sMode == null){ sMode = "`" };
	if(oParentNode == null){
		oParentNode = document;
	};

	switch(selector[2]){
		case "#":
			subselector = selector[3].match(this.reParseSelector);
			if(subselector == null){ subselector = [null, selector[3]] };
			node = 	document.getElementById(subselector[1]);
			if(node == null || (selector[1] != "*" && !this.matchNodeNames(node, selector[1]))){
				return listReturn;
			};
			if(subselector.length == 2){
				listReturn.push(node);
				return listReturn;	
			};
			return this.doParse(subselector[3], node, subselector[2]);
		case ".":
			if(sMode != ">"){
				listNodes = this.getElementsByTagName(oParentNode, selector[1]);
			} else {
				listNodes = oParentNode.childNodes;
			};
			
			for(i = 0, limit = listNodes.length; i < limit; i++){
				node = listNodes[i];
				if(node.nodeType != 1){
					continue;	
				};
				subselector = selector[3].match(this.reParseSelector);
				if(subselector != null){

					if(node.className == null || node.className.match("(\\s|^)" + subselector[1] + "(\\s|$)") == null){
						continue;
					};
					listSubNodes = this.doParse(subselector[3], node, subselector[2]);
					listReturn = listReturn.concat(listSubNodes);	
				} else if(node.className != null && node.className.match("(\\s|^)" + selector[3] + "(\\s|$)") != null){
					listReturn.push(node);
				};
			};
			return listReturn;
		case ">":
			if(sMode != ">"){
				listNodes = this.getElementsByTagName(oParentNode, selector[1]);
			} else {
				listNodes = oParentNode.childNodes;
			};
							
			for(i = 0, limit = listNodes.length; i < limit; i++){
				node = listNodes[i];
				
				if(node.nodeType != 1){
					continue;	
				};
				
				if(!this.matchNodeNames(node, selector[1])){
					continue;
				};
				listSubNodes = this.doParse(selector[3], node, ">");
				listReturn = listReturn.concat(listSubNodes);	
			};
			return listReturn;
		case "`":
			listNodes = this.getElementsByTagName(oParentNode, selector[1]);
			for(i = 0, limit = listNodes.length; i < limit; i++){
				node = listNodes[i];
				listSubNodes = this.doParse(selector[3], node, "`");
				listReturn = listReturn.concat(listSubNodes);	
			};
			return listReturn;
		default:
			if(sMode != ">"){
				listNodes = this.getElementsByTagName(oParentNode, selector[1]);
			} else {
				listNodes = oParentNode.childNodes;
			};

			for(i = 0, limit = listNodes.length; i < limit; i++){
				node = listNodes[i];
				if(node.nodeType != 1){
					continue;	
				};
				if(!this.matchNodeNames(node, selector[1])){
					continue;
				};
				listReturn.push(node);
			};
			return listReturn;
	};
};


ParseSelector.prototype.getElementsByTagName = function(oParentNode, sTagName) {
	/*	
		IE5.x does not support document.getElementsByTagName("*")
		therefore we're falling back to element.all 
	*/
		
	if(sTagName == "*" && oParentNode.all != null){
		return oParentNode.all;
	}
	return oParentNode.getElementsByTagName(sTagName);
	
};

ParseSelector.prototype.matchNodeNames = function(node, sMatch) {
	if(sMatch == "*"){
		return true;
	}
	return node.nodeName.toLowerCase().replace("html:", "") == sMatch.toLowerCase();
};

ParseSelector = new ParseSelector();

function parseSelector(sSelector, oParentNode) {
	return ParseSelector.getElements(sSelector, oParentNode);
}

document.getElementsBySelector = parseSelector;

// -- Loaded:/includes/jslib/parseSelector/parseSelector.1.5.beta.js

// -- Attempting to load:/includes/jslib/eventFunctions.js

// ---------------------------------------------------------------------------
// Cross-browser event functions. Created by Scott Andrew, tweaked by WSOD.
// ---------------------------------------------------------------------------

var EVENT = {
	ONLOAD: "load",
	ONUNLOAD: "unload",
	ONMOUSEOVER: "mouseover",
	ONMOUSEOUT: "mouseout",
	ONMOUSEMOVE: "mousemove",
	ONCLICK: "click",
	ONCHANGE: "change",
	ONSUBMIT: "submit",
	ONBLUR: "blur",
	ONFOCUS: "focus",
	ONCHANGE: "change"
};

function getSrcElement() {
	//allows elements to be passed directly into event handlers
	if(arguments[0].tagName) {
		return arguments[0];
	} else {
		var event = arguments[0];
		return event.srcElement || event.currentTarget || window;
	};
};

/*
function getSrcElement () {
	if (false && arguments[0].getAttribute) {
	// extension to allow for passing elements directly into event handlers 
		return arguments[0];
	} else {
		var event = arguments[0];
		return (event.srcElement) ? event.srcElement : event.currentTarget;
	}
}*/

function addEvent(obj, eventType, afunction, isCapture) {
	// W3C DOM
	if (obj.addEventListener) {
	   obj.addEventListener(eventType, afunction, isCapture);
	   return true;
	}
	// Internet Explorer
	else if (obj.attachEvent) {
	   return obj.attachEvent("on" + eventType, afunction);
	}
	else return false;
}

function removeEvent(obj, eventType, afunction, isCapture) {
	if (obj.removeEventListener) {
	   obj.removeEventListener(eventType, afunction, isCapture);
	   return true;
	}
	else if (obj.detachEvent) {
	   return obj.detachEvent("on" + eventType, afunction);
	}
	else return false;
}

function removeTextSelect() {
	if (!document.onselectstart) {
		document.onselectstart = function() {
			cancelEvent();
			return false;
		}
	}
}
function enableTextSelect() {
	if (document.onselectstart) {
		document.onselectstart = null;
	}
}

function cancelEvent(event){
	if (event) {
		if (event.preventDefault){event.preventDefault()};
		if (event.stopPropagation){event.stopPropagation()};
		event.cancelBubble = true;
		event.returnValue = false;
	}
	
	return false;
}
// -- Loaded:/includes/jslib/eventFunctions.js

// -- Attempting to load:/includes/jslib/debug.js
// ------------------------------------------------------------------------
// debugging window
//
// usage: dbg("comment")		// print a comment
//        dbg("x", x)			// print a variable
//        dbg("x", x, "green")	// select a color
//
//
// 2006-03-27 changes are afoot - BT
// 2006-01-13 added better non-debug handling for dbgObject; it used to recurse, regardless of whether the debugger was on or not
// 2005-11-28 bug fix - AW
// 2005-08-05 added dbgAlert() - AW
// 2005-08-04 fixed scrolling (don't autoscroll unless at bottom) -AW
// 2005-11-29 add unescape flag (arg 4) to Debug.dbg  - AH
// ------------------------------------------------------------------------


// need to prevent showdebuginfo from overriding this object if it has already been created
if (typeof(Debug) == "undefined" || (typeof(Debug) == "object" && typeof(Debug.init) != "function")) {
	var Debug = {
		debugWindow: null,
		out: {
			isLoaded: false
		},
		queue: [],
		url: "/includes/showdebuginfo/index.asp"
	};
	
	// ------------------------------------------------------------------------
	// Debug.init()
	// Initializes debugging console and dbg() function.
	// Call this function explicitly, or enable showdebuginfo.
	// ------------------------------------------------------------------------
	Debug.initWindow = function () {
		try{
			this.debugWindow = this.openWindow("");
			
			if (this.debugWindow) {
				
				if (typeof(this.debugWindow._sdb) == "undefined") {
					this.debugWindow = this.openWindow(this.getURL());
				} else {
					this.connect(this.debugWindow._sdb);
				}
	
			};
	
			// reset global function
			dbg = this.dbg;
			dbgObject = this.dbgObject;
			drawObj = this.dbgObject;
			
			
		}catch(e){
		
			dbg = this.doNothing;
			dbgObject = this.doNothing;
			drawObj = this.doNothing;
			//exception sometimes thrown
		}
	};
	
	Debug.connect = function(out) {
		this.out = out;
		this.flushQueue();
	};
	
	Debug.disconnect = function() {
		this.out = {
			isLoaded: null
		};
	};
	
	Debug.openWindow = function(url) {
		var winName = "debugWin" + document.domain.replace(/[^a-z]/ig, "");
		return win = window.open(url, winName, "toolbar=no,scrollbars=yes,width=550,height=700,resizable=yes");
	};
	
	Debug.init = Debug.initWindow;
	
	Debug.initDiv = function () {
		// stub
	};
	
	Debug.initFirefoxExtension = function () {
		// stub
	};
	
	Debug.getURL = function () {
		return this.url;
	};
	
	Debug.setURL = function (url) {
		this.url = url;
	};
	
	
	
	Debug.doNothing = function () {
		return false;
	};
	
	Debug.dbgPad = function (s) {
	
		var p = (arguments.length > 1) ? arguments[1] : 5;
		var pO = "";
		var s = new String(s);
	
		if (s.length < p){
			for (var x = 0; x < p - s.length; x++) {
				pO += "0";
			};
		};
	
		return pO + s;
	};
	
	Debug.dbgObject = function (obj, prefix) {
		
		prefix = prefix || "";
	
		for (var prop in obj) {
			var type = typeof obj[prop] ;
			if (type != "object" && type != "function") {
				Debug.dbg(prefix + prop, obj[prop]);
			} else {
				Debug.dbgObject(obj[prop], prefix + prop + ".")
			}
		}
	};
	
	Debug.dbgAlert = function () {
	
		// example: dbgAlert("symbol",symbol,"type",type,"myIndex",indexPrev);
	
		var out = [];
	
		for (var n, v, x=0; x < arguments.length; x+=2){
	
			n = arguments[x];
			v = arguments[x+1];
	
			out.push((n || n == 0)?n:"");
			out.push((v || v == 0)?' = ' + ((typeof v == "string")?'"' + v + '"':v):'');
			out.push((x != arguments.length - 1)?"\n":"");
	
		}
	
		alert(out.join(""));
	};
	
	
	Debug.dbg = function (n, v, color, escapeFlag) {
		if (!Debug.debugWindow || !Debug.debugWindow.document) {
			Debug.init();
		}
	
		var args = [];
		args.push("text");
		
		for (var i=0; i<arguments.length; i++) {
			args.push(arguments[i]);
		}
		
		Debug.addText.apply(Debug, args);
	
	};
	
	// ------------------------------------------------------------------------
	// Manage debug requests
	// ------------------------------------------------------------------------
	Debug.addRequest = function(params) {
		
		if (parent != window && params.requester == "") {
			params.requester = "Iframe";
		}
		
		this.add("request", params);
	};
	
	
	Debug.addObject = function (params) {
		this.add("object", params);
	};
	
	Debug.addWitObject = function (params) {
		this.add("witObject", params);
	};
	Debug.addWit = Debug.addWitObject;
	
	Debug.addCollection = function (name) {
		this.add("collection", name);
	};
	Debug.addWitCollection = Debug.addCollection;
	
	Debug.writeCollection = function () {
		this.add("writeCollection")
	};
	Debug.writeWitCollection = Debug.writeCollection;
	
	Debug.addNV = function (n, v) {
		this.add("NV", n, v);
	};
	Debug.addWitNV = Debug.addNV;
	
	Debug.addText = function() {
		this.add.apply(this, arguments);
	};
	
	Debug.addConsoleBreak = function() {
		this.add("consoleBreak");
	};
	
	Debug.add = function() {
		if (!this.out.isLoaded || this.queue.length) {
			this.addToQueue.apply(this, arguments);
		} else {
			this.write.apply(this, arguments);
		}
	};
	
	
	// ------------------------------------------------------------------------
	// Request Queueing
	// ------------------------------------------------------------------------
	Debug.addToQueue = function() {
		this.queue.push(arguments);
	};
	
	Debug.flushQueue = function() {
		//var start = new Date().getTime();
		for (var i=0; i<this.queue.length; i++) {
			this.write.apply(this, this.queue[i]);
		}
		this.queue = [];
		//var stop = new Date().getTime();
		//alert("Queue flush took " + (stop-start) + "ms");
	
	};
	
	// ------------------------------------------------------------------------
	// Write
	// ------------------------------------------------------------------------
	Debug.write = function() {
		/*
		var args = [];
		for (var i=1; i<arguments.length; i++) {
			args.push(arguments[i]);
		}
		*/
		var a = arguments;
		
		switch (a[0]) {
			
			case "request" :
				//this.out.addRequest.apply(this.out, args);
				this.out.addRequest(a[1]);
				break;
			
			case "object" :
				//this.out.addWit.apply(this.out, args);
				this.out.addObject(a[1]);
				break;
			
			case "witObject" :
				//this.out.addWit.apply(this.out, args);
				this.out.addWitObject(a[1]);
				break;
				
			case "collection" :
				//this.out.addWitCollection.apply(this.out, args);
				this.out.addCollection(a[1]);
				break;
				
			case "NV" :
				//this.out.addWitNV.apply(this.out, args);
				this.out.addNV(a[1], a[2]);
				break;
			
			case "writeCollection" :
				this.out.writeCollection();
				break;
			
			case "consoleBreak" :
				this.out.addConsoleBreak();
				break;
			
			case "text" : default :
				/* 
				this is moronic, and it's IE's fault
				objects created in another window do not appear to be true js objects
				so, you cannot do function.apply on a function created in another window
				BUT you can call that function and pass it arguments like any other function
				i cannot find another way around this
				*/
				
				//this.out.addText.apply(this.out, args);
				
				switch (a.length) {
				
					case 2 :
						this.out.addText(a[1]);
						break;
						
					case 3 :
						this.out.addText(a[1], a[2]);
						break;
						
					case 4 :
						this.out.addText(a[1], a[2], a[3]);
						break;
						
					case 5 :
						this.out.addText(a[1], a[2], a[3], a[4]);
						break;
						
				}
				break;
				
		}
				
	};
	
	
	
	// ------------------------------------------------------------------------
	// Additional globals for backwards compatibility
	// ------------------------------------------------------------------------
	Debug.drawObj = Debug.dbgObject;
	
	//var drawObj = Debug.dbgObject;
	//var dbgObject = Debug.dbgObject;
	var dbgAlert = Debug.dbgAlert;
	var dbgA = Debug.dbgAlert;
	
	var drawObj = new Function();
	var dbgObject = new Function();
	var dbg = new Function();
	
}// -- Loaded:/includes/jslib/debug.js

// -- Attempting to load:/includes/jslib/domAdditions.js

// --------------------------------------------------------------------------
// domAdditions.js
// DOM extensions + utility functions.
// --------------------------------------------------------------------------

// --------------------------------------------------------------------------
// document.createElement()
// Adds attribute and child parameters.
// --------------------------------------------------------------------------

// check to prevent infinite loop is script is double loaded
if (typeof document._createElement == "undefined")
{
	document._createElement = document.createElement;
};

document.createElement = function (tag, attributes, children)
{
	var element = document._createElement(tag);

	for (var i in attributes)
	{
		if (i == "className" || i == "class")
		{
			element.className = attributes[i];
		}
		else
		{
			element.setAttribute(i, attributes[i]);
		};
	};

	if (arguments.length > 2 && children)
	{
		if (typeof children == "object" && children.constructor == Array)
		{
			for (var i = 0; i < children.length; i++)
			{
				_addChild(element, children[i]);
			};
		}
		else
		{
			_addChild(element, children);
		};
	};

	return element;
};

function _addChild (el, child)
{
	if (typeof child == "object")
	{
		el.appendChild(child);
	}
	else if (typeof child == "string" || typeof child == "number")
	{
		// element.appendChild(document.createTextNode(children));
		el.innerHTML += child;
	};
};

/*
// --------------------------------------------------------------------------
// document.clearChildren()
// Destroy child nodes. It would be nice if this method were prototyped
// onto all HTML elements [element.removeChildren()].
// --------------------------------------------------------------------------
document.clearChildren = function (el)
{
	while (el.childNodes.length)
	{
		el.removeChild(el.firstChild);
	};
};
*/

// --------------------------------------------------------------------------
// $()
// Shorthand.
// --------------------------------------------------------------------------
function $ (id)
{
	return document.getElementById ? document.getElementById(id) : document.all[id];
};

// --------------------------------------------------------------------------
// hitch()
// Associate an object + method, and force the right this context.
// Usage: button.onclick = hitch(Davey, Davey.init);
// --------------------------------------------------------------------------
function hitch (obj, meth)
{
	return function ()
	{
		return typeof meth == "function" ? meth.apply(obj, arguments) : obj[meth].apply(obj, arguments);
	};
};

// --------------------------------------------------------------------------
// getStyle()
// Cross-browser computed style attribute access. This probably wants to be
// attached to document or HTMLElement or something.
// --------------------------------------------------------------------------
function getStyle (el, styleProp)
{
	if (window.getComputedStyle)
	{
		return window.getComputedStyle(el, null).getPropertyValue(styleProp);
	}
	else if (document.defaultView && document.defaultView.getComputedStyle)
	{
		try
		{
			return document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);
		}
		catch (e)
		{
			return "";
		};
	}
	else if (el.currentStyle)
	{
		styleProp = styleProp.replace(/\-(.)/g, function ()
		{
			return arguments[1].toUpperCase();
		});
		return el.currentStyle[styleProp];
	};

	return null;
};

// --------------------------------------------------------------------------
// insertAfter()
// --------------------------------------------------------------------------
function insertAfter (obj, sibling)
{
	if (!obj || !sibling || !sibling.parentNode)
	{
		return null;
	};

	return sibling.nextSibling ? sibling.parentNode.insertBefore(obj, sibling.nextSibling) : sibling.parentNode.appendChild(obj);
};
// -- Loaded:/includes/jslib/domAdditions.js

// -- Attempting to load:/includes/jslib/serializer/serializer.js
// Yep, it slices, dices and serialices!
Serializer = function () {

	this._nameExclusions = {};
	this._typeExclusions = {};
	// client-side will encode by default unless you set this to false;
	this._encode = false;
	this._strictJson = false;
	this._safeDeserialize = false;

	this._sBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

};

// toss the object into an JS string
Serializer.prototype.serialize = function (o) {

	this._data = [];
	this._serializeNode([o], o, 0);
	this._data = this._data.join("");
	this._data = this._data.replace(/,}/g, "}");
	this._data = this._data.replace(/,]/g, "]");
	this._data = this._data.substr(0, this._data.length-1);

	if (this.allowEncoding()) {

		this._data = this.base64encode(this._data);

	}

	return this._data;

}

// exclude certain named elements from serialization
Serializer.prototype.addNameExclusion = function () {

	var l = arguments.length;

	for (var i=0; i<l; i++) {

		this._nameExclusions[arguments[i]] = true;

	}

}

// remove exclusion of named elements
Serializer.prototype.removeNameExclusion = function () {

	var l = arguments.length;

	for (var i=0; i<l; i++) {

		this._nameExclusions[arguments[i]] = false;

	}

}

// exclude certain data types from serialization
Serializer.prototype.addTypeExclusion = function () {

	var l = arguments.length;

	for (var i=0; i<l; i++) {

		this._typeExclusions[arguments[i].toLowerCase()] = true;

	}

}

// remove exclusion of data types
Serializer.prototype.removeTypeExclusion = function () {

	var l = arguments.length;

	for (var i=0; i<l; i++) {

		this._typeExclusions[arguments[i].toLowerCase()] = false;

	}

}

// getter/setter specifies whether to follow strict Json serialization
Serializer.prototype.requireStrictJson = function (value) {

	if (typeof(value) != "undefined") {

		this._strictJson = value;

	}

	return this._strictJson;

}

// getter/setter specifies whether we need to check for wellformedness before deserializing
Serializer.prototype.requireSafeDeserialize = function (value) {

	if (typeof(value) != "undefined") {

		this._safeDeserialize = value;

	}

	return this._safeDeserialize;

}

// getter/setter specifies if results should be encoded
Serializer.prototype.allowEncoding = function (value) {

	if (typeof(value) != "undefined") {

		this._encode = value;

	}

	return this._encode;

}

// serialize each member of the object
Serializer.prototype._serializeNode = function (o, startObj, depth) {

	var t, f, d1, d2;

	// loop through all of the members
	for (var i in o) {

		if (o[i] === null) {
			t = "null";
		} else {
			t = typeof(o[i]);
		}


		f = t == "object" ? true : false;
		t = t == "object" && typeof(o[i].length) != "undefined" && o[i].constructor == Array ? "array" : t;

		if (!this._typeExclusions[t] && !this._nameExclusions[i] && !(this._strictJson && t == "function")) {

			switch (t) {

				case "string" :

					d1 = "\"";
					d2 = "\"";
					break;

				case "object" :

					d1 = "{";
					d2 = "}";
					break;

				case "array" :

					d1 = "[";
					d2 = "]";
					break;

				default :

					d1 = "";
					d2 = "";
					break;

			 }

			// build the JS string for this node
			if (isFinite(i)) {

				this._data.push(d1);

			} else {

				var n = typeof(i) == "string" ? "\"" + i + "\"" : i;
				this._data.push(n + ":" + d1);

			}

			if (f) {

				if (depth == 0 || o[i] !== startObj) {

					this._serializeNode(o[i]);

				}

			} else {

				if (t == "string") {

					var re = /"/g;
					this._data.push(o[i].replace(re, "\\\""));

				} else if (t == "undefined" || t == "null") {

					this._data.push(this._strictJson ? "null" : t);

				} else {

					this._data.push(o[i]);

				}
			}

			this._data.push(d2 + ",");

		}

	}
}

Serializer.prototype.deserialize = function (o) {

	try {

		if (this.hasEncodingLeader(o)) {

			o = this.base64decode(o);

		}

		// eval("var x = " + o);
		if (this._safeDeserialize) {
			return this.safeDeserialize(o);
		} else {
			return this.unsafeDeserialize(o);
		}

	} catch(e) {

		if (typeof(dbg) == "function") {

			dbg("Serializer.deserialize() error", "", "red");
			dbgObject(e);
			dbg("Serializer Source", o);

		}

		var x = "";

	}

	return x;

}
Serializer.prototype.safeDeserialize = function (o) {
	try {
		var p = new jsonParser();
		p.parse(o);
		eval("var x = " + o);
	} catch(e) {
		var x = "";
	}
	return x;
}
Serializer.prototype.unsafeDeserialize = function (o) {
	try {
		eval("var x = " + o);
	} catch(e) {
		var x = "";
	}
	return x;
}

Serializer.prototype.hasEncodingLeader = function (s) {

	return s.indexOf("B64ENC") == 0 ? true : false;

}

Serializer.prototype.stripLeader = function (s) {

	return s.substr(6, s.length);

}

Serializer.prototype.prependLeader = function (s) {

	return "B64ENC" + s;

}

// ripped from /includes/asplib/Base64
Serializer.prototype.base64decode = function (sIn) {

	var i;
	var iBits;
	var sOut = "";

	if (this.hasEncodingLeader(sIn)) {

		sIn = this.stripLeader(sIn);

	} else {

		return sIn;

	}

	sIn = sIn.replace(/=/g, "");

	for(i = 0; i < sIn.length; i += 4) {

		iBits = (this._sBase64.indexOf(sIn.charAt(i)) << 18) |
			(this._sBase64.indexOf(sIn.charAt(i + 1)) << 12) |
			((this._sBase64.indexOf(sIn.charAt(i + 2)) & 0xff) << 6) |
			(this._sBase64.indexOf(sIn.charAt(i + 3)) & 0xff);

		sOut += String.fromCharCode(iBits >> 16 & 0xff);
		sOut += (i > sIn.length - 3) ? "" : String.fromCharCode(iBits >> 8 & 0xff);
		sOut += (i > sIn.length - 4) ? "" : String.fromCharCode(iBits & 0xff);

	}

	return sOut;

}

// ripped from /includes/asplib/Base64
Serializer.prototype.base64encode = function (sIn) {

	var i;
	var iBits;
	var sOut = "";

	for(i = 0; i < sIn.length; i += 3) {

		iBits = (sIn.charCodeAt(i) << 16) +
			((sIn.charCodeAt(i + 1) & 0xff) << 8) +
			(sIn.charCodeAt(i + 2) & 0xff);

		sOut += this._sBase64.charAt(iBits >> 18 & 0x3f);
		sOut += this._sBase64.charAt(iBits >> 12 & 0x3f);
		sOut += (i > sIn.length - 2) ? "=" : this._sBase64.charAt(iBits >> 6 & 0x3f);
		sOut += (i > sIn.length - 3) ? "=" : this._sBase64.charAt(iBits & 0x3f);

	}

	sOut = this.prependLeader(sOut);

	return sOut;

}


// This is a validating JSON recursive descent parser.  It does not actually
// build a data structure; it merely tests the input string for validity
// according to the JSON grammar.  This greatly simplifies the parser, and also
// allows a few otherwise impossible performance tweaks.  For a description of
// the JSON grammer, see http:// json.org.  For a description of Recursive
// Descent parsers, how they work, and how to write one, see
// http://www.antlr.org/book/byhand.pdf

// The purpose of this parser is to ensure that calling eval() on a serialized
// string will not have any potentially nasty side effects.  This is an
// important safety measure when you don't know who has been serializing the
// strings you are about to deserialize...


function jsonParser () {
	this.lexer = null;
	this.tokens = [ ];
}

jsonParser.prototype.parse = function (str) {
	this.lexer = new jsonLexer(str);

	return this._json();
}

// not really necessary, since JSON seems to be parsable with an LL(1) grammar,
// but defining this now makes it far easier to extend in the future.
jsonParser.prototype.lookAhead = function (k) {
	while (this.tokens.length <= k) {
		this.tokens.push(this.lexer.nextToken());
	}
	return this.tokens[k].type;
}

// Remove a token from the token stream.  Since we are only parsing and not
// actually doing anything with the parsed string, we can merely remove the
// token from the stream here, and not worry about building a syntax tree.
jsonParser.prototype.consume = function (type) {
	if (this.tokens.length == 0) {
		this.tokens.push(this.lexer.nextToken());
	}

	if (this.tokens[0].type == type) {
		this.tokens.shift();
	} else {
		throw { message: 'JSON: invalid token encountered validating string; Expected '+type+', got '+this.tokens[0].type };
	}
}

// A JSON serialized string consists of exactly one value.
jsonParser.prototype._json = function () {
	this._value();
	this.consume('_EOF');
}

// A value can be one of
//   an object
//   an array
//   a string
//   a number
//   true, false, or null
jsonParser.prototype._value = function () {
	switch(this.lookAhead(0)) {
		case '_OBJ_OPEN':
			this._object();
			break;
		case '_ARR_OPEN':
			this._array();
			break;
		case '_DIGITS':
		case '_NEG':
			this._number();
			break;
		case '_STRING':
			this.consume('_STRING');
			break;
		case '_TRUE':
			this.consume('_TRUE');
			break;
		case '_FALSE':
			this.consume('_FALSE');
			break;
		case '_NULL':
			this.consume('_NULL');
			break;
	}
}

// An object consists of an open brace, zero or more comma separated
// string/value pairs, and a close brace
jsonParser.prototype._object = function () {
	this.consume('_OBJ_OPEN');
	if (this.lookAhead(0) != '_OBJ_CLOSE') {
		this._member();
	}
	while (this.lookAhead(0) != '_OBJ_CLOSE') {
		this.consume('_SEP');
		this._member();
	}
	this.consume('_OBJ_CLOSE');
}

jsonParser.prototype._member = function () {
	this.consume('_STRING');
	this.consume('_ASSIGN');
	this._value();
}

// An array consists of an open bracket, zero or more comma separated values,
// and a close bracket
jsonParser.prototype._array = function () {
	this.consume('_ARR_OPEN');
	if (this.lookAhead(0) != '_ARR_CLOSE') {
		this._value();
	}
	while (this.lookAhead(0) != '_ARR_CLOSE') {
		this.consume('_SEP');
		this._value();
	}
	this.consume('_ARR_CLOSE');
}

// A number consists of an optional leading '-', any number of digits, followed
// by an optional fractional component and an optional exponential component.
jsonParser.prototype._number = function () {
	if (this.lookAhead(0) == '_NEG') {
		this.consume('_NEG');
	}

	this.consume('_DIGITS');

	if (this.lookAhead(0) == '_DOT') {
		this.consume('_DOT');
		this.consume('_DIGITS');
	}

	if (this.lookAhead(0) == '_EXP') {
		this.consume('_EXP');
		if (this.lookAhead(0) == '_POS') {
			this.consume('_POS');
		} else if (this.lookAhead(0) == '_NEG') {
			this.consume('_NEG');
		}
		this.consume('_DIGITS');
	}
}

function jsonLexer (input) {
	// since we only care about validity and not the actual value, we can
	// easily reduce these multi-character tokens down to one character now
	// resulting in a significant gain in overall efficiency.
	input = input.replace(/"([^"\\]|\\"|\\)*"/g, 'S');
	input = input.replace(/[0-9]+/g, '0');

	this.input = input;
}

// Tokens represented by a single character
jsonLexer.prototype.charTokens = {
								'{': '_OBJ_OPEN',
								'}': '_OBJ_CLOSE',
								'[': '_ARR_OPEN',
								']': '_ARR_CLOSE',
								':': '_ASSIGN',
								',': '_SEP',
								'.': '_DOT',
								'-': '_NEG',
								'+': '_POS',
								'e': '_EXP',
								'E': '_EXP',
								'S': '_STRING',
								'0': '_DIGITS'
							};
// Other Tokens that are scanned for:
// 									 '_TRUE',
// 									 '_FALSE',
// 									 '_NULL',

jsonLexer.prototype.nextToken = function () {
	if (this.input.length == 0) {
		return new jsonToken("_EOF", null);
	}

	var first = this.input.substr(0,1);
	if (this.charTokens[first]) {
		this.input = this.input.substr(1);
		return new jsonToken(this.charTokens[first], first);
	}

	switch (first) {
		case 't':
		case 'T':
			if (this.input.substr(0,4).toLowerCase() == 'true') {
				this.input = this.input.substr(4);
				return new jsonToken('_TRUE', true);
			}
			break;

		case 'f':
		case 'F':
			if (this.input.substr(0,5).toLowerCase() == 'false') {
				this.input = this.input.substr(5);
				return new jsonToken('_FALSE', true);
			}
			break;

		case 'n':
			if (this.input.substr(0,4) == 'null') {
				this.input = this.input.substr(4);
				return new jsonToken('_NULL', true);
			}
			break;
	}

	throw { message: 'JSON: Unexpected character ('+first+') encountered validating string' };
}

// Simple representation of a lexer token
function jsonToken (type, value) {
	this.type = type;
	this.value = value;
}
// -- Loaded:/includes/jslib/serializer/serializer.js

// -- Attempting to load:/includes/jslib/browserObj.js
/* 
browserObj.js

Browser interrogation. 

Feb-05. This is a rewrite of browser.js prompted by old version identifying Firefox as Navigator 6.
This new version implements a policy of "innocent until proven guilty" so that browsers are assumed to
be "major"/W3C-compliant until shown to be otherwise. If the old version could not identify a browser,
it was assumed to be IE for Windows but this meant that the newer batch of boutique browsers such as
Opera, K-Meleon, Konqueror and iCab were all incorrectly identified even though they are standards-compliant.

Note that IE6 has isW3C set to true but for this to be true in reality, a valid DOCTYPE must be set
http://www.w3.org/QA/2002/04/valid-dtd-list.html. Even then, be aware that IE6 still gets widths applied 
to COLumns wrong, behaving like IE5/5.5.
*/
function browserObj() {

	this.agent = navigator.userAgent.toLowerCase();
	this.name = navigator.appName.toLowerCase();
	this.version = navigator.appVersion;
	
	this.platform = "";
	this.isW3C   = true;  //assume innocent until proven guilty
	this.isMajor = true;  //assume innocent until proven guilty
	
	this.isMinor   = false;
	this.isNav4    = false;
	this.isNav6    = false;
	this.isIE4     = false;
	this.isIE      = false;
	this.isSafari  = false;
	this.isFirefox = false;
	this.isMoz     = false;
	this.isOpera   = false;

	//Platform
	if (this.agent.indexOf("windows") != -1)
		this.platform = "pc";
	else if (this.agent.indexOf("mac") != -1)
		this.platform = "mac";
	else if (this.agent.indexOf("linux") != -1)
		this.platform = "linux";
	else
		this.platform = "unknown";
		
	//Internet Explorer
	var indexMSIE = this.agent.indexOf("msie")
	if (indexMSIE != -1) {
		this.isIE = true;
		
		var versionIE = parseInt(this.agent.charAt(indexMSIE + 5));
		if(versionIE < 6) { 
			this.isW3C = false; //Must specify DOCTYPE for IE6+ to behave as W3C (although even IE6 gets table COL widths wrong)
			
			if(versionIE < 5) {
				this.isIE4 = true;
				this.isMajor = false;
				this.isMinor = true;
			}
		}
	}
	
	//Safari
	else if (this.agent.indexOf("safari") != -1) {
		this.isSafari = true
	}
	
	//Firefox
	else if (this.agent.indexOf("firefox") != -1) {
		this.isFirefox = true
	}
	
	//Netscape 4
	else if (this.name == "netscape" && parseInt(this.version.charAt(0)) < 5) {
		this.isW3C = false;
		this.isNav4 = true;
		this.isMajor = false;
		this.isMinor = true;
	}
	
	//Newer Netscape
	else if (this.agent.indexOf("netscape") != -1) {
		
		indexNetscape = this.agent.indexOf("netscape");
		indexSlash = this.agent.indexOf("/", indexNetscape);
		versionNav = parseInt(this.agent.charAt(indexSlash + 1));
		if(versionNav < 7) {
			this.isNav6 = true;
		}
	}
	
	//Mozilla (will catch derivitives such as K-Meleon)
	else if (this.agent.indexOf('gecko') > -1) {
		this.isMoz = true;
	}
	
	//Opera
	else if (this.agent.indexOf('opera') > -1) {
		this.isOpera = true;
	}
	
}
// -- Loaded:/includes/jslib/browserObj.js

// -- Attempting to load:/includes/jslib/viewport.js
/* thanks to PPK - http://www.quirksmode.org/viewport/compatibility.html */

function getWindowSize() {
	// returns innerHeight / innerWidth of window
	
	if (self.innerHeight) {
		
		// all except Explorer
		var width = self.innerWidth;
		var height = self.innerHeight;
		
	} else if (document.documentElement && document.documentElement.clientHeight) {
		
		// Explorer 6 Strict Mode
		var width = document.documentElement.clientWidth;
		var height = document.documentElement.clientHeight;
		
	} else if (document.body) {
		
		// other Explorers
		var width = document.body.clientWidth;
		var height = document.body.clientHeight;
		
	};
	
	return { width: width, height: height };
};
		
function getWindowScrollOffset() {
	// returns window's scroll offset
	
	if (typeof window.pageYOffset == 'number') {
		  
		//Netscape compliant
		var x = window.pageXOffset;
		var y = window.pageYOffset;
		
		
	} else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
	  
		//DOM compliant
		var x = document.body.scrollLeft;
		var y = document.body.scrollTop;
		
	
	} else if (document.documentElement &&
	  (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
	  
		//IE6 standards compliant mode
		var x = document.documentElement.scrollLeft;
		var y = document.documentElement.scrollTop;
		
	};
	
	return { x: x||0, y: y||0 };
};

function getViewport() {
	// returns viewport boundaries and dimensions as top, left, bottom, right, height, width
	var windowSize = getWindowSize();
	var scrollOffset = getWindowScrollOffset();
	
	var top = scrollOffset.y;
	var bottom = scrollOffset.y + windowSize.height;
	
	var left = scrollOffset.x;
	var right = scrollOffset.x + windowSize.width;
	
	return { 
		top: top,
		left: left,
		bottom: bottom,
		right: right,
		width: windowSize.width,
		height: windowSize.height
	};
};// -- Loaded:/includes/jslib/viewport.js

// -- Attempting to load:/includes/jslib/stringbuilder.js

// faster (30x!) string concatentation

function StringBuilder () {

	this.s = new Array()
	this.size = 0
	
	this.append = SB_append
	this.toString = SB_toString
	
	function SB_append (who) {
	
		this.s[this.size++] = who
	}
	
	function SB_toString () {
	
		return this.s.join("")
	}
}
// -- Loaded:/includes/jslib/stringbuilder.js

// -- Attempting to load:/source/resources/lib/js/common.js
// -- Error Loading:/source/resources/lib/js/common.js, check to see if the file exists.

// -- Attempting to load:/source/resources/lib/js/events.js
// -- Error Loading:/source/resources/lib/js/events.js, check to see if the file exists.

// -- Attempting to load:/source/resources/lib/js/element.js
// -- Error Loading:/source/resources/lib/js/element.js, check to see if the file exists.

// -- Attempting to load:/source/resources/lib/js/widgets.js
// -- Error Loading:/source/resources/lib/js/widgets.js, check to see if the file exists.
