	//Function to display TU in .js files
	function TU(name) {
		var text = textunits[name];
		
		if(text == undefined)
			return name + " not defined in textunit literal";
		else
			return text.unescapeHTML();
	}
	
	//Redirect to download flash page
	function getFlash() {
		sendMultiTrack('ISM_Error_GetFlash', 'DCSext.ISM_Errors');
		window.location = "http://www.adobe.com/go/getflashplayer";
	}
	
	//Shorthand for logging to the console
	function log(param) {
		if ( typeof console == 'object' ) {
		//	console.log(param);
		}
	}
	
	//Get what IE version
	function ieVersion() {
		var IE6 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5)) == 6;
		var IE7 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5)) == 7;
		var IE8 = Prototype.Browser.IE && !Prototype.Browser.IE6 && !Prototype.Browser.IE7;
		
		if(IE7)
			return 7;
		
		if(IE6)
			return 6;
		
		if(IE8)
			return 8;
	}
	

	
	
	//Help functions for converting dec/hex
	function d2h(d) { d = parseInt(d); return "0x"+d.toString(16);}
	function h2d(h) {return parseInt(h,16);} 
	
	//Find coordinates of a DIV relative to the screen
	function findPos(obj) {
	    
	    var curleft = curtop = 0;
	    if (obj.offsetParent) {
	        curleft = obj.offsetLeft
	        curtop = obj.offsetTop
	        while (obj = obj.offsetParent) {
	            curleft += obj.offsetLeft
	            curtop += obj.offsetTop
	        }
	    }
	    return [curleft, curtop];
	}
	
	function calculate_offset(source, target) {
		s_position = $(source).cumulativeOffset();
		t_position = $(target).cumulativeOffset();
		return [
			 s_position[0] - t_position[0],
			 s_position[1] - t_position[1]
			];
	} 
	

	

