
	/*
	if (cookiesEnabled()) {
		if (getCookie('webevents-sessiontrack')==null){
			//start session logging
			var imgSession = new Image(0,0); 
			imgSession.src = "/Common/SessionTrack.aspx?strPageName=" + escape(window.location.pathname + window.location.search);
		}
	}
	*/
		
	function cookiesEnabled () {		
		setCookie ('webevents-cookietest','1',"","/");
		if (getCookie('webevents-cookietest') !=null){
			return true;
		} return false;				
	}

	function getCookie(cookieName) {
		var theCookie=""+document.cookie;
		var ind=theCookie.indexOf(cookieName);
		if (ind==-1 || cookieName=="") return null;
		var ind1=theCookie.indexOf(';',ind);
		if (ind1==-1) ind1=theCookie.length;
		return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
	}

	function openWindow (sTarget) {
		if (sTarget.indexOf("?") > 0) {
			var queryString = parseQueryString(sTarget.substr(sTarget.indexOf("?") + 1, sTarget.length))
			//sTarget = sTarget.substr(0,sTarget.indexOf("?"))
			
			if (document.images) {	
				var iID = 0
				if (queryString["intStandContentID"] != null){
					iID = queryString["intStandContentID"];							
				}
				clickme1 = new Image(0,0); 
				clickme1.src = "/Common/LogStats.aspx?intID=" + iID;		//Log stand download
				
			}
		
		}
		//window.alert(iID,'640x480','resizable=yes,toolbar=no,status=no,scrollbars=yes,location=no,menubar=no,directories=no,width=640,height=480');
		window.open (sTarget,'660x500','resizable=yes,toolbar=no,status=no,scrollbars=yes,location=no,menubar=no,directories=no,width=660,height=500');
		return false;
	}
	
	function parseQueryString(sQueryString){
		var args = new Object();
		var pairs = sQueryString.split("&"); 
		
		for(var i = 0; i < pairs.length; i++) {								// Begin loop through the querystring
			var pos = pairs[i].indexOf('=');								// Look for "name=value"
			if (pos == -1) continue;										// if not found, skip to next
			var argname = pairs[i].substring(0,pos);						// Extract the name
			var value = pairs[i].substring(pos+1);							// Extract the value
			args[argname] = unescape(value);								// Store as a property
		}

		return args;														// Return the Object
	}
	
	function tabNavigate (sURL,sSelectedTab) {
		setCookie ('webevents-leftnavstatus',"","","/");
		if (sSelectedTab!="") {
			//change tab to reflect selected link
			setCookie ("webevents-tab",sSelectedTab,"","/")			
		}
		
		if (document.getElementById('tblProductNav')) {
			if(tblProductNav.style.display=='block') openCloseProductNav()
		}
		
		window.location.href = sURL;
		
	}

	function NavigateContentTypeSelect(oSelect){
		document.location = '/Common/ContentDisplayList.aspx?intType=' + oSelect.value; 
	}
	
	function setCookie(name, value, expires, path, domain, secure) {
			var curCookie = name + "=" + escape(value) +
				((expires) ? "; expires=" + expires.toGMTString() : "") +
				((path) ? "; path=" + path : "") +
				((domain) ? "; domain=" + domain : "") +
				((secure) ? "; secure" : "");
			document.cookie = curCookie;
	}
	
	var sStatusTickerText = ""; 
	var iStatusTickerIndex = 0; 	
	var iStatusTickerInterval = 0;

	function initStatusTicker(){ 
		window.status = sStatusTickerText.substring(iStatusTickerIndex, sStatusTickerText.length) + sStatusTickerText.substring(0, iStatusTickerIndex - 1);
		if (iStatusTickerIndex < sStatusTickerText.length) {iStatusTickerIndex++}
		else {iStatusTickerIndex = 0}
		setTimeout("initStatusTicker()", iStatusTickerInterval);
	}

	function logSessionAction (sPage) {

		if (cookiesEnabled()) {	
			var imgSession = new Image(0,0); 
			imgSession.src = "/Common/SessionTrack.aspx?" + unescape("strPageName=" + sPage)
		}
	}


function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01


	     var posLeft = (screen.width - imageWidth) / 2;
	     var posTop = (screen.height - imageHeight) / 2;

            newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);

            newWindow.document.open();

            newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');         

            newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">');

            newWindow.document.write('</body></html>');

            newWindow.document.close();

            newWindow.focus();

}

function showLightBox (url) {

			var t = ""
			var a = url; //+ "&modal=true&keepThis=true&TB_iframe=true&height=422&width=325";
			var g = "";
			tb_show(t,a,g,'TB_iframe=true&height=350&width=400');	
			return false;
}
	
