	
	var agt = navigator.userAgent.toLowerCase();
	var appVer = navigator.appVersion.toLowerCase();

	var is_minor = parseFloat(appVer);
	var is_major = parseInt(is_minor);

	var is_firefox = (agt.indexOf("firefox") != -1);
	var is_firefox2 = (agt.indexOf("firefox 2") != -1 || agt.indexOf("firefox/2") != -1);
	var is_opera = (agt.indexOf("opera") != -1);
	var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
	var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
	var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
	var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
	var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);
	var is_opera7 = (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1);
	var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
	var is_opera6up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5);
	var is_opera7up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6);
	var iePos  = appVer.indexOf('msie');
	if (iePos !=-1) {
		is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
		is_major = parseInt(is_minor);
	}
	if (iePos == -1) {
		var iePos = agt.indexOf('internet explorer');
	}

	var is_konq = false;
	var kqPos   = agt.indexOf('konqueror');
	if (kqPos !=-1) {                 
		is_konq  = true;
		is_minor = parseFloat(agt.substring(kqPos+10,agt.indexOf(';',kqPos)));
		is_major = parseInt(is_minor);
	}                                 

	var is_getElementById   = (document.getElementById) ? "true" : "false"; // 001121-abk
	var is_getElementsByTagName = (document.getElementsByTagName) ? "true" : "false"; // 001127-abk
	var is_documentElement = (document.documentElement) ? "true" : "false"; // 001121-abk

	var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
	var is_khtml  = (is_safari || is_konq);

	var is_gecko = ((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
	var is_gver  = 0;
	if (is_gecko) is_gver=navigator.productSub;

	var is_moz = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
				(agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
				(agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
				(is_gecko) && 
				((navigator.vendor=="")||(navigator.vendor=="Mozilla")));
	if (is_moz) {
		var is_moz_ver = (navigator.vendorSub)?navigator.vendorSub:0;
		if(!(is_moz_ver)) {
			is_moz_ver = agt.indexOf('rv:');
			is_moz_ver = agt.substring(is_moz_ver+3);
			is_paren   = is_moz_ver.indexOf(')');
			is_moz_ver = is_moz_ver.substring(0,is_paren);
		}
		is_minor = is_moz_ver;
		is_major = parseInt(is_moz_ver);
	}

    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)
                && (!is_khtml) && (!(is_moz)));

    if ((navigator.vendor)&&
        ((navigator.vendor=="Netscape6")||(navigator.vendor=="Netscape"))&&
        (is_nav)) {
       is_major = parseInt(navigator.vendorSub);
       is_minor = parseFloat(navigator.vendorSub);
    }

    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && is_minor >= 4);

    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );

    var is_nav6   = (is_nav && is_major==6);
    var is_nav6up = (is_nav && is_minor >= 6);

    var is_nav5   = (is_nav && is_major == 5 && !is_nav6);
    var is_nav5up = (is_nav && is_minor >= 5);

    var is_nav7   = (is_nav && is_major == 7);
    var is_nav7up = (is_nav && is_minor >= 7);

    var is_ie   = ((iePos!=-1) && (!is_opera) && (!is_khtml));
    var is_ie3  = (is_ie && (is_major < 4));

    var is_ie4   = (is_ie && is_major == 4);
    var is_ie4up = (is_ie && is_minor >= 4);
    var is_ie5   = (is_ie && is_major == 5);
    var is_ie5up = (is_ie && is_minor >= 5);
    
    var is_ie5_5  = (is_ie && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5_5up =(is_ie && is_minor >= 5.5);
	
    var is_ie6   = (is_ie && is_major == 6);
    var is_ie6up = (is_ie && is_minor >= 6);

    var is_aol   = (agt.indexOf("aol") != -1);
    
    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));
	

function lookupPI() {
	var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
	var mac = (agt.indexOf("mac")!=-1);

	if (is_ie && win) {	pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + 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"); }
	if (is_nav || !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("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows Media Player") + detectNS("application/pdf","Acrobat Reader");
	}

	function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</' + 'SCRIPT>\n'); 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);
	
	return pluginlist
}

	
	function setCookie(name, value, expires, path, domain, secure) {
		document.cookie= name + "=" + escape(value) +
			((expires) ? "; expires=" + expires.toGMTString() : "") +
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			((secure) ? "; secure" : "");
	}

	function getCookie(name) {
		var dc = document.cookie;
		var prefix = name + "=";
		var begin = dc.indexOf("; " + prefix);
		if (begin == -1) {
			begin = dc.indexOf(prefix);
			if (begin != 0) return null;
		} else {
			begin += 2;
		}
		var end = document.cookie.indexOf(";", begin);
		if (end == -1) {
			end = dc.length;
		}
		return unescape(dc.substring(begin + prefix.length, end));
	}
	
	function deleteCookie(name, path, domain)
	{
		if (getCookie(name)) {
			document.cookie = name + "=" + 
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	}

	function timeZone() {
		var now = new Date()
		var tzo = (now.getTimezoneOffset()/60)*(-1); 
		return tzo;
	}

	function uniqueVisit() {
		var thisVisit = getCookie("_trendsUnique")
		if (thisVisit == null) {
			thisVisit = "true"
		} else {
			thisVisit = "false"
		}
		return thisVisit;
	}

	function sessionVisit() {
		var thisSession = getCookie("_trendsSession")
		var ran_number= Math.round(Math.random()*10000000000);
		if (thisSession == null) {
			thisSession = ran_number
		} else {
			thisSession = thisSession
		}
		return thisSession;
	}

	function userLanguage() {
		if (navigator.userLanguage != "undefined" && navigator.userLanguage != null) {
			var userLangName = navigator.userLanguage
		} else if (is_firefox || is_firefox2) {
			var tempAgtLang = agt
			splitString = tempAgtLang.split(";")
			var userLangName = splitString[3]
		} else if (is_nav6up) {
			var tempAgtLang = agt
			splitString = tempAgtLang.split(";")
			var userLangName = splitString[3]
		} else if (agt.indexOf("macintosh")!=-1) {
			var tempAgtLang = agt
			splitString = tempAgtLang.split(";")
			var userLangName = splitString[3]
		} else {
			var userLangName = ""
		}
		if (userLangName == "") {
			userLangName = getCookie(_trendsLanguage);
		}
		return userLangName;
	}
	
	function userHour() {
		var hour = new Date().getHours()
		return hour;
	}
	
	function userJscript() {
		var is_js;
		if (is_nav2 || is_ie3) is_js = 1.0;
		else if (is_nav3) is_js = 1.1;
		else if ((is_opera5)||(is_opera6)) is_js = 1.3;
		else if (is_opera7up) is_js = 1.5;
		else if (is_khtml) is_js = 1.5;
		else if (is_opera) is_js = 1.1;
		else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
		else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
		else if (is_nav5 && !(is_nav6)) is_js = 1.4;
		else if (is_hotjava3up) is_js = 1.4;
		else if (is_nav6up) is_js = 1.5;
		else if (is_nav && (is_major > 5)) is_js = 1.4;
		else if (is_ie && (is_major > 5)) is_js = 1.3;
		else if (is_moz) is_js = 1.5;
		else is_js = 0.0;
		if ((agt.indexOf("mac")!=-1) && is_ie5up) is_js = 1.4;
		
		return is_js;
	}
	
	function userJVM() {
		var is_java = (navigator.javaEnabled());
		return is_java;
	}

	function userQuicktime() {
		var pluginlist = lookupPI()
		var thisPlugin = false
		if (pluginlist.indexOf("QuickTime")!=-1) {
			thisPlugin = true
		}
		return thisPlugin
	}

	function userRealPlayer() {
		var pluginlist = lookupPI()
		var thisPlugin = false
		if (pluginlist.indexOf("RealPlayer")!=-1) {
			thisPlugin = true
		}
		return thisPlugin
	}
	
	function userAcrobat() {
		var pluginlist = lookupPI()
		var thisPlugin = false
		if (pluginlist.indexOf("Acrobat Reader")!=-1) {
			thisPlugin = true
		}
		return thisPlugin
	}
	
	function userMPlayer() {
		var pluginlist = lookupPI()
		var thisPlugin = false
		if (pluginlist.indexOf("Windows Media Player")!=-1) {
			thisPlugin = true
		}
		return thisPlugin
	}
	
	var flashVersion = 0;
	var flashVersion_DONTKNOW = -1;
	function userFlash() {
		var latestFlashVersion = 8;
   
		// NS3 needs flashVersion to be a local variable
		if (agt.indexOf("mozilla/3") != -1 && agt.indexOf("msie") == -1) {
			flashVersion = 0;
		}
   
		// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
		if (navigator.plugins != null && navigator.plugins.length > 0) {
			var flashPlugin = navigator.plugins['Shockwave Flash'];
			if (typeof flashPlugin == 'object') { 
				for (var i = latestFlashVersion; i >= 3; i--) {
					if (flashPlugin.description.indexOf(i + '.') != -1) {
						flashVersion = i;
						break;
					}
				}
			}
		}

		// IE4+ Win32:  attempt to create an ActiveX object using VBScript
		else if (agt.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agt.indexOf("win")!=-1 && agt.indexOf("16bit")==-1) {
			var doc = '<scr' + 'ipt language="VBScript"\> \n';
				doc += 'On Error Resume Next \n';
				doc += 'Dim obFlash \n';
				doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
				doc += '   Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
				doc += '   If IsObject(obFlash) Then \n';
				doc += '      flashVersion = i \n';
				doc += '      Exit For \n';
				doc += '   End If \n';
				doc += 'Next \n';
				doc += '</scr' + 'ipt\> \n';
			document.write(doc);
		}
      
		// WebTV 2.5 supports flash 3
		else if (agt.indexOf("webtv/2.5") != -1) flashVersion = 3;

		// older WebTV supports flash 2
		else if (agt.indexOf("webtv") != -1) flashVersion = 2;

		// Can't detect in all other cases
		else {
			flashVersion = flashVersion_DONTKNOW;
		}
		return flashVersion;
	}

	function userCookie() {
		var is_cookie = (document.cookie) ? "true" : "false";
		return is_cookie;
	}

	var today = new Date();
	var numDays = 4
	var expdate = new Date(today.getTime() + numDays*24*60*60*1000); 
	
//	if (userCookie() == "true") {
//		setCookie("_trendsUnique", uniqueVisit(),expdate);
//		setCookie("_trendsScrWidth", screen.width);
//		setCookie("_trendsScrHeight", screen.height);
//		setCookie("_trendsScrColor", screen.colorDepth);
//		setCookie("_trendsTimeZone", timeZone());
//		setCookie("_trendsSession", sessionVisit());
//		setCookie("_trendsLanguage", userLanguage());
//		setCookie("_trendsClientHour", userHour());
//		setCookie("_trendsFlashVer", userFlash());
//		setCookie("_trendsJSVer", userJscript());
//		setCookie("_trendsJVM", userJVM());
//		setCookie("_trendsCookie", userCookie());
//		//setCookie("_trendsWMP", userMPlayer());
//		//setCookie("_trendsQT", userQuicktime());
//		//setCookie("_trendsRP", userRealPlayer());
//		//setCookie("_trendsAcrobat", userAcrobat());
//	} else {
//		document.write('<script src="/common/netComponents/noCookie.js?_trendsUnique=' + uniqueVisit() + ';+_trendsScrWidth=' + screen.width + ';+_trendsScrHeight=' + screen.height + ';+_trendsScrColor=' + screen.colorDepth + ';+_trendsTimeZone=' + timeZone() + ';+_trendsSession=' + sessionVisit() + ';+_trendsLanguage=' + userLanguage() + ';+_trendsClientHour=' + userHour() + ';+_trendsFlashVer=' + userFlash() + ';+_trendsJSVer=' + userJscript() + ';+_trendsJVM=' + userJVM() + ';+_trendsCookie=' + userCookie() + ';"></script>')
//		//alert("Cookie NOT Accepted");
//	}
	

document.write('<script src="/common/netComponents/noCookie.js?_trendsScrDim=' + screen.width + 'x' + screen.height + '&_trendsScrColor=' + screen.colorDepth + '&_trendsTimeZone=' + timeZone() + '&_trendsSession=' + sessionVisit() + '&_trendsLanguage=' + userLanguage() + '&_trendsClientHour=' + userHour() + '&_trendsFlashVer=' + userFlash() + '&_trendsJSVer=' + userJscript() + '&_trendsJVM=' + userJVM() + '&_trendsCookie=' + userCookie() + '"></script>')
