/*	EventCache Version 1.0
	Copyright 2005 Mark Wubben

	Provides a way for automagically removing events from nodes and thus preventing memory leakage.
	See <http://novemberborn.net/javascript/event-cache> for more information.
	
	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

/*	Implement array.push for browsers which don't support it natively.
	Please remove this if it's already in other code */
if(Array.prototype.push == null){
	Array.prototype.push = function(){
		for(var i = 0; i < arguments.length; i++){
			this[this.length] = arguments[i];
		};
		return this.length;
	};
};

/*	Event Cache uses an anonymous function to create a hidden scope chain.
	This is to prevent scoping issues. */
var EventCache = function(){
	var listEvents = [];
	
	return {
		listEvents : listEvents,
	
		add : function(node, sEventName, fHandler, bCapture){
			listEvents.push(arguments);
		},
	
		flush : function(){
			var i, item;
			for(i = listEvents.length - 1; i >= 0; i = i - 1){
				item = listEvents[i];
				
				if(item[0].removeEventListener){
					item[0].removeEventListener(item[1], item[2], item[3]);
				};
				
				/* From this point on we need the event names to be prefixed with 'on" */
				if(item[1].substring(0, 2) != "on"){
					item[1] = "on" + item[1];
				};
				
				if(item[0].detachEvent){
					item[0].detachEvent(item[1], item[2]);
				};
				
				item[0][item[1]] = null;
			};
		}
	};
}();

function addEvent(obj, evType, fn, useCapture){
    var result;
	if (typeof(useCapture) == "undefined") useCapture = false;
    if (obj.addEventListener){
        obj.addEventListener(evType, fn, useCapture);
        result = true;
    } else if (obj.attachEvent){
        var r = obj.attachEvent("on"+evType, fn);
        result = r;
    } else {
        return false;
    }
    EventCache.add(obj, evType, fn, useCapture);
    return result;
}
addEvent(window, "unload", EventCache.flush);

function $(id) {
	return document.getElementById(id);	
}


var Class = {
  create: function() {
    return function() { 
      this.initialize.apply(this, arguments);
    }
  }
};

Object.extend = function(destination, source) {
  for (property in source) {
    destination[property] = source[property];
  }
  return destination;
};

Function.prototype.bind = function(object) {
  var __method = this;
  return function() {
    return __method.apply(object, arguments);
  }
};

ajax = Class.create();
ajax.prototype = {
	initialize: function(url, options){
		this.transport = this.getTransport();
		this.postBody = options.postBody || '';
		this.method = options.method || 'post';
		this.onComplete = options.onComplete || null;
		this.update = $(options.update) || null;
		this.request(url);
	},

	request: function(url){
		this.transport.open(this.method, url, true);
		this.transport.onreadystatechange = this.onStateChange.bind(this);
		if (this.method == 'post') {
			this.transport.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
			if (this.transport.overrideMimeType) this.transport.setRequestHeader('Connection', 'close');
		}
		this.transport.send(this.postBody);
	},

	onStateChange: function(){
		if (this.transport.readyState == 4 && this.transport.status == 200) {
			if (this.onComplete) 
				setTimeout(function(){this.onComplete(this.transport.responseText);}.bind(this), 10);
			if (this.update)
				setTimeout(function(){this.update.innerHTML = this.transport.responseText;}.bind(this), 10);
			this.transport.onreadystatechange = function(){};
		}
	},

	getTransport: function() {
		if (window.ActiveXObject) return new ActiveXObject('Microsoft.XMLHTTP');
		else if (window.XMLHttpRequest) return new XMLHttpRequest();
		else return false;
	}
};

//Nifty
/* Nifty Corners Cube - rounded corners with CSS and Javascript
Copyright 2006 Alessandro Fulciniti (a.fulciniti@html.it)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

var niftyOk=(document.getElementById && document.createElement && Array.prototype.push);

String.prototype.find=function(what){
return(this.indexOf(what)>=0 ? true : false);
}

function Nifty(selector,options){
if(niftyOk==false) return;
var i,v=selector.split(","),h=0;
if(options==null) options="";
if(options.find("fixed-height"))
    h=getElementsBySelector(v[0])[0].offsetHeight;
for(i=0;i<v.length;i++)
    Rounded(v[i],options);
if(options.find("height")) SameHeight(selector,h);
}

function Rounded(selector,options){
var i,top="",bottom="",v=new Array();
if(options!=""){
    options=options.replace("left","tl bl");
    options=options.replace("right","tr br");
    options=options.replace("top","tr tl");
    options=options.replace("bottom","br bl");
    options=options.replace("transparent","alias");
    if(options.find("tl")){
        top="both";
        if(!options.find("tr")) top="left";
        }
    else if(options.find("tr")) top="right";
    if(options.find("bl")){
        bottom="both";
        if(!options.find("br")) bottom="left";
        }
    else if(options.find("br")) bottom="right";
    }
if(top=="" && bottom=="" && !options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector);
for(i=0;i<v.length;i++){
    FixIE(v[i]);
    if(top!="") AddTop(v[i],top,options);
    if(bottom!="") AddBottom(v[i],bottom,options);
    }
}

function AddTop(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Top");
if(options.find("small")){
    d.style.marginBottom=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginBottom=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginBottom=(p-5)+"px";
for(i=1;i<=lim;i++)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingTop="0";
el.insertBefore(d,el.firstChild);
}

function AddBottom(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Bottom");
if(options.find("small")){
    d.style.marginTop=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginTop=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginTop=(p-5)+"px";
for(i=lim;i>0;i--)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingBottom=0;
el.appendChild(d);
}

function CreateStrip(index,side,color,border,btype){
var x=CreateEl("b");
x.className=btype+index;
x.style.backgroundColor=color;
x.style.borderColor=border;
if(side=="left"){
    x.style.borderRightWidth="0";
    x.style.marginRight="0";
    }
else if(side=="right"){
    x.style.borderLeftWidth="0";
    x.style.marginLeft="0";
    }
return(x);
}

function CreateEl(x){
return(document.createElement(x));
}

function FixIE(el){
if(el.currentStyle!=null && el.currentStyle.hasLayout!=null && el.currentStyle.hasLayout==false)
    el.style.display="inline-block";
}

function SameHeight(selector,maxh){
var i,v=selector.split(","),t,j,els=[],gap;
for(i=0;i<v.length;i++){
    t=getElementsBySelector(v[i]);
    els=els.concat(t);
    }
for(i=0;i<els.length;i++){
    if(els[i].offsetHeight>maxh) maxh=els[i].offsetHeight;
    els[i].style.height="auto";
    }
for(i=0;i<els.length;i++){
    gap=maxh-els[i].offsetHeight;
    if(gap>0){
        t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";
        nc=els[i].lastChild;
        if(nc.className=="niftycorners")
            els[i].insertBefore(t,nc);
        else els[i].appendChild(t);
        }
    }
}

function getElementsBySelector(selector){
var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;
if(selector.find("#")){ //id selector like "tag#id"
    if(selector.find(" ")){  //descendant selector like "tag#id tag"
        s=selector.split(" ");
        var fs=s[0].split("#");
        if(fs.length==1) return(objlist);
        f=document.getElementById(fs[1]);
        if(f){
            v=f.getElementsByTagName(s[1]);
            for(i=0;i<v.length;i++) objlist.push(v[i]);
            }
        return(objlist);
        }
    else{
        s=selector.split("#");
        tag=s[0];
        selid=s[1];
        if(selid!=""){
            f=document.getElementById(selid);
            if(f) objlist.push(f);
            return(objlist);
            }
        }
    }
if(selector.find(".")){      //class selector like "tag.class"
    s=selector.split(".");
    tag=s[0];
    selclass=s[1];
    if(selclass.find(" ")){   //descendant selector like tag1.classname tag2
        s=selclass.split(" ");
        selclass=s[0];
        tag2=s[1];
        }
    }
var v=document.getElementsByTagName(tag);  // tag selector like "tag"
if(selclass==""){
    for(i=0;i<v.length;i++) objlist.push(v[i]);
    return(objlist);
    }
for(i=0;i<v.length;i++){
    c=v[i].className.split(" ");
    for(j=0;j<c.length;j++){
        if(c[j]==selclass){
            if(tag2=="") objlist.push(v[i]);
            else{
                v2=v[i].getElementsByTagName(tag2);
                for(k=0;k<v2.length;k++) objlist.push(v2[k]);
                }
            }
        }
    }
return(objlist);
}

function getParentBk(x){
var el=x.parentNode,c;
while(el.tagName.toUpperCase()!="HTML" && (c=getBk(el))=="transparent")
    el=el.parentNode;
if(c=="transparent") c="#FFFFFF";
return(c);
}

function getBk(x){
var c=getStyleProp(x,"backgroundColor");
if(c==null || c=="transparent" || c.find("rgba(0, 0, 0, 0)"))
    return("transparent");
if(c.find("rgb")) c=rgb2hex(c);
return(c);
}

function getPadding(x,side){
var p=getStyleProp(x,"padding"+side);
if(p==null || !p.find("px")) return(0);
return(parseInt(p));
}

function getStyleProp(x,prop){
if(x.currentStyle)
    return(x.currentStyle[prop]);
if(document.defaultView.getComputedStyle)
    return(document.defaultView.getComputedStyle(x,'')[prop]);
return(null);
}

function rgb2hex(value){
var hex="",v,h,i;
var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;
var h=regexp.exec(value);
for(i=1;i<4;i++){
    v=parseInt(h[i]).toString(16);
    if(v.length==1) hex+="0"+v;
    else hex+=v;
    }
return("#"+hex);
}

function Mix(c1,c2){
var i,step1,step2,x,y,r=new Array(3);
if(c1.length==4)step1=1;
else step1=2;
if(c2.length==4) step2=1;
else step2=2;
for(i=0;i<3;i++){
    x=parseInt(c1.substr(1+step1*i,step1),16);
    if(step1==1) x=16*x+x;
    y=parseInt(c2.substr(1+step2*i,step2),16);
    if(step2==1) y=16*y+y;
    r[i]=Math.floor((x*50+y*50)/100);
    r[i]=r[i].toString(16);
    if(r[i].length==1) r[i]="0"+r[i];
    }
return("#"+r[0]+r[1]+r[2]);
}


function FormatTables(div) {
	var conDiv = document.getElementById(div);
	var wdt = document.body.offsetWidth-200;
	var ht = document.body.offsetHeight-50;
	var tblColl = conDiv.getElementsByTagName("TABLE");
	for (var t=0;t<tblColl.length;t++) {
		var tblObj = tblColl[t];
		var tblPar = tblObj.parentNode;
		tblPar.style.overflow = "auto";
		var currWidth = (tblPar.style.width)?parseInt(tblPar.style.width.replace("px","")):tblPar.offsetWidth;
		if (wdt < (currWidth+100)) {
			tblPar.style.height = Math.min(300,Math.max(tblPar.offsetHeight,150))+"px";
		} else {
			tblPar.style.height = "auto";
		}
		tblPar.style.width = wdt;
	}
}

var validStr = new Object();
	validStr["currency"] = /(^\$\d{1,3}(,\d{3})*\.\d{2}$)|(^\(\$\d{1,3}(,\d{3})*\.\d{2}\)$)/;
	validStr["email"]  = /^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/i;
	validStr["numeric"]  =  /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/; 
	validStr["integer"]  = /(^-?\d\d*$)/;
	validStr["time"] = /^([1-9]|1[0-2]):[0-5]\d(:[0-5]\d(\.\d{1,3})?)?$/;
	validStr["date"] = /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/;

function ValidateForm(frmObj) {
	var x = frmObj.elements.length;
	var message = "";
	frmSubmit = 1;
	var more_message = "";
  	for (var i = 0; i < x; i++) {
		fldObj = frmObj.elements[i];
		req = fldObj.getAttribute('required');
		val = fldObj.getAttribute('vtype');
		more_message = "";
	    	if (req > 0) {
	      		more_message += frmValidRequired(frmObj,fldObj,strFrm.reqMsg);
	      	} 
			var msg_addition = "";
			var objRegExp = eval(validStr[val]);
			form_field_value = trimAll(fldObj.value);
			if (form_field_value != "" && (!objRegExp.test(form_field_value))) {
				msg_addition = fldObj.getAttribute('vlabel')+' '+msg;
				changeColor(frmObj,fldObj,1);
			}
			if (more_message != "" && (message == "")) {
				message = more_message;
				more_message="";
			} else if (more_message != "") {
				message = message + "\n" + more_message;
				more_message="";
			}
    }
	if (message > "") {
		alert(strFrm.formBeginMessage+":\n\n" + message + "\n\n"+strFrm.formEndMessage+".")
   		return false;
  	} else {
   		if (file_attached == 1 && flPth.length > 0) showProgress(flPth);//loadFileCopy(abRoot);
		return true;
   	}
	if (file_attached == 1 && flPth.length > 0) showProgress(flPth);//loadFileCopy(abRoot);
	return true;
}

var isWorking = false;
var http = createRequestObject();
var glossArr = new Object;
function showGlossary(term,obj) {
	if (!isWorking && http) {
		if (glossArr[term]) {
			coolTip(obj,glossArr[term], 300);
			return;
		}
		coolTip(obj,'<em><b>Please wait...</b><br>Retrieving description...</em>', 300);
		http.open('get', '_glossary.cfm?term='+term);
		http.onreadystatechange = function(){handleResponse(term,obj);};
		isWorking = true;
		http.send(null);
	}
}
function handleResponse(term,obj) {
	if(http.readyState == 4) {
		if (http.responseText.indexOf('invalid') == -1) {
			var response = http.responseText;
			glossArr[term] = response;
			coolTip(obj,response, 300);
			isWorking = false;
		}
	}
}

function getObjectProperties(elObj) {
	var o = elObj;
	var elPos = getObjectPosition(o);
	var objArr = new Array();
	objArr["x"] = elPos["x"];
	objArr["y"] = elPos["y"];
	objArr["h"] = o.offsetHeight;
	objArr["w"] = o.offsetWidth;
	return objArr;
};

function getObjectPosition(elObj) {
	var objRealPos = Position.get(elObj);
	var posArr = new Array();
	posArr["x"] = objRealPos["left"];
	posArr["y"] = objRealPos["top"];
	return posArr;
}


var Position =(function(){function resolveObject(s){if(document.getElementById && document.getElementById(s)!=null){return document.getElementById(s);}else if(document.all && document.all[s]!=null){return document.all[s];}else if(document.anchors && document.anchors.length && document.anchors.length>0 && document.anchors[0].x){for(var i=0;i<document.anchors.length;i++){if(document.anchors[i].name==s){return document.anchors[i]}}}}var pos ={};
pos.set = function(o,left,top){if(typeof(o)=="string"){o = resolveObject(o);}if(o==null || !o.style){return false;}o.style.position = "absolute";if(typeof(left)=="object"){var pos = left;left = pos.left;top = pos.top;}o.style.left = left + "px";o.style.top = top + "px";return true;};
pos.get = function(o){var fixBrowserQuirks = true;if(typeof(o)=="string"){o = resolveObject(o);}if(o==null){return null;}var left = 0;var top = 0;var width = 0;var height = 0;var parentNode = null;var offsetParent = null;offsetParent = o.offsetParent;var originalObject = o;var el = o;while(el.parentNode!=null){el = el.parentNode;if(el.offsetParent==null){}else{var considerScroll = true;if(fixBrowserQuirks && window.opera){if(el==originalObject.parentNode || el.nodeName=="TR"){considerScroll = false;}}if(considerScroll){if(el.scrollTop && el.scrollTop>0){top -= el.scrollTop;}if(el.scrollLeft && el.scrollLeft>0){left -= el.scrollLeft;}}}if(el == offsetParent){left += o.offsetLeft;if(el.clientLeft && el.nodeName!="TABLE"){left += el.clientLeft;}top += o.offsetTop;if(el.clientTop && el.nodeName!="TABLE"){top += el.clientTop;}o = el;if(o.offsetParent==null){if(o.offsetLeft){left += o.offsetLeft;}if(o.offsetTop){top += o.offsetTop;}}offsetParent = o.offsetParent;}}if(originalObject.offsetWidth){width = originalObject.offsetWidth;}if(originalObject.offsetHeight){height = originalObject.offsetHeight;}return{'left':left, 'top':top, 'width':width, 'height':height};};
pos.getCenter = function(o){var c = this.get(o);if(c==null){return null;}c.left = c.left +(c.width/2);c.top = c.top +(c.height/2);return c;};return pos;})();

/***********************************************
* Cool DHTML tooltip script II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var enabletip=false
var tipobj=null;
var pointerobj=null;

function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


function coolTip(obj,thetext, thewidth, thecolor){
	var hintObj = $("XMBubbleHintText");
	if (hintObj) {
		hintObj.innerHTML = thetext;

		var tipObj = $("XMBubbleHint");

		var docWidth = document.body.offsetWidth;
		var eProp = getObjectProperties(obj);
		tipObj.style.display = "block";
		var farRight = docWidth-tipObj.offsetWidth-25;
		var normalRight = eProp["x"]+eProp["w"]+10;
		var farLeft = eProp["x"]-tipObj.offsetWidth-10;
		var leftPos = Math.min(normalRight,farRight);
		if (farRight < normalRight && farLeft > 0) leftPos = farLeft;
		tipObj.style.left  = leftPos+"px";
		tipObj.style.top = eProp["y"]-15+"px";
	}
}

function hidecoolTip(){
	hideObj("XMBubbleHint");
}

function createRequestObject() {
	var ro;
	var browser = navigator.appName;
	if (browser == "Microsoft Internet Explorer") {
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		ro = new XMLHttpRequest();
	}
	return ro;
}

document.getElementsByClassName = function(className) {
  var children = document.getElementsByTagName('*') || document.all;
  var elements = new Array();
  
  for (var i = 0; i < children.length; i++) {
    var child = children[i];
    var classNames = child.className.split(' ');
    for (var j = 0; j < classNames.length; j++) {
      if (classNames[j] == className) {
        elements.push(child);
        break;
      }
    }
  }
  
  return elements;
};

// document.getElementsByAttribute([string attributeName],[string attributeValue],[boolean isCommaSeparatedList:false])
document.getElementsByAttribute=function(attrN,attrV,multi){
    attrV=attrV.replace(/\|/g,'\\|').replace(/\[/g,'\\[').replace(/\(/g,'\\(').replace(/\+/g,'\\+').replace(/\./g,'\\.').replace(/\*/g,'\\*').replace(/\?/g,'\\?').replace(/\//g,'\\/');
    var multi=typeof multi!='undefined'?multi:false,
        cIterate=typeof document.all!='undefined'?document.all:document.getElementsByTagName('*'),aResponse=[],re=new RegExp(multi?'\\b'+attrV+'\\b':'^'+attrV+'$'),i=0,elm;
    while((elm=cIterate.item(i++))){
        if(re.test(elm.getAttribute(attrN)||''))
            aResponse[aResponse.length]=elm;
    }
    return aResponse;
}


var overObj = new Object();
function showObj(e,el,pos,clickToClose) {
	var obj = $(el);
	var clickToClose = (typeof(clickToClose) != "undefined")?clickToClose:true;
	var docWidth = document.body.offsetWidth;
	if (obj) {
		if (typeof overObj[el] == "undefined") overObj[el] = false;
		var pos = (typeof(pos) != "undefined")?pos:"bottom";
		var eProp = getObjectProperties(e);
		obj.style.display = "block";
		obj.style.left  = Math.min(eProp["x"],(docWidth-obj.offsetWidth))+"px";
		obj.style.top = eProp["y"]+eProp["h"]+"px";
		if (pos == "top") obj.style.top = eProp["y"]-obj.offsetHeight-5+"px";
		else if (pos == "right") {
			obj.style.left  = Math.min(eProp["x"]+eProp["w"],(docWidth-obj.offsetWidth-50))+"px";
			obj.style.top = eProp["y"]-10+"px";
		} else if (pos == "tr") {
			obj.style.left  = Math.min(eProp["x"]+eProp["w"],(docWidth-obj.offsetWidth-50))+"px";
			obj.style.top = eProp["y"]-obj.offsetHeight-5+"px";
		} else if (pos == "mr") {
			obj.style.left  = Math.min(eProp["x"]+eProp["w"],(docWidth-obj.offsetWidth-50))+"px";
			obj.style.top = eProp["y"]-obj.offsetHeight-(obj.offsetHeight/2)+"px";
		} else if (pos == "br") {
			obj.style.left  = Math.min(eProp["x"]+eProp["w"]+10,(docWidth-obj.offsetWidth-50))+"px";
			obj.style.top = eProp["y"]-20+"px";
		}
		if (obj.offsetHeight > (document.body.offsetHeight-(eProp["y"]+eProp["h"]))) {
			if (document.body.offsetHeight-(eProp["y"]+eProp["h"]) > 0)
				obj.style.height = Math.min(200,document.body.offsetHeight-(eProp["y"]+eProp["h"]))+"px";
			obj.style.overflow = "auto";
		}
		if (clickToClose) {
			document.onmouseup = function(e) {
				hideObj(el); 
			}
		}
	}
}

function hideObj(el) {
	var obj = $(el);
	if (obj) obj.style.display = "none";
}

var linkSummaryArr = new Object();
function showLinkSummary(obj,url) {
	if (!isWorking && http) {
		if (linkSummaryArr[url]) {
			if (linkSummaryArr[url].length > 10) coolTip(obj,linkSummaryArr[url], 300);
			return;
		}
		http.open('get', 'inc/_link_summary.cfm?link='+escape(url));
		http.onreadystatechange = function(){handleLinkSummaryResponse(obj,url);};
		isWorking = true;
		http.send(null);
	}
}
function handleLinkSummaryResponse(obj,url) {
	if(http.readyState == 4) {
		if (http.responseText.indexOf('invalid') == -1) {
			var response = http.responseText;
			linkSummaryArr[url] = response;
			if (linkSummaryArr[url].length > 10) coolTip(obj,linkSummaryArr[url], 300);
			isWorking = false;
		}
	}
}

function globalOnload() {

	var XMBubbleHint = document.createElement("DIV");
	XMBubbleHint.id = "XMBubbleHint";
	XMBubbleHint.className = "BubbleTooltip";
	
	var XMBubbleHintContent = document.createElement("DIV");
	XMBubbleHintContent.className = "BubbleTooltipContent";
	XMBubbleHint.appendChild(XMBubbleHintContent);
	
	var XMBubbleHintContentArr = document.createElement("DIV");
	XMBubbleHintContentArr.className = "BubbleTooltipArrow";
	XMBubbleHintContentArr.id = "BubbleTooltipArrow";
	XMBubbleHintContent.appendChild(XMBubbleHintContentArr);

	var XMBubbleHintContentCB = document.createElement("DIV");
	XMBubbleHintContentCB.className = "BubbleTooltipClosebox";
	XMBubbleHintContentCB.setAttribute("title","Close");
	XMBubbleHintContentCB.onclick=function(){this.parentNode.parentNode.style.display="none"};
	XMBubbleHintContent.appendChild(XMBubbleHintContentCB);
	
	var XMBubbleHintContentTxt = document.createElement("SPAN");
	XMBubbleHintContentTxt.id = "XMBubbleHintText";
	XMBubbleHintContent.appendChild(XMBubbleHintContentTxt);
	
	/*
	var XMBubbleHint = document.createElement("DIV");
	XMBubbleHint.id = "XMBubbleHint";
	XMBubbleHint.style.backgroundColor = "#FFE479";
	XMBubbleHint.style.width = "auto";
	XMBubbleHint.style.padding = "5px";
	*/
	document.body.appendChild(XMBubbleHint);
	XMBubbleHint = null;
	
	//Find all links
	//e.g. <a class="pop" href="http://www.clg.portalxm.com/library/keytext.cfm?keytext_id=24&amp;cms_preview=1">&rArr;</a>
	var popObjs = document.getElementsByClassName("pop");
	for (var p=0;p<popObjs.length;p++) {//for each one find child objs	
		var ite = popObjs[p];
		ite.onmouseover = function(){showLinkSummary(this,this.getAttribute("href"));};
		ite.onmouseout = hidecoolTip;
	}
	
	//Format tables
	var tblObjs = document.getElementsByClassName("BlueTable");
	for (var p=0;p<tblObjs.length;p++) {//for each one find child objs	
		var tblObj = tblObjs[p];
		//Let's format this table
		var rows = tblObj.tBodies[0].rows;
		rows[0].className = "BlueTableFirstRow";
		for (var r=1;r<rows.length;r++) {
			rows[r].cells[0].style.backgroundColor = "#FFDEAD";
			if (r % 2 == 0) rows[r].className = "BlueTableAltRow";
		}
		
	}
	
	var glObjs = document.getElementsByClassName("Glossary");
	for (var p=0;p<glObjs.length;p++) {//for each one find child objs	
		var gite = glObjs[p];
		gite.onmouseover = function(){coolTip(this,unescape(this.getAttribute('definition')), 300);};
		gite.onmouseout = hidecoolTip;
	}

	var conditionObjs = document.getElementsByAttribute("condition","true");
	for (var c=0;c<conditionObjs.length;c++) {//for each one find child objs	
		var ite = conditionObjs[c].getAttribute("item");
		var itemObjs = document.getElementsByAttribute("parent",ite);
		var isEmpty = true;
		for (var i=0;i<itemObjs.length;i++) {
			if (itemObjs[i].innerHTML != "") {
				isEmpty = false;
				break;
			}
		}
		//if (isEmpty) conditionObjs[c].style.display = "none";
	}
	//alert("<d title='test'></d>".replace(/<[\s]+[^>]*?title[\s]?=[\s\"\']+(.*?)[\"\']+.*?>([^<]+|.*?)?<\/*>/g,"t"));
	Nifty("div.RoundBox","smooth");
}
if (window.attachEvent) window.attachEvent("onload",function(){globalOnload();});
else if (window.addEventListener) window.addEventListener("load",function(){globalOnload();},false);