/***********************************************
	Begin: Site Help Javascript Detection
	************************************************/
	// get the browser the user is using
	agt = navigator.userAgent.toLowerCase();
	ie = (agt.indexOf("msie") != -1);
	ns = (navigator.appName.indexOf("Netscape") != -1);
	opera = (agt.indexOf("opera") != -1);
	win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
	mac = (agt.indexOf("mac")!=-1);
	// set all variables to FALSE
	var java = "FALSE";
	var cookies = "FALSE";
	var flash = "FALSE";
	var mediaplayer = "FALSE";
	var shockwave = "FALSE";
	var realplayer = "FALSE";
	var quicktime = "FALSE";
	var acrobat = "FALSE";
	var svg = "FALSE";
	var pluginlist = "";
	// get screen width and heigth
	var width = screen.width;
	var height = screen.height;

	if (ie && win) { 
		pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") + detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") + detectIE("PDF.PdfCtrl.5","Acrobat Reader") + detectIE("PDF.PdfCtrl.5","Acrobat Reader") + detectIE("AcroPDF.PDF.1","Acrobat Reader") + detectIE("PDF.PdfCtrl.6","Acrobat Reader"); 
	}
	if (opera) {
		nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
		pluginlist = detectNS("image/svg-xml","SVG Viewer") + detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash") + detectNS("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows MediaA Player") + detectNS("application/pdf","Acrobat Reader");
	}
	if (ns || !win) {
		nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
		pluginlist = detectNS("image/svg-xml","SVG Viewer") + detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash") + detectNS("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows MediaA Player") + detectNS("application/pdf","Acrobat Reader");
	}
	function detectIE(ClassID,name) {
		result = false;
		document.writeln('<SCRI'+'PT LANGUAGE=VBScript>');
		document.writeln('on error resume next');
		document.writeln('If ScriptEngineMajorVersion >= 2 then');
		document.writeln('result = False');
		document.writeln('result = IsObject(CreateObject("' + ClassID + '"))');
		document.writeln('If (err) then');
		document.writeln('result = False');
		document.writeln('End If');
		document.writeln('Else');
		document.writeln('result = False');
		document.writeln('End If');
		document.writeln('</SCRI'+'PT>');
		if (result) return name+','; else return '';
	}
	function detectNS(ClassID,name) {
		n = ""; 
		if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n;
	}
	pluginlist += navigator.javaEnabled() ? "Java," : "";
	if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);
	//detect Flash
	if (pluginlist.indexOf("Flash")!=-1) flash = "TRUE";
	//detect Windows Media Player
	if (pluginlist.indexOf("Windows Media Player")!=-1) mediaplayer = "TRUE";
	//detect Java
	if (pluginlist.indexOf("Java")!=-1) java = "TRUE";
	//detect Shockwave
	if (pluginlist.indexOf("Shockwave Director")!=-1) shockwave = "TRUE";
	//detect RealPlayer
	if (pluginlist.indexOf("RealPlayer")!=-1) realplayer = "TRUE";
	//detect QuickTime
	if (pluginlist.indexOf("QuickTime")!=-1) quicktime = "TRUE";
	//detect Acrobat Reader
	if (pluginlist.indexOf("Acrobat Reader")!=-1) acrobat = "TRUE";
	//detect SVG Viewer
	if (pluginlist.indexOf("SVG Viewer")!=-1) svg = "TRUE";
	/**************************************************************************
	Version: 1.0
	Date: 06-28-2004
	Description: RealTime check wether user has cookies disabled\enabled.
	***************************************************************************/
	cookieSet('test', 'sitehelptest', 180, '/' );
	var cookieTest = cookieGet('test');
	var cookies;
	if (!cookieTest) {
		cookies = "FALSE";
	} else {
		cookies = "TRUE";
		cookieDelete('test', '/');
	}
	/************************************************
		End: Site Help Javascript Detection 
	*************************************************/
	function OpenDirections(intDirections) {
	/***************************************************************************
	Version: 1.0
	Date: 04-22-04
	Description: Site Help - Opens directions based on users choice.
	****************************************************************************/
	switch(intDirections) {
		case 1:
			// Monitior Directions
			popWindow('/help/site_help2.asp?dir=1', 'SiteHelp', '400', '450', 'auto');
			break;
		case 2:
			// QuickTime Directions
			popWindow('http://www.apple.com/quicktime/download/', 'SiteHelp', '800', '600', 'auto');
			break;
		case 3:
			// Acrobat Directions
			popWindow('http://www.adobe.com/products/acrobat/readstep2.html', 'SiteHelp', '800', '600', 'auto');
			break;
		case 4:
			// Flash Directions
			popWindow('http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash', 'SiteHelp', '800', '600', 'auto');
			break;
		case 5:
			// Cookie Directions
			popWindow('/help/site_help2.asp?dir=5', 'SiteHelp', '400', '450', 'auto');
			break;
	}
}