
	//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
	//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
	var iframeids=["WinBody"]
	
	//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
	var iframehide="no"
	
	//	Set this onload of Iframe if display is cut off bottom - ERA
	var iFrameExtra=0;
	
	var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
	
	var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers


	//	Used for highlight functions
	var HL = new Object;
	
	
	var GetMouseX = 0;
	var GetMouseY = 0;
		
	GN_Menu = new Object();		
	GN_Menu.Page = new Object();
	

	// Used by Drag Drop Functions
	mouseover=true;
	var DragDropObject;
	
	
	var IE = (navigator.appVersion.match(/\bMSIE\b/) == 'MSIE');
	
	
	
	//	Get Object Value from an ID
	//
	function GetID(ObjStr) {
		
		return document.getElementById(ObjStr);
	}
	

	//
	//	Get Object Value from an ID
	//
	function GetNode(ParentObject, ObjStr) {
		
		return ParentObject.getAttributeNode(ObjStr);
	}

	


	//_____________________________________________________________________________
	//
	//	TRIM
	//
	function Trim(Str) {

		var l = 0;
		var t = 0;
		var f = 0;

		l = Str.length;
		for (t=Str.length-1; t>=0; t--) {
			if (Str.charAt(t) != " ") {
				l = t+1;
				break;
			}
		}
		f = 0;
		for (t=0; t<=Str.length-1; t++) {
			if (Str.charAt(t) != " ") {
				f = t;
				break;
			}
		}
		return Str.substr(f, l-f);
	}
	
	
	//_____________________________________________________________________________
	//
	//  GET TOKEN: Get a value in a delimited str
	//
	function GetToken(Str, Position, FindStr) {

		var	u 	= 0;
		var c   = 0;
		var s   = 0;
		var e   = 0;
		for (var t=0;t<Str.length;t++) {
			c++;
			u = Str.indexOf(FindStr, u + 1);
			if (u == -1) {	// EOL
				e = Str.length - u;
				if (c < Position) {
					Str = '';
					break;
				}
			} else {
				e = u - s;
			}
			if (c == Position) {
				Str  = Str.substr(s, e);
				break;
			}
			s = u + 1;
		}
		return Str;
	}
	
	
	//_____________________________________________________________________________
	//
	//	Return the Number Of Items in a String Listy
	//
	function ListLen(Str, DelStr) {
		if (Str==undefined) {
			return -1;
		}
		var c = Str.split(DelStr);
		return c.length;
	}


	function ShowPage(Page, Target) {
		iFrameExtra=0;
		if (Target==undefined) {
			Target = 'WinBody';
		}
		window.open(Page, Target); 
	}
	
	
	function ResizeCaller() {
		var dyniframe=new Array()
		
		for (i=0; i<iframeids.length; i++){
			if (document.getElementById)
				resizeIframe(iframeids[i])
				//reveal iframe for lower end browsers? (see var above):
			if ((document.all || document.getElementById) && iframehide=="no"){
				var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
				tempobj.style.display="block"
			}
		}
	}
	
	function ResizeIframe(frameid){
		var currentfr=document.getElementById(frameid)
		if (currentfr && !window.opera){
			currentfr.style.display="block"
			if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) { //ns6 syntax
				currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight+iFrameExtra; 
	
				// Menu BackGround
				var MBG = document.getElementById('BGCell');
				MBG.height = Number(currentfr.height) - 50;
		
				//var MBT = document.getElementById('BGTbl');
				//MBT.height = Number(currentfr.height) - 50;
	
			} else if (currentfr.Document && currentfr.Document.body.scrollHeight) { //ie5+ syntax
				currentfr.height = currentfr.Document.body.scrollHeight;
		
				// Menu BackGround
				var MBG = document.getElementById('BGCell');
				MBG.height = Number(currentfr.height);
		
				var MBT = document.getElementById('BGTbl');
				MBT.height = Number(currentfr.height);
			}
			
			if (currentfr.addEventListener)
				currentfr.addEventListener("load", readjustIframe, false)
			else if (currentfr.attachEvent){
				currentfr.detachEvent("onload", readjustIframe) // Bug fix line
				currentfr.attachEvent("onload", readjustIframe)
			}


	
		}
	}
	
	
	function ReadjustIFrame(loadevt) {
		var crossevt=(window.event)? event : loadevt
		var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
		if (iframeroot)
			ResizeIframe(iframeroot.id);
	}
	
	function LoadIFrame(iframeid, url){
		if (document.getElementById)
			document.getElementById(iframeid).src=url
		//iframeid.src=url;
		//alert(url);
	}
	
	
	//
	//	Create an HTML Element
	//
	function CreateElement(Owner, ElementID, ElementType, Style) {
		
		//	If Exists Remove
		if (Owner.getElementById(ElementID) != undefined) {
			if (Owner == document) {
				Owner.body.removeChild(Owner.getElementById(ElementID));
			} else {
				Owner.removeChild(Owner.getElementById(ElementID));
			}
		}

		//	Create New Element
		var NewElement = document.createElement(ElementType); // div, span, table, th, td, tr, etc...
		NewElement.id = ElementID;
		
		//	Add To Owner Object
		if (Owner == document) {
			var NE = Owner.body.appendChild(NewElement);
			var vStyle = Owner.getElementById(ElementID).style;
		} else {
			var NE = Owner.appendChild(NewElement);
			var vStyle = Owner.getElementById(ElementID);
		}

		//	Set Style
		for (t=1; t<=ListLen(Style, ';'); t++) {
			var prop = GetToken(Style, t, ';');
			vStyle[Trim(GetToken(prop, 1, ':'))] = Trim(GetToken(prop, 2, ':'));
		}
		
		//	Return Object
		return NE;
		
	}


	function IFrameDefaultContent() {
		
		var Cont = '<html>';
			Cont = Cont + '<head>';
			Cont = Cont + '<title>GalaxyNet Online - Report View</title>';
			Cont = Cont + '	<script language="JavaScript" src="/javascript/prototype.js"></script>';
			Cont = Cont + '	<script language="JavaScript" src="/javascript/Functions.js"></script>';
			Cont = Cont + '</head>';
			Cont = Cont + '<HTML><body STYLE="background-color:transparent" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">';
		return Cont;
	}

	//
	//
	//
	function WriteIFrame(WindowName, HTML) {
		
		WindowName.document.write(HTML);
																				   
	}


	
	function CreateIFrame(WindowName, IFrameName, Src, AllowScroll) {
		if (AllowScroll == undefined){
			AllowScroll = "no";
		}
		WriteHTML(WindowName, '<iframe id="' + IFrameName + '" allowtransparency="true" frameborder="0" style="width:100%; height:100%; z-index:0;" src="' + Src + '" scrolling="' + AllowScroll + '"></iframe>');

	}
	
	//
	//
	//
	function WriteHTML(WindowName, HTML) {
		WindowName.innerHTML = HTML;
	}
	
	
	//
	//
	//
	function AppendHTML(WindowName, HTML) {
		WindowName.innerHTML = WindowName.innerHTML + HTML;
	}
	
	//
	//
	//
	function PrependHTML(WindowName, HTML) {
		WindowName.innerHTML = HTML + WindowName.innerHTML;
	}
	
	//
	//
	//
	function LoadFlashMovieStr(WindowName, SWFFile, Width, Height, Version, Secure, SWFName) {

		if (Width == undefined) {
			Width = '100%';
		}
		if (Height == undefined) {
			Height = '100%';
		}

		if (Version == undefined) {
			Version = '7,0,19,0';
		}
		
		if (Secure == undefined) {
			Secure = 's';
		}
		
		if (SWFName == undefined) {
			SWFName = 'ABC';
		}
		
		var Str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http' + Secure + '://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + Version + '"';
			Str = Str + '	width="' + Width + '" height="' + Height + '" id="' + SWFName + '">';
			Str = Str + '	<param name="movie" value="' + SWFFile + '">';
			Str = Str + '	<param name="quality" value="high">';
			Str = Str + '	<param name="wmode" value="transparent">';
			Str = Str + '	<embed ';
			Str = Str + '		src="' + SWFFile + '" ';
			Str = Str + '		quality="high" ';
			Str = Str + '		pluginspage="http' + Secure + '://www.macromedia.com/go/getflashplayer" ';
			Str = Str + '		type="application/x-shockwave-flash" ';
			Str = Str + '		width="' + Width + '" ';
			Str = Str + '		height="' + Height + '"';
			Str = Str + '		wmode="transparent">';
			Str = Str + '	</embed>';
			Str = Str + '</object>';
		
		return Str;

	}
	
	//
	//
	//
	function LoadFlashMovie(WindowName, SWFFile, Width, Height, Version, Secure, SWFName) {

		WriteHTML(WindowName, LoadFlashMovieStr(WindowName, SWFFile, Width, Height, Version, Secure, SWFName));
		
	}

	//
	//
	//
	function LoadPDFStr(PDFile, Width, Height, ID) {
		var Str = '<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="' + Width + '" height="' + Height + '" id="' + ID +'" >';
			Str = Str + '	<param name="SRC" value="' + PDFile + '">';
			Str = Str + '	<embed  ';
			Str = Str + '		id="' + ID + '" ';
			Str = Str + '		src="' + PDFile + '" ';
			Str = Str + '		width="' + Width + '" ';
			Str = Str + '		height="' + Height + '"';
			Str = Str + '		 >';
			Str = Str + '	</embed>';
			Str = Str + '</object>';
		
		return Str;
	}
	
	
		
	//
	//
	//
	function LoadPDF(WindowName, PDFile, Width, Height, ID) {
		WriteHTML(WindowName, LoadPDFStr(PDFile, Width, Height, ID));
	}


	//
	//
	//
	function LoadXLS(WindowName, File, Width, Height) {
		CreateIFrame(WindowName, 'Excel', File);
		//WriteHTML(WindowName, LoadXLSStr(File, Width, Height));
	}


	//
	//
	//
	function LoadDOC(WindowName, File, Width, Height) {
		CreateIFrame(WindowName, 'Doc', File);
		//WriteHTML(WindowName, LoadXLSStr(File, Width, Height));
	}


	//
	//	Create an HTML Element and Fetch a URL
	//
	function GetHTTPNewWindow(Owner, ElementID, ElementType, Style, HTTP, LoadingMSG ) {
		GetHTTP(CreateElement(Owner, ElementID, ElementType, Style), HTTP, LoadingMSG);
	}
	

	//
	//	Fetch a URL and Insert Content into Window Name
	//	If WindowName = '' Just Return Content
	//
	function GetHTTP(WindowName, HTTP, LoadingMSG, onComplete, Append) {

		var xmlhttp;

		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			try {
				xmlhttp = new XMLHttpRequest();
			}	 
			catch (e) {
				alert("Your browser is not supporting XMLHTTPRequest");
				return false;
			}
		} else {
			xmlhttp = (window.XMLHttpRequest)? new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
				//new ActiveXObject("Microsoft.XMLHTTP");
		}
	

		var request = xmlhttp;
		request.open("GET", HTTP); 
		
		request.onreadystatechange = function() {

			if(request.readyState == 1) {
				if (!Append) {
					if (LoadingMSG == undefined) {
						WindowName.innerHTML = 'Loading...';
					} else {
						WindowName.innerHTML = LoadingMSG;
					}
				}
			}
			if(request.readyState == 4) {
				if (request.status == 200) { 

					if (WindowName!='') {
						if (Append==true) {
							AppendHTML(WindowName, request.responseText);
						} else {
							WriteHTML(WindowName, request.responseText);
						}
					}

					if (onComplete!=undefined) {
						onComplete(request.responseText);
					} 
					
					request = undefined;
					
					//} else {
					///	var ret = request.status;
					//	request = undefined
					//	return ret;
					//}
				} else {
					alert('Background Load Error: ' + HTTP + ' [ ' + request.status +' ]');
				}
				request = undefined;
			}
			
		} 
		
		request.send(null); 
	}
	
	//
	//
	//
	GetHTTPAJAX = function(WindowName, HTTP, onAJaxSuccess, LoadingMSG, PostText) {
		
		
		if (WindowName==undefined) {
			alert('Developer: Your WindowName ID Object has not been Defined :: ' + window.location.hostname + window.location.pathname + window.location.search + ' :: ' + HTTP);
			return false;
		}
		

		AJaxFailed = function (request) {
			alert('Background Load Error: ' + HTTP + ' [ ' + request.status +' ]');
		}

	
		if (typeof(LoadingMSG) != 'string' && eval(LoadingMSG) == undefined) {
			WindowName.innerHTML = 'Loading...';
		} else {
			WindowName.innerHTML = LoadingMSG;
		}
		
		me = 'get';
		ct = undefined;
		
		if (PostText != undefined) {
			me = 'post';
			ct = 'application/x-www-form-urlencoded';
		}

		if (onAJaxSuccess != undefined) {
			new Ajax.Updater(WindowName, HTTP, {asynchronous:true, evalScripts:true, method:me, onFailure:AJaxFailed, onComplete:onAJaxSuccess, parameters:PostText, contentType:ct});
		} else {
			new Ajax.Updater(WindowName, HTTP, {asynchronous:true, evalScripts:true, method:me, onFailure:AJaxFailed, parameters:PostText, contentType:ct});
		}
		
	}
	
	//
	//
	//
	function GetHTTPAJAXNewWindow(Owner, ElementID, ElementType, Style, HTTP, onAJaxSuccess, LoadingMSG) {
		
		GetHTTPAJAX(CreateElement(Owner, ElementID, ElementType, Style), HTTP, onAJaxSuccess, LoadingMSG);
		
	}

	
	//
	//
	//
	function GetObject(Name) {
		return document.all? document.all[Name] : document.getElementById(Name);
	}

	//
	//	New Window
	//
	function NewWindow(Url, WindowName, w, h, WindowParams) {
		if (WindowParams==undefined) {
			WindowParams = 'resizable=1,menubar=0,scrollbars=1,toolbar=0';
		}
		cal = window.open(Url, WindowName, WindowParams);
		//cal.window.resizeTo(parent.document.body.clientWidth - 10, parent.document.body.clientHeight - 10);
		if (w!=undefined && h!= undefined) {
			cal.window.resizeTo(w, h);
		}
		cal.window.focus();
		if (cal != null) {
			if (cal.opener == null) {
				cal.opener = self;
			}
		}
		
		//cal.window.moveTo((cal.window.screen.availWidth / 2) - (cal.document.body.clientWidth / 2), (cal.window.screen.availHeight / 2) - (cal.document.body.clientHeight / 2));
	}
	
	//
	//	Resize Window - SELF
	//
	function ResizeThisWindow(w, h, resizable) {
		if (w.indexOf('%') > 0) {
			w = GetToken(w, 1, '%') * 0.01;
			w = self.window.screen.availWidth * w;
		}
		if (h.indexOf('%') > 0) {
			h = GetToken(h, 1, '%') * 0.01;
			h = self.window.screen.availHeight * h;
		}
		if (resizable==undefined) {
			//resizable
		}
		 self.window.resizeTo(w, h);
		 self.window.moveTo((self.window.screen.availWidth / 2) - (w / 2), (self.window.screen.availHeight / 2) - (h / 2));
		 
	}


	//
	//	Show or Hide Tool Bar
	//
	function ShowToolBars(show) {
		alert(window.menubar.visible);
		//self.window.menubar.visible = show;
	}
	
	
	//
	// Retrive a specific URL parameter
	// else return all URL parameters
	//
	function getURLParameterVal(param) {
		var val = "";
		var qs = window.location.search;
		var start = qs.indexOf(param);
		
		if (start != -1) {
			start += param.length + 1;
			var end = qs.indexOf("&", start);
			if (end == -1) {
				end = qs.length
			}
			val = qs.substring(start,end);
		}
		//alert(val);
		return val;
	}
	
	//
	// Retrive a specific COOKIE parameter
	// else return all COOKIE parameters
	//
	function getCookieParameterVal(param) {
		var val = "";
		var qs = document.cookie;
		var start = qs.indexOf(param);
		
		if (start != -1) {
			start += param.length + 1;
			var end = qs.indexOf(";", start);
			if (end == -1) {
				end = qs.length
			}
			val = qs.substring(start,end);
		}
		//alert(val);
		return unescape(val);
	}
	

	//
	// Read Cookie for Background image. If cookie doesn't exist, use
	// the default image.
	//
	function getBGImageForPage(ImgDivID) {
		var theBGImage		= getCookieParameterVal("BGIMAGE");		
		var theBGLoc		= "https://online.travelinc.com/gnr/Images/bg/";
		
		if (theBGImage == '' || theBGImage == 'undefined') {
			// Not defined, use default
			theBGImage	= "GalaxyBG_02.jpg"
			theBGLoc	= "https://online.travelinc.com/gnr/Images/"
		}
		
		theBGImage	= theBGImage.toLowerCase();
		theBGLoc	= theBGLoc.toLowerCase();
		
		if (theBGImage.substring(0,4) == 'http') {
			theBGLoc = '';
		}
		
		// Set image
		var main_image = new Image();
		if (theBGLoc == '') {
			main_image.src = theBGImage;
		} else {
			main_image.src = theBGLoc + theBGImage;
		}
		//alert('.' + theBGLoc + '.' + theBGImage + '.');
		ImgDivID.src = main_image.src;
	}
	
	//
	// This will check the size of the window and return
	// the width and height in a comma delimited value
	// which can then either be used with an Array or
	// GetToken(Str, POS, FindStr) which in this case is
	// GetToken(val, 1, ",") for width or
	// GetToken(val, 2, ",") for height
	//
	
	function GetWindowSize() {

		var myWidth = 0, myHeight = 0, val = '';
		if ( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		} else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
		
		val = myWidth + "," + myHeight;
		return unescape(val);
	}
	
	
	function GetWindowHeight() {
		var myWidth = 0, myHeight = 0, val = '';
		if ( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		} else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
		
		return unescape(myHeight);
	}

	function GetWindowWidth() {
		var myWidth = 0, myHeight = 0, val = '';
		if ( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		} else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
		
		return unescape(myWidth);
	}
	
	
	function GetObjectHeight(Obj, OrHeight) {

	if (Obj.style.height!=undefined) {
			
			return Obj.style.height
			
		} else {
		
			return OrHeight;
			
		}
	}

	function GetObjectWidth(Obj, OrWidth) {
		
		if (Obj.style.width!=undefined) {
			
			return Obj.style.width
			
		} else {
		
			return OrWidth;
			
		}


	}
	

	

	
	//=====================================
	// REPLACE STR: Replace Str function
	//=====================================
	function ReplaceStr(Str, FindStr, ReStr) {
	
		var UStr = Str.toUpperCase();
		var u = 0;
		
		FindStr = FindStr.toUpperCase();
		u = 0;
		for (var t=0;t<Str.length;t++) {
			if (u==0) {
				u = UStr.indexOf(FindStr);
			} else {
				u = UStr.indexOf(FindStr, u - FindStr.length);
			}
			if (u == -1) {
				break;
			}
			UStr = UStr.substr(0, u) + ReStr + UStr.substr(u + FindStr.length, UStr.length);
			Str = Str.substr(0, u) + ReStr + Str.substr(u + FindStr.length, Str.length);
			t += ReStr.length;
		}
		return Str;
	}
	
	//===================================
	// This will encode or unencode HTML
	//===================================
	function EUhtml(type, str) {
		if (type == 'E') {
			return escape(str);
		}
		if (type == 'U') {
			return unescape(str);
		}
	}
	
	
	
	//
	//	Target Content
	//	Takes innerHTML Content from one ID to Another ID Tag
	//
	function TargetContent(FromID, ToID, Method) {
		var Str;

		Str = FromID.innerHTML;
		
		if (Method.toUpperCase()==undefined) {
			Method = "APPEND";
		}
		
		if (Method.toUpperCase()=="OVERWRITE") {
			FromID.innerHTML = '';
			try {
				FromID.style.display = 'none';
			} catch(e) {}
			ToID.innerHTML 	 = Str;
		}
		
		if (Method.toUpperCase()=="MOVE") {
			FromID.innerHTML = '';
			ToID.innerHTML 	 = Str;
		}
		
		if (Method.toUpperCase()=="OVERWRITEONLY") {
			ToID.innerHTML 	 = Str;
		}
		
		if (Method.toUpperCase()=="APPEND") {
			FromID.innerHTML = '';
			try {
				FromID.style.display = 'none';
			} catch(e) {}
			ToID.innerHTML 	 = ToID.innerHTML + Str;
		}
		
		if (Method.toUpperCase()=="APPENDONLY") {
			ToID.innerHTML 	 = ToID.innerHTML + Str;
		}
		

	}
	
	
	

	function StripCharacter(words,character) {
		//documentation for this script at http://www.shawnolson.net/a/499/
		var spaces = words.length;
		for(var x = 1; x<spaces; ++x){
			words = words.replace(character, "");   
		}
		return words;
	}
	
	

	function ChangeClassValue(theClass,element,value) {
		var cssRules;
		
		if (document.all) {
			cssRules = 'rules';
		} else if (document.getElementById) {
			cssRules = 'cssRules';
		}
		for (var S = 0; S < document.styleSheets.length; S++){
			for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
				if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
					document.styleSheets[S][cssRules][R].style[element] = value;
				}
			}
		}	
	}



	function CheckUncheckAll(theElement) {
		var theForm = theElement.form, z = 0;
			for(z=0; z<the.length;z++){
				if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall') {
					theForm[z].checked = theElement.checked;
				}
			}
	}
	
	
	
	function checkUncheckSome(controller,theElements) {
	
		// theElements is an array of objects designated as a comma separated list of their IDs
		// If an element in theElements is not a checkbox, then it is assumed
		// that the function is recursive for that object and will check/uncheck
		// all checkboxes contained in that element
		
		
		var formElements = theElements.split(',');
		var theController = document.getElementById(controller);
		
		for(var z=0; z<formElements.length;z++){
			theItem = document.getElementById(formElements[z]);
			if(theItem){
				
				if(theItem.type){
					if(theItem.type == 'checkbox' && theItem.id != theController.id){
						theItem.checked = theController.checked;
					}
				} else {
					
					var nextArray = '';
					
					for(var x=0;x <theItem.childNodes.length;x++){
						if(theItem.childNodes[x]){
							if (theItem.childNodes[x].id){
						  		nextArray += theItem.childNodes[x].id+',';
							}
					  	}
					 }
					 
					 checkUncheckSome(controller,nextArray);
				}
			}
		}
	}

	
	
	
	function ChangeImgSize(objectId,newWidth,newHeight) {
		
		imgString = 'theImg = document.getElementById("'+objectId+'")';
		
		eval(imgString);
		
		oldWidth = theImg.width;
		oldHeight = theImg.height;
		
		if(newWidth>0){
			theImg.width = newWidth;
		} 
		if(newHeight>0){
			theImg.height = newHeight;
		} 
	
	}
	
	function changeColor(theObj,newColor){
	  eval('var theObject = document.getElementById("'+theObj+'")');
	  if(theObject.style.backgroundColor==null){theBG='white';}else{theBG=theObject.style.backgroundColor;}
	  if(theObject.style.color==null){theColor='black';}else{theColor=theObject.style.color;}
	  //alert(theObject.style.color+' '+theObject.style.backgroundColor);
      switch(theColor){
	    case newColor:
		  switch(theBG){
			case 'white':
		      theObject.style.color = 'black';
		    break;
			case 'black':
			  theObject.style.color = 'white';
			  break;
			default:
			  theObject.style.color = 'black';
			  break;
		  }
		  break;
	    default:
		  theObject.style.color = newColor;
		  break;
	  }
	}





		
	//
	//
	//	
	function GetMouseCoords(event)	{
		GetMouseX=event.clientX;
		GetMouseY=event.clientY;
	}
	
	
	//
	//
	//
	MoveObjectToMouse = function(DivObj, BottomOffSet) {
			
		xHeightVal 			= GetWindowHeight();
		xDiffVal   			= xHeightVal - GetMouseY;
		DivObj.style.left	= GetMouseX;
		
		if (BottomOffSet==undefined) {
			BottomOffSet = 100;
		}
		
		if (xDiffVal <= BottomOffSet) {
			// This will move the popup div from disappearing off the page
			// The popup will appear above the mouse
			DivObj.style.top				= GetMouseY - BottomOffSet;
			
		} else {
			// The popup will appear below the mouse
			DivObj.style.top				= GetMouseY;
			
		}
		
	
	}
	
	
	
	
	//
	//	Create Sub Window
	//
	CreateSubWindow = function(NewIDName, ParentObject, WindowProperties) {
		/*
			WindowProperties {  // All Optional
			 	WindowStyle:
				WindowClass:
			  	TitleStyle:
				TitleClass:
			  	ContentStyle:
				ContentClass:
				AjaxUrl:
				AjaxOnSuccess:
				AjaxFormValue:
				IFrameUrl:
				IFrameStyle:
				IFrameClass:
				IFrameMaxWidth:
				IFrameMaxHeight:
				IFrameOnSuccess:
				LoadingMessage:
				LoadingStyle:
				LoadingClass:
				TitleContent:
				BodyContent:
				BtnMaximize:
				BtnClose:
				BtnMinimize:
				Width:
				Height:
				Top:
				Left:
				OnWindowClose: Function
				OnWindowCloseOk: Function
			}
		
		*/
	
	
		var StrWinID = "Window" + NewIDName;
		var SubStrWinID = "SubWindow" + NewIDName;
	
		//undefined, {Url:'https://services.travelinc.com/ui/ptp/cf/AJAX_EMailForm.cfm'});
		if (WindowProperties==undefined) {
			WindowProperties = new Object();					
		}
		

		if (WindowProperties.ShadowStyle==undefined) {

			WindowProperties.ShadowStyle = "filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#66DDDDDD', EndColorStr='#99999999');";
		}

		if (WindowProperties.ShadowStyle==undefined) {

			WindowProperties.ShadowStyle = '';
		}
		
	


		if (WindowProperties.WindowStyle==undefined) {

			WindowProperties.WindowStyle = "text-align:left; z-index:1000;position:absolute; width:200; ";
			WindowProperties.WindowStyle = WindowProperties.WindowStyle + "font-family:Arial, Helvetica, sans-serif; font-size:12px; padding: 8;";
			WindowProperties.WindowStyle = WindowProperties.WindowStyle + "background-color:#E0ECFF;";
			
			WindowProperties.WindowStyle = WindowProperties.WindowStyle + "border-color:#999999; border-width:1; border-style:solid; ";
			WindowProperties.WindowStyle = WindowProperties.WindowStyle + "border-top-color:#DDDDDD; border-top-width:1; border-top-style:solid; ";
			WindowProperties.WindowStyle = WindowProperties.WindowStyle + "border-left-color:#DDDDDD; border-left-width:1; border-left-style:solid; ";
		}

		if (WindowProperties.WindowClass==undefined) {

			WindowProperties.WindowClass = '';
		}


		if (WindowProperties.TitleContent==undefined) {

			WindowProperties.TitleContent = '';
		}
		
		var TitleHTML  			= '';
		var IFrameHTML 			= '';
		var TitleButtons		= '';
		var StyleMaximizeBtn 	= 'display:none';
		var StyleCloseBtn 	 	= 'display:none';
		var StyleNormalizeBtn 	= 'display:none';
		var StyleMinimizeBtn 	= 'display:none';


		if (WindowProperties.BtnMaximize  == true) {
			StyleMaximizeBtn = 'display:inherit';
		}
		if (WindowProperties.BtnClose  == true) {
			StyleCloseBtn = 'display:inherit';
		}
		if (WindowProperties.BtnNormalize == true) {
			StyleNormalizeBtn = 'display:inherit';
		}
		if (WindowProperties.BtnMinimize == true) {
			StyleMinimizeBtn = 'display:inherit';
		}
		

		if (IE==true) {
			TitleButtons = TitleButtons + '<div id="' + StrWinID + 'Buttons" style="display:inline; position:absolute; white-space:nowrap;"><span id="' + StrWinID + 'btnTable">';
		} else {
			TitleButtons = TitleButtons + '<div id="' + StrWinID + 'Buttons" style="position:absolute; display:table-cell; width:100;"><table id="' + StrWinID + 'btnTable"><tr><td>';
		}
		TitleButtons = TitleButtons + '<img id="' + StrWinID + 'MinimizeBtn" 	src="/UI/Images/Windows/Window_MinimizeBtn.png"   hspace="1" title="Minimize" onclick="' + StrWinID + '.MinimizeWindow()"  		style=" cursor:pointer; ' + StyleMinimizeBtn + '">'
		TitleButtons = TitleButtons + '<img id="' + StrWinID + 'NormalizeBtn" 	src="/UI/Images/Windows/Window_NormalizeBtn.png"  hspace="1" title="Restore Down" onclick="' + StrWinID + '.NormalizeWindow()"  style=" cursor:pointer;'  + StyleNormalizeBtn + '">'
		TitleButtons = TitleButtons + '<img id="' + StrWinID + 'MaximizeBtn" 	src="/UI/Images/Windows/Window_MaximizeBtn.png"   hspace="1" title="Mazimize" onclick="' + StrWinID + '.MaximizeWindow()"  		style=" cursor:pointer; ' + StyleMaximizeBtn + '">'
		TitleButtons = TitleButtons + '<img id="' + StrWinID + 'CloseBtn" 		src="/UI/Images/Windows/Window_CloseBtn.png"      hspace="1" title="Close" onclick="' + StrWinID + '.CloseWindow()" 			style=" cursor:pointer; ' + StyleCloseBtn + '">'
		TitleButtons = TitleButtons + '</td></tr></table></div>';
		

		if (WindowProperties.TitleStyle==undefined) {

			WindowProperties.TitleStyle = "whitespace:nowrap; font-weight:bold; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#FFC3D9FF', EndColorStr='#FFE0ECFF'); width:200; height:20; padding:4; padding-left:10; ";
			WindowProperties.TitleStyle = WindowProperties.TitleStyle + "background-color:#C3D9FF; ";
			WindowProperties.TitleStyle = WindowProperties.TitleStyle + "border-bottom-width:2; border-bottom-color:#DDDDDD; border-bottom-style:solid;";
		}
		
		if (WindowProperties.TitleClass==undefined) {

			WindowProperties.TitleClass = '';
		}
			
		if (WindowProperties.TitleContent == undefined) {
		
			WindowProperties.TitleContent = '';
		}
		
		
		if (IE==true) {
			TitleHTML = '<div onmousedown="' + StrWinID + '.StartDrag()" id="Title' + NewIDName + '" style="' + WindowProperties.TitleStyle +'; display:inline;" class="' + WindowProperties.TitleClass + '">' +  WindowProperties.TitleContent + TitleButtons + '</div>';
		} else {
			TitleHTML = '<div onmousedown="' + StrWinID + '.StartDrag()" id="Title' + NewIDName + '" style="' + WindowProperties.TitleStyle +';  class="' + WindowProperties.TitleClass + '">' +  WindowProperties.TitleContent +  TitleButtons + '</div>';				
		}
		
		
		//
		//	Content
		//
		if (WindowProperties.ContentStyle==undefined) {

			WindowProperties.ContentStyle = 'background-color:#FFFFFF';
		}
		
		if (WindowProperties.ContentClass==undefined) {

			WindowProperties.ContentClass = '';
		}


		//
		//	IFrame Setup
		//
		if (WindowProperties.IFrameStyle==undefined) {

			WindowProperties.IFrameStyle = 'background-color:#FFFFFF; border:0;';
		}
		
		if (WindowProperties.IFrameClass==undefined) {

			WindowProperties.IFrameClass = '';
		}
		
		if (WindowProperties.IFrameOnSuccess==undefined) {
			WindowProperties.IFrameOnSuccess = function () {};
		}


		if (WindowProperties.AjaxOnSuccess==undefined) {
			WindowProperties.AjaxOnSuccess = function () {};
		}
		
		if (WindowProperties.IFrameUrl != undefined) {
			var VURL = WindowProperties.IFrameUrl.split('?');
			if (VURL.length==1) {
				WindowProperties.IFrameUrl = WindowProperties.IFrameUrl + '?JSWindowID=' + NewIDName;
			} else {
				WindowProperties.IFrameUrl = WindowProperties.IFrameUrl + '&JSWindowID=' + NewIDName;
			}
			
			IFrameHTML = '<iframe width="100%" height="100%" onload="' + StrWinID + '.IFrameOnSuccess(this);" id="IFrame' + NewIDName + '" src="' + WindowProperties.IFrameUrl + '" style="' + WindowProperties.IFrameStyle + '" class="'+ WindowProperties.IFrameClass + '" frameborder="0" allowtransparency="1"></iframe>';
		}
		
		
		
		//
		//	Loading Window Setup
		//	
		if (WindowProperties.LoadingStyle==undefined) {

			WindowProperties.LoadingStyle = 'background-color:#FFFFFF; ';
		}
		
		if (WindowProperties.LoadingClass==undefined) {

			WindowProperties.LoadingClass = '';
		}
		
		if (WindowProperties.LoadingMessage == undefined) {
				WindowProperties.LoadingMessage = '<div style="padding:10; width:200;">Preparing, Please Wait...</div>';
		}



		//
		//	Body Setup
		//
		if (WindowProperties.BodyContent==undefined) {

			WindowProperties.BodyContent = '';
		}


		
		//
		//	HTML STRING :: Build the Window
		//
		var DivHTML = '';
		DivHTML = DivHTML + '	<div id="SubWindow' + NewIDName + '" CONTENTEDITABLE="false"><div CONTENTEDITABLE="false" id="Window' + NewIDName + '"  style="' + WindowProperties.WindowStyle + '" class="' + WindowProperties.WindowClass + '">';
		DivHTML = DivHTML + 		TitleHTML;
		DivHTML = DivHTML + '    	<div id="Content' + NewIDName + '" style="' + WindowProperties.ContentStyle +'" class="' + WindowProperties.ContentClass + '">' + WindowProperties.BodyContent + IFrameHTML + '</div>';
		DivHTML = DivHTML + '		<div id="Loading' + NewIDName + '" style="display:none;position:absolute;z-index:2000;' + WindowProperties.LoadingStyle + '" class="' + WindowProperties.LoadingClass + '"></div>';
		DivHTML = DivHTML + '	</div></div>';
		DivHTML = DivHTML + '<div id="Shadow' + NewIDName + '" style="display:none;position:absolute;z-index:999;' + WindowProperties.ShadowStyle + '" class="' + WindowProperties.ShadowClass + '">&nbsp;</div>';


		//
		//	Add HTML to Browser Object :: This execeutes in the browser
		//
		ParentObject.innerHTML = ParentObject.innerHTML + DivHTML;
		
		
		//
		//	Javascript to handle Window Functions
		//
		var WinDiv = new Object();

		WinDiv = GetID("Window" + NewIDName);
			
		var TitDiv  	= GetID("Title"   + NewIDName);	
		var ShDiv   	= GetID("Shadow"  + NewIDName);
		var ConDiv  	= GetID("Content" + NewIDName);
		var LoadDiv 	= GetID("Loading" + NewIDName);
		var Buttons 	= GetID(StrWinID  + "Buttons");
		var tblButtons 	= GetID(StrWinID  + "btnTable");
		
	
		//
		//	Set Reference to Content Div
		//
		WinDiv.Content = ConDiv;
	
		WinDiv.IFrameOnSuccess = function(IFrame) {
			LoadDiv.style.display = 'none';
			WindowProperties.IFrameOnSuccess(IFrame);
		}


		//
		//	Setup IFrame
		//
		if (WindowProperties.IFrameUrl != undefined) {
			LoadDiv.style.display = 'block';
			LoadDiv.innerHTML	  = WindowProperties.LoadingMessage;
		}


		//
		//	Function Resize
		//
		WinDiv.Resize = function(SizeWidth, SizeHeight) {
			
			if (SizeWidth != undefined) {
				ConDiv.style.width = SizeWidth;
				WinDiv.style.width = SizeWidth;
			}
			
			if (SizeHeight != undefined) {
				ConDiv.style.height = SizeHeight;
				WinDiv.style.height = SizeHeight + TitDiv.offsetHeight;
			}

			WinDiv.style.left  = (GetWindowWidth() / 2) - (WinDiv.offsetWidth  / 2);
			WinDiv.style.top  = (GetWindowHeight() / 2) - (WinDiv.offsetHeight / 2);

			if (WinDiv.offsetLeft < 1) {
				WinDiv.style.left  = 5;
			}

			if (WinDiv.offsetTop < 1) {

				WinDiv.style.top  = 5;
			}
			
			
			
			if (SizeWidth != undefined) {
				WinDiv.onresize(true);
			}
			
			if (SizeHeight != undefined) {
				WinDiv.onresize(true);
			}
		}
		

		//
		//	IE Edit Mode Only
		//	
		WinDiv.onresizeend = function() {

			if (event.x > WinDiv.offsetLeft) {
				var NewWidth = event.x - WinDiv.offsetLeft;
			} else {
				var NewWidth = WinDiv.offsetWidth + (WinDiv.offsetLeft - event.x);
			}
			
			if (event.y > WinDiv.offsetTop) {
				var NewHeight = event.y - WinDiv.offsetTop;
			} else {
				var NewHeight = WinDiv.offsetHeight + (WinDiv.offsetTop - event.y);
			}

			WinDiv.Resize(NewWidth, NewHeight);
			WinDiv.PositionShadow();
		}
		
		
		//
		//	Event Window ONRESIZE
		//
		WinDiv.onresize = function(ManualCall) {

			if (ManualCall == undefined) {
				WinDiv.Resize();
			}
			
			
			WinDiv.PositionShadow();
			
			
			//
			//  Center Loading Message
			//
			LoadDiv.style.left 		= (WinDiv.offsetWidth / 2) - (LoadDiv.offsetWidth / 2);
			LoadDiv.style.top 		= (WinDiv.offsetHeight / 2) - (LoadDiv.offsetHeight / 2);
			
			//
			//	Set Title Properties
			//
			if (TitleHTML != '') {
				if (IE==true) {
					TitDiv.style.width = WindowProperties.Width;
					Buttons.style.left  = WinDiv.offsetWidth - tblButtons.offsetWidth - 20;
				} else {
					TitDiv.style.width = WindowProperties.Width - 15;
					Buttons.style.top   = 10;
					Buttons.style.left  = WindowProperties.Width - (tblButtons.offsetWidth);
					TitDiv.style.height = 15;
				}
			}
			
			
		}
		
		
		
		//
		//	IE Only
		//
		WinDiv.StartDrag =function() {
			//document.execCommand("2D-position",false,true);
			//getID(SubStrWinID).contentEditable=false;

			//StartDragDrop(this, ' + StrWinID + ');

		}

		
		
		//
		//	IE Only :: Event Window ONMOVESTART
		//
		WinDiv.onmovestart = function() {
			ShDiv.style.display = 'none';
		}
		

		//
		//	Event Window ONMOVEEND
		//
		WinDiv.onmoveend = function() {
			WinDiv.PositionShadow();
		}


		//
		//	Function Position Shadow
		//
		WinDiv.PositionShadow = function() {
			ShDiv.style.display = 'none';
			ShDiv.style.left 	= WinDiv.offsetLeft - 3;
			ShDiv.style.top 	= WinDiv.offsetTop - 3;
			ShDiv.style.height 	= WinDiv.offsetHeight + 6;
			ShDiv.style.width 	= WinDiv.offsetWidth + 6;
		}
		
		
		
		//
		//	Function WindowClose
		//
		WinDiv.CloseWindow = function() {

			if (WindowProperties.OnWindowClose != undefined) {
				WindowProperties.OnWindowClose(WinDiv, false);
			}
			
			GetID(SubStrWinID).outerHTML = '';
			
		}


		//
		//	Function CloseWindowOk
		//
		WinDiv.CloseWindowOk = function() {
			if (WindowProperties.OnWindowCloseOk != undefined) {
				WindowProperties.OnWindowCloseOk(WinDiv, true);
			}
			WinDiv.outerHTML = '';
			ShDiv.outerHTML = '';

		}

		


		WinDiv.Resize(WindowProperties.Width, WindowProperties.Height);
		
		
		WinDiv.OnAjaxSuccess = function() {
			WinDiv.PositionShadow();
			WindowProperties.AjaxOnSuccess();
		}
		

		
		
		dv = GetID("Content" + NewIDName);
		
		//
		//	AJAX
		//
		if (WindowProperties.AjaxUrl != undefined) {
			var VURL = WindowProperties.AjaxUrl.split('?');
			if (VURL.length==1) {
				WindowProperties.AjaxUrl = WindowProperties.AjaxUrl + '?JSWindowID=' + NewIDName;
			} else {
				WindowProperties.AjaxUrl = WindowProperties.AjaxUrl + '&JSWindowID=' + NewIDName;
			}
			
			
			GetHTTPAJAX(dv, WindowProperties.AjaxUrl, WinDiv.OnAjaxSuccess, WindowProperties.LoadingMessage, WindowProperties.AjaxFormValues);
		}
		
		
		
		
		
		
		
		return WinDiv;
		
	}
	
	
	
	
	
	DumpObject = function(Obj) {
		gg = '';
		for (var i in Obj) {
			gg = gg + String(i) + ' | ';
		}
		alert(gg);
	}
	
	
	PostHTTPTargetForm = function(DivObj, HTTP, PostText, TargetWindow, WindowProperties) {

		if (WindowProperties == undefined) { 
			WindowProperties = '';
		}
		
		var FormText = '';
		
		FormText =FormText + '<form style="display:none" id="FORMW" method="post" target="' + TargetWindow + '" action="' + HTTP + '" >';

		var ObjArray = PostText.split('&');
		
		for (var t=0; t<ObjArray.length;t++) {
			
			ParamAndValue = ObjArray[t].split('=');
			
			FormText = FormText + '<input name="' + ParamAndValue[0] + '" value="' + ParamAndValue[1] + '">';
		}
		
		FormText =FormText + '</form>';
		
		//FormText =FormText + '<script>FORMW.submit();
		//script>';
		
		DivObj.innerHTML  =DivObj.innerHTML + FormText;		
		
		var myWindow=window.open('', TargetWindow, WindowProperties);
		myWindow.document.writeln(FormText);
		
		GetID("FORMW").submit();
		GetID("FORMW").outerHTML = '';
		
	}
	
	
	PrintHTML = function(DivObj, HTML) {

		DivObj.innerHTML = DivObj.innerHTML + '<iframe id="PRINTframe" style="position:absolute; left:-5000"></iframe>';
		PRINTframe.onload = function () {
											PRINTframe.document.body.innerHTML = HTML;
											PRINTframe.focus();
											PRINTframe.print();
										};
					
	}
	
	
	var vClockDiv;
	
	function StartClock(DivObj)	{
		
		if (DivObj != undefined) {
			vClockDiv = DivObj;
		}
		
		var today=new Date()
		var h=today.getHours()
		var m=today.getMinutes()
		var s=today.getSeconds()
		// add a zero in front of numbers<10
		//m=checkTime(m)
		//s=checkTime(s)
		//DivObj.innerHTML=h+":"+m+":"+s;
		vClockDiv.innerHTML=new Date();
		t=setTimeout('StartClock()',500)
	}

	function checkTime(i) {
		if (i<10) 
		  {i="0" + i}
	  return i
	}
	
	
	
	
	
	//
	//	Show / Hide Table Column
	//
	function ShowTableColumn(tableid, colno, show) {

		var stl;
		
		if (show) 
				stl = ''
		else    stl = 'none';
	
		var tbl  = document.getElementById(tableid);
		var rows = tbl.getElementsByTagName('tr');
	
		for (var row=0; row<rows.length;row++) {
		  var cels = rows[row].getElementsByTagName('td')
		  cels[colno].style.display=stl;
		}
		
	  }
	  
	  
	  
	  //
	//	HIGHLIGHT -- Handles Mouse Over for a given containter
	//	Pass Color as '#AAAAAAA' or CSS ClassName 
	//
	function MouseOverHighlight(Obj, ContID, Color, ToolTip) {

		//  Save Original Color and Set New Color
		if (Color.substring(0, 1) != '#') {
			HL[ContID+'MO'] = Obj.className; 
			Obj.className   = Color;
		} else {  
			HL[ContID+'MO'] = Obj.bgColor;
			Obj.bgColor     = Color;
		}
		
		ShowToolTip(Obj, ToolTip, true);
		
	}

	//
	//	RESET -- Handles Mouse Over for a given containter
	//
	function MouseOutHighlight(Obj, ContID) {
		
		ShowToolTip(Obj, '', false);
		
		//	If on the already selected item do nothing
		if (HL[ContID] == Obj) {
			//	Set Back to Selected Color
			if (HL[ContID+'LastSelectColor'].substring(0, 1) != '#') {
				Obj.className = HL[ContID+'LastSelectColor'];
			} else {
				Obj.bgColor   = HL[ContID+'LastSelectColor'];
			}
			return
		}
		
	
		//	Set Color
		if (HL[ContID+'MO'].substring(0, 1) != '#') {
			Obj.className = HL[ContID+'MO'];
		} else {
			Obj.bgColor   = HL[ContID+'MO'];
		}
	}
	
		
	//
	//	SELECTED -- Handles Keeping the Object Highlighted even when MouseOut Occurs
	//
	function MouseClickHighlight(Obj, ContID, Color, CanReset, ResetTo) {

		if (HL[ContID] != undefined) {
			
			// Reset Color on Previous Clicked Item
			if (HL[ContID+'LastColor'].substring(0, 1) != '#') {
				HL[ContID].className = HL[ContID+'LastColor'];
			} else {
				HL[ContID].bgColor   = HL[ContID+'LastColor'];
			}
	
		}
	
		//	Remember this Obj so it can be reset when another item is clicked
		HL[ContID] = Obj;
		
		// 	Save Last Class Name
		//	HL[ContID+'MO'] Should Be Set By MouseOver Func
		HL[ContID+'LastColor'] = HL[ContID+'MO'];
		
		//	Set Color IF Defined ELSE we use the color already set by MouseOverHighlight func
		if (Color != undefined) {
			if (Color.substring(0, 1) != '#') {
				Obj.className   = Color;
			} else {  
				Obj.bgColor     = Color;
			}
			
			HL[ContID+'LastSelectColor'] = Color;
		}
		
	}


	//
	//	Create HOVER -- TOOLTIP
	//
	function ShowToolTip(HoverObj, Text, Show, ClassName) {
		
		try {
			
			if (Show && Text != undefined) {
				//	Name a Div Tag appToolTip		
				appToolTip.style.top = MouseObj.y - 60;
				appToolTip.style.left = MouseObj.x;
				
				if (ClassName==undefined) {
					ClassName = 'ToolTip';
				}
				
				appToolTip.className = ClassName;
				WriteHTML(appToolTip, Text);
				appToolTip.style.display = '';
				
			} else {
				appToolTip.style.display = 'none';
			}
			
		}	 
		catch (e) {
			return false;
		}

	}

	
	
	//
	//	SELECTED -- Handles Keeping the Object Highlighted even when MouseOut Occurs
	//
	function ShowDivController(DivObj, ControlID) {

		if (HL[ControlID] != undefined) {
			
			// Reset Previous Div
			HL[ControlID].style.display='none';

		}
	
		//	Remember this Obj so it can be reset when another item is clicked
		HL[ControlID] = DivObj;
		HL[ControlID].style.display='';
		
	}
	
	
	
	//________________________________________________________________________________
	//
	//	EXECUTE A FUNCTION AFTER MILISECS
	//
	function ExecuteFunctionAfter(func, timing, Param1, Param2, Param3, Param4) {
		Obj = new Object();
		Obj.Interval= setInterval(func, timing, Obj, Param1, Param2, Param3, Param4);
		return Obj;
	}
	
	
	
	//________________________________________________________________________________
	//
	//	EXECUTE A FUNCTION AFTER MILISECS
	//
	function ExecuteFunctionOnceAfterCall(func, Obj, Param1, Param2, Param3, Param4) {

		clearInterval(Obj.Interval);
		func(Param1, Param2, Param3, Param4);
	}
	
	
	
	//________________________________________________________________________________
	//
	//	EXECUTE A FUNCTION AFTER MILISECS
	//
	function ExecuteFunctionOnceAfter(func, timing, Param1, Param2, Param3, Param4) {
		Obj = new Object();
		Obj.func   = func;
		Obj.Param1 = Param1;
		Obj.Param2 = Param2;
		Obj.Param3 = Param3;
		Obj.Param4 = Param4;
		

		var TempFunc = function() {
			ExecuteFunctionOnceAfterCall(Obj.func, Obj, Obj.Param1, Obj.Param2, Obj.Param3, Obj.Param4);
		}
		
		Obj.Interval = setInterval(TempFunc, timing);
		return Obj;
	}
	
	
	//________________________________________________________________________________
	//
	//	EXECUTE A FUNCTION AFTER MILISECS USING THE PASSED IN OBJ
	//
	function ExecuteFunctionOnceAfterUsing(Obj, func, timing, Param1, Param2, Param3, Param4) {
	
		clearInterval(Obj.Interval);

		Obj.func   = func;
		Obj.Param1 = Param1;
		Obj.Param2 = Param2;
		Obj.Param3 = Param3;
		Obj.Param4 = Param4;
		

		var TempFunc = function() {
			ExecuteFunctionOnceAfterCall(Obj.func, Obj, Obj.Param1, Obj.Param2, Obj.Param3, Obj.Param4);
		}

		Obj.Interval = setInterval(TempFunc, timing);
		return Obj;
	}
	
	
	
	
	function DragDropCoordinates() {
		
		if (!DragDropObject) {
			return
		}

		
		if (event.srcElement==DragDropSelect)	{
			mouseover	 =true;
			DragDropLeft =DragDropObject.style.pixelLeft;
			DragDropTop	 =DragDropObject.style.pixelTop;
			DragDropX	 =event.clientX;
			DragDropY	 =event.clientY;
			
			document.onmousemove=DragObject;
		}
	}
	
	function DragObject() {
		
		if (mouseover&&event.button==1)	{

			DragDropObject.style.pixelLeft	=DragDropLeft+event.clientX-DragDropX
			DragDropObject.style.pixelTop	=DragDropTop+event.clientY-DragDropY
			return false
		}
	}
	
	function StopDragDrop() {
	
		mouseover=false;
		document.onmousedown=function() {};
	}

	function StartDragDrop(SelectObject, DragObject) {

		DragDropObject = DragObject;
		DragDropSelect = SelectObject;
		document.onmousedown=DragDropCoordinates;
		document.onmouseup=StopDragDrop;

	}

	
	
	function NumbersOnly(e)	{
		var keynum
		var keychar
		var numcheck
		if(window.event) { // IE	
			keynum = e.keyCode
		} else if(e.which) { // Netscape/Firefox/Opera
			keynum = e.which
		}
		keychar = String.fromCharCode(keynum)
		numcheck = /\d/;
		
		return numcheck.test(keychar)
	}
	
	
	
	function HexOnly(e)	{
		var keynum
		var keychar
		var numcheck
		if(window.event) { // IE	
			keynum = e.keyCode
		} else if(e.which) { // Netscape/Firefox/Opera
			keynum = e.which
		}
		keychar = String.fromCharCode(keynum);
		var validletters = '0123456789ABCDEFabcdef';
		return (validletters.indexOf(keychar) > -1)
	}



	function GetPixelPosition(Obj, PosObj) {
		
		//
		//	Recursive Function to Determine Left and Top Actual Position
		//
		
		if (PosObj == undefined) {
			PosObj 			= new Object;
			PosObj.Left 	= 0;
			PosObj.Top 		= 0;
			PosObj.Parents 	= 0;
		}
		
		var blw = 0;
		var btw = 0;
		var plw = 0;
		var ptw = 0;
		
		try {
			if (isNaN(parseInt(Obj.currentStyle.borderTopWidth)) == false) {
				btw = parseInt(Obj.currentStyle.borderTopWidth);
			}
		} catch(e) {}

		try {
			if (isNaN(parseInt(Obj.currentStyle.paddingTop)) == false) {
				ptw = parseInt(Obj.currentStyle.paddingTop);
			}
		} catch(e) {}


		try {
			if (isNaN(parseInt(Obj.currentStyle.borderLeftWidth)) == false) {
				blw = parseInt(Obj.currentStyle.borderLeftWidth);
			}
		} catch(e) {}

		try {
			if (isNaN(parseInt(Obj.currentStyle.paddingLeft)) == false) {
				plw = parseInt(Obj.currentStyle.paddingLeft);
			}
		} catch(e) {}

			
		PosObj.Left 	= PosObj.Left + Obj.offsetLeft + blw + plw;
		PosObj.Top 		= PosObj.Top  + Obj.offsetTop + btw + ptw;

		// Test for Parent
		try {
			var test = Obj.offsetParent.offsetLeft;
	
			// If Still here Parent exist
			if (String(Obj.offsetParent) != null ) {
				PosObj.Parents	= PosObj.Parents + 1;
				PosObj = GetPixelPosition(Obj.offsetParent, PosObj);
			}
		} catch(e) {
		}
		
		return PosObj;
		
	}

