// CORE-JS Version 1.5 Build 18
// Variables
	var req;
	var ua = navigator.userAgent;
	var ps = navigator.productSub;
	var dom = (document.getElementById)? 1:0;
	var ie4 = (document.all&&!dom)? 1:0;
	var ie5 = (document.all&&dom)? 1:0;
	var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4);
	var nn6 = (dom&&!ie5)? 1:0;
	var sNav = (nn4||nn6||ie4||ie5)? 1:0;
	var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0;
	var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody;
	var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')";
	var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body";
	var PX = (nn6)? "px" :"";
	
	
// AJAX Functions
	function includeFile(strURL, strQS, strID, strUseQS){
		var xmlhttp;
		if (window.ActiveXObject){
			try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e){
				try{
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			    }
			    catch (e){
					xmlhttp = false;
			    }
			 }
		}
		else if (window.XMLHttpRequest)
			xmlhttp = new XMLHttpRequest();

		if (strUseQS=='false')
			xmlhttp.open("GET", strURL, true);
		
		else if (strUseQS=='true'){
			if (location.search!=='')
				xmlhttp.open("GET", strURL+location.search, true);
				
			else{
				if (strQS!=='')
					xmlhttp.open("GET", strURL+strQS, true);
				
				else
					xmlhttp.open("GET", strURL, true);
			}
		}
		xmlhttp.onreadystatechange=function(){
			xmlhttp.onreadystatechange=function(){
				if (xmlhttp.readyState==4){
					if (xmlhttp.status==404)
						$(strID).innerHTML = "<font class=\'error\'>There was a problem loading this block.</font>";
					
					else if (xmlhttp.status==200)
						$(strID).innerHTML = xmlhttp.responseText;
					
			    }
			}
		}
		xmlhttp.send(null);
	}
	
	function blocksInclude(strURL, strQS, strAcct, strID, strUseQS){
		var xmlhttp;
		if (window.ActiveXObject){
			try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e){
				try{
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");	
			    }
			    catch (e){
					xmlhttp = false;
			    }
			}
		}
		else if (window.XMLHttpRequest)
			xmlhttp = new XMLHttpRequest();

		if (strUseQS=='false')
			xmlhttp.open("GET", strURL, true);
		
		else if (strUseQS=='true'){			
			if (location.search!=='')
				xmlhttp.open("GET", strURL+location.search, true);
				
			else{
				if (strQS!=='')
					xmlhttp.open("GET", strURL+strQS+"&acct="+strAcct, true);
					
				else
					xmlhttp.open("GET", strURL+"?acct="+strAcct, true);
			}
		}
		xmlhttp.onreadystatechange=function(){
			if (xmlhttp.readyState==4){
				if (xmlhttp.status==404)
					$(strID).innerHTML = "<font class=\'error\'>There was a problem loading this block.</font>";
					
				else if (xmlhttp.status==200)
					$(strID).innerHTML = xmlhttp.responseText;
		    }
		}
		xmlhttp.send(null);
	}
	
	function blocksIncludeEval(strURL, strQS, strAcct, strID, strUseQS){
		var xmlhttp;
		if (window.ActiveXObject){
			try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e){
				try{
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			    }
			    catch (e){
					xmlhttp = false;
			    }
			}
		}
		else if (window.XMLHttpRequest)
			xmlhttp = new XMLHttpRequest();
		
		if (strUseQS=='false')
			xmlhttp.open("GET", strURL, true);
		
		else if (strUseQS=='true'){
			if (location.search!=='')
				xmlhttp.open("GET", strURL+location.search, true);
				
			else{
				if (strQS!=='')
					xmlhttp.open("GET", strURL+strQS+"&acct="+strAcct, true);
				
				else
					xmlhttp.open("GET", strURL+"?acct="+strAcct, true);
			}
		}
		xmlhttp.onreadystatechange=function(){
			if (xmlhttp.readyState==4){
				if (xmlhttp.status==404)
					$(strID).innerHTML = "<font class=\'error\'>There was a problem loading this block.</font>";
					
				else if (xmlhttp.status==200)
					$(strID).innerHTML = eval(xmlhttp.responseText);	
		    }
		}
		xmlhttp.send(null);
	}
	
// Window Functions
	function windowOpen(url, target, appearance){
		window.open(url, target, appearance);
	}
	
	function windowStatus(status){
		window.status = status;	
	}
	
	function displayAlert(alert){
		alert(alert);
	}
	
	function jump2section(section){
		window.location.hash=section;
	}
	
	function CloseChildRefreshParent(){
		window.opener.location = window.opener.location;
		window.close();
	}
	
	function GetURL(){
		var strURL = location.pathname;
		return(strURL);
	}
	
	function BuildURL(strAcct,strQS){
		var strBaseURL = location.protocol + "//" + location.hostname + location.pathname;
		var strNewURL = "&" + strQS;
		location.href = strNewURL;
	}
	
// Document Functions
	function WriteHTML(strID, strHTML){	// For FF and NS compatibility
		$(strID).innerHTML = strHTML;
	}

// Tooltip Functions
	if(sNav){
		window.onresize = ReloadTip;
		document.onmousemove = MoveTip;
		if(nn4)
			document.captureEvents(Event.MOUSEMOVE);
	}	
	if(nn4||nn6){
		mx = "e.pageX";
		my = "e.pageY";
		scl = "window.pageXOffset";
		sct = "window.pageYOffset";
		if(nn4){
			obj = "document.TipLayer.";
			sl = "left";
			st = "top";
			ih = "clip.height";
			iw = "clip.width";
			vl = "'show'";
			hl = "'hide'";
			sv = "visibility=";
		}
		else
			obj = "document.getElementById('TipLayer').";
	} 
	if(ie4||ie5){
		obj = "TipLayer.";
		mx = "event.x";
		my = "event.y";
		scl = "eval(doc_root).scrollLeft";
		sct = "eval(doc_root).scrollTop";
		if(ie5){
			mx = mx+"+"+scl;
			my = my+"+"+sct;
		}
	}
	if(ie4||dom){
		sl = "style.left";
		st = "style.top";
		ih = "offsetHeight";
		iw = "offsetWidth";
		vl = "'visible'";
		hl = "'hidden'";
		sv = "style.visibility=";
	}
	if(ie4||ie5||ps>=20020823){
		ww = "eval(doc_root).clientWidth";
		wh = "eval(doc_root).clientHeight";
	}	 
	else{ 
		ww = "window.innerWidth";
		wh = "window.innerHeight";
		evlh = eval(wh);
		evlw = eval(ww);
		sbw=15;
	}

	function stm(strTitle,t,s,strType){
		if(sNav){
			hs = strType;
			var closeLink=(strType !=='tooltip')? "<a title='Close' class='CloseLink' href='javascript:void(0)' onclick='stickyhide()'>X</a>" : "";
			var title=(strTitle !== '')? "<table class='Title' cellpadding='0' cellspacing='0'><tr><th width='50%' class='Title'>"+strTitle+"</th><th class='CloseLink'>"+closeLink+"</td></tr></table>" : "";
			var txt = "<table class='ToolTipFramework' cellpadding='0' cellspacing='0'><tr><td>"+title+"</td></tr><tr><td class='TTContents'><div id='myDiv' class='myDiv'>"+MyText(t,s)+"</div></td></tr></table>";
			if(!nn4){
				eval(obj+"innerHTML=txt");
				if(strType=='popup'){
					tbody = {
							Pos:"",
							Xpos:2,
							Ypos:10,
							Transition:10,
							Duration:"",
							Alpha:"",
							ShadowType:"",
							ShadowColor:"",
							Width:300
							};	
				}
				else if(strType=='dialog'){
					tbody = {
							Pos:"float", 
							Xpos:CenterX(650),
							Ypos:CenterY(650),
							Transition:"",
							Duration:"", 
							Alpha:"",
							ShadowType:"",
							ShadowColor:"",
							Width:50
							};
				}
				else if(strType=='tooltip'){
					tbody = {
							Pos:"",
							Xpos:15,
							Ypos:20,
							Transition:10,
							Duration:"",
							Alpha:"",
							ShadowType:"",
							ShadowColor:"",
							Width:300
							};	
				}
			}
			if(ie4){ 
				TipLayer.style.width = s[14];
		 		tbody.Width = s[14];
			}
			Count=0;
			move=1;
		}
	}

	function CenterX(x){
		var intScrX = screen.availWidth;
		var intX = (intScrX - x) / 2;
		return(intX);
	}

	function CenterY(y){
		var intScrY = screen.availHeight;
		var intY = (intScrY - y) / 2;
		return(intY);
	}

	function MyText(t,s){
		var strMyText;
		if (s=='text')
			strMyText = "<font>"+t+"</font>";
		
		else if (s=='url')
			eval(includeFile(t,'','myDiv','false'));
		
		else if (s=='iframe')
			strMyText = "<iframe scrolling=\'auto\' frameborder=\'0\' style=\'width: 600px; height: 350px\' src=\'"+t+"\' />"
		
		return(strMyText);
	}

	function MoveTip(e){
		if(move){
			var X,Y,MouseX = eval(mx),MouseY = eval(my);
			tbody.Height = parseInt(eval(obj+ih)+3);
			tbody.wiw = parseInt(eval(ww+"+"+scl));
			tbody.wih = parseInt(eval(wh+"+"+sct));
			switch(tbody.Pos){
				case "left":
					X=MouseX-tbody.Width-tbody.Xpos;
					Y=MouseY+tbody.Ypos;
					break;
				case "center":
					X=MouseX-(tbody.Width/2);
					Y=MouseY+tbody.Ypos;
					break;
				case "float":
					X=tbody.Xpos+eval(scl);
					Y=tbody.Ypos+eval(sct);
					break;
				case "dialog":
					X=tbody.Xpos;
					Y=tbody.Ypos;
					break;
				default:
					X=MouseX+tbody.Xpos;
					Y=MouseY+tbody.Ypos;
					break;
			}
			if(tbody.wiw<tbody.Width+X)
				X = tbody.wiw-tbody.Width;
				
			if(tbody.wih<tbody.Height+Y+sbw){
				if(tbody.Pos=="float"||tbody.Pos=="fixed")
					Y = tbody.wih-tbody.Height-sbw;
					
				else
					Y = MouseY-tbody.Height;
			}
			if(X<0)
				X=0;
			
			eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX");
			ViewTip();
		}
	}

	function ViewTip(){
	  	Count++;
		if(Count == 1){
			if(cssFilters&&FiltersEnabled){	
				for(Index=28; Index<31; Index++){
					TipLayer.filters[Index].enabled = 0;
				}
				for(s=0; s<28; s++){
					if(TipLayer.filters[s].status == 2){
						TipLayer.filters[s].stop();
					}
				}
				if(tbody.Transition == 51){
					tbody.Transition = parseInt(Math.random()*50);
				}
				var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0;
				var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0;
				var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0;
				if(tbody.Alpha>0&&tbody.Alpha<100){
		  			TipLayer.filters[28].enabled = 1;
		  			TipLayer.filters[28].opacity = tbody.Alpha;
				}
				if(tbody.ShadowColor&&tbody.ShadowType == "simple"){
		  			TipLayer.filters[29].enabled = 1;
		  			TipLayer.filters[29].color = tbody.ShadowColor;	
				}
				else if(tbody.ShadowColor&&tbody.ShadowType == "complex"){
		  			TipLayer.filters[30].enabled = 1;
		  			TipLayer.filters[30].color = tbody.ShadowColor;
				}
				if(applyTrans||advFilters){
					eval(obj+sv+hl);
		  			if(applyTrans)
						TipLayer.filters[0].transition = tbody.Transition;
						
		  			TipLayer.filters[which].duration = tbody.Duration;
		  			TipLayer.filters[which].apply();
				}
			}
	 		eval(obj+sv+vl);
			if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters))
				TipLayer.filters[which].play();
			
			if(hs == "popup")
				move=0;
	  	}
	}

	function stickyhide(){
		eval(HideTip);
	}

	function ReloadTip(){
		if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh)))
			location.reload();	
		else if(hs=="popup")
			eval(HideTip);
	}

	function htm(){
		if(sNav){
			if(hs!="keep"){
				move=0; 
				if(hs!="popup")
					eval(HideTip);
			}
		}
	}

//Tab Functions
	function tabSelect(strURL, strTabID, intTabTotal){
		tabUnSelect(strTabID, intTabTotal);
		$("ifrmTab").src = strURL;
	}
	
	function tabUnSelect(strTabID, intTabTotal){
		var intTotal;
		intTotal = parseInt(intTabTotal) + 1;
		for (i=1; i<intTotal; i++){
			if (i==parseInt(strTabID))
				$("tab"+i).className = "ActiveTab";
			
			if(i!==parseInt(strTabID))
				$("tab"+i).className = "InactiveTab";
			
		}
	}

//Misc Functions
	function loadFlash(strMovURL, strDivID, intWidth, intHeight, strBGColor){
		$(strDivID).innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+intWidth+'" height="'+intHeight+'" id="Untitled-1" align="middle">\
		<param name="allowScriptAccess" value="sameDomain" />\
		<param name="movie" value="'+strMovURL+'" />\
		<param name="quality" value="high" />\
		<param name="bgcolor" value="#'+strBGColor+'" />\
		<embed src="'+strMovURL+'" quality="high" bgcolor="#'+strBGColor+'" width="'+intWidth+'" height="'+intHeight+'" name="mymovie" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\
		</object>';
	}
	
	function Toggle(strSection){
		$(strSection).toggle();
	}