// Useful functions for FGSC site...

	function dynPageLoad(url,func) {
	// url - url to load
	// func - function to call when done.
	
		if (window.XMLHttpRequest) {
		// Standard XMLHttpRequest...
		
			req=new XMLHttpRequest();
			req.open("GET",url,false);
			req.send(null);
			
			// no problem just getting text here...
			func(req.responseText);
		}
		else if (window.ActiveXObject) {
		// IE/Windows ActiveX version

			dlObj=new ActiveXObject("Microsoft.XMLHTTP");
			
			function dynPageLoadStateChange() {
			// used by ActiveXObject as we have to make sure the object is 'ready' before we access the responseText...
			
				if (dlObj.readyState==4) {
					func(dlObj.responseText);
				}
			}
			
			dlObj.onreadystatechange=dynPageLoadStateChange;
			if (dlObj) {
				dlObj.open("GET",url,true);
				dlObj.send();
			}
		}
	}
	
	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_showHideLayers() { //v6.1-ms
	  var i,p,v,obj,args=MM_showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { 
		  v=args[i+2];
		  if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		  if (v=="showX") { obj.visibility="visible"; obj.display="inline"; }
		  else if (v=="hideX") { obj.visibility="hidden"; obj.display="none"; }
		  else obj.visibility=v;
	  }
	}
	
	function showTab(tabID,tabList) {
	// hides all tabs but one.
	// @param tabID 	- tab to show
	// @param tabList	- list of all tabs.
	
		tabs=tabList.split(",");
		for (i=0;i<tabs.length;i++) {
			tN=tabs[i];
			if (tN==tabID) a="showX"; else a="hideX";
			MM_showHideLayers("td_"+tN,"",a);
			o=document.getElementById("tab_"+tN);
			if (o) {
				if (tN==tabID) c="tab_on"; else c="tab_off";
				o.className=c;
			}
		}
		
		return false;
	}
	
	function changeClass(objID,newClass) {
		o=document.getElementById(objID);
		if (o) o.className=newClass;
	}
	