if (!sbweb.component.serverInfo) sbweb.component.serverInfo = function() {

	return {
		 positionDevinfoContainer : function() {
		 	sbweb.util.log.debug("In function positionDevinfoContainer----------------------");
			var position = $("#navigationContainer").offset();
			var positionTop = 0;
			var positionLeft = 0;
			
			if (position) {
				positionTop = position.top;
				positionLeft = position.left + 970;
				$("#devinfoContainer").css({
					top: positionTop,
					left: positionLeft,
					display: "block"
				});
			}
		},

		changePriorityCode : function(priorityCode) {
			sbweb.util.log.debug("In function changePriorityCode priorityCode value passed is : " + priorityCode);
			parameterString="priorityCode=" + priorityCode;
			$.ajax({
				type: "POST",
				url: "/qb/common/utility_droplets/update_priority_code.jsp",
				data: parameterString
			});
			alert("The priority code has been updated to " + priorityCode + ".");
			document.location.href=document.location.href;
		},
	
	    changeABTestGroup : function(testGroup) {
	  		sbweb.util.log.debug("In function changeABTestGroup testGroup value passed is : " + testGroup);
			parameterString="abTestGroup=" + testGroup;
			$.ajax({
				type: "POST",
				url: "/qb/common/utility_droplets/update_ab_test_group.jsp",
				data: parameterString
			});
			alert("The AB Test Group has been updated to " + testGroup + ".");
		
			document.location.href=document.location.href;
		},
	
	    changeServerDate : function(date) {
	    	sbweb.util.log.debug("In function changeServerDate date value passed is : " + date);
			parameterString="date=" + encodeURI(date);
			$.ajax({
				type: "POST",
				url: "/qb/common/utility_droplets/update_server_date.jsp",
				data: parameterString,
				async: false
			});
			alert("The server date has been updated to " + date + ".");
			
			document.location.href=document.location.href;
		},
	
	    increaseSegmentScore : function(segmentName,segmentScore,segmentDomain) {
	    	sbweb.util.log.debug("In function increaseSegmentScore segmentName is : " + segmentName +  "segmentScore is : " + segmentScore);
	    	sbweb.component.personalization.updateSegmentScore(segmentName,segmentScore,segmentDomain);
			alert("The " + segmentName + " segment score has been increased by " + segmentScore + " points.");
			
			document.location.href=document.location.href;
		},
	
		setSegmentQuickBooks : function(segmentName) {
			sbweb.util.log.debug("In function setSegmentQuickBooks segmentName is : " + segmentName);
			sbweb.component.personalization.setSegment(segmentName,"quickbooks");
			alert("The segment has been set to: " + segmentName);
		
			document.location.href=document.location.href;
		},
	
		resetRelevantContentScore : function(segmentDomain) {
			var DOMAIN=segmentDomain;
			var ROOT_LEVEL="/";
			
			sbweb.util.cookies.deleteCookie('Chpt',ROOT_LEVEL,DOMAIN);
			sbweb.util.cookies.deleteCookie('Chptpts',ROOT_LEVEL,DOMAIN);
			sbweb.util.cookies.deleteCookie('Sgmt',ROOT_LEVEL,DOMAIN);
			sbweb.util.cookies.deleteCookie('Sgmtpts',ROOT_LEVEL,DOMAIN);
			
			alert("You will need to close the browser in order to clear the cache.")
		},
		
		forceOffermaticaContent : function(queryStringParameters) {
			var colon=":";
			var parent_protocol=parent.location.protocol;
			var parent_host=parent.location.hostname;
			var parent_port=parent.location.port;
			var parent_pathname=parent.location.pathname;
			if (queryStringParameters != undefined) {
				var	parent_search=queryStringParameters;
			}
			else {
				parent_search="";
			}
			if (parent_port == "") {
				colon="";
			}
			var parent_url=parent_protocol + "//" + parent_host + colon + parent_port + parent_pathname + parent_search;
			
			document.location.href=parent_url;
		},
		
		addToCart : function(skuId,prodId) {
			sbweb.util.log.debug("In function addToCart skuId is : " + skuId + " and prodId : " + prodId);
			var colon=":";
			var parent_protocol=parent.location.protocol;
			var parent_host=parent.location.hostname;
			var parent_port=parent.location.port;
			var parent_pathname="/commerce/checkout/redirectToCart.jsp?successUrl=/commerce/checkout/shoppingcart.jsp";
			parent_pathname += "&prodId=" + prodId;
			parent_pathname += "&skuId=" + skuId;
			
			var parent_url=parent_protocol + "//" + parent_host + colon + parent_port + parent_pathname;
			
			document.location.href=parent_url;
		},
		
		categoryPage : function(catId) {
			sbweb.util.log.debug("In function categoryPage catId is : " + catId);
			var colon=":";
			var parent_protocol=parent.location.protocol;
			var parent_host=parent.location.hostname;
			var parent_port=parent.location.port;
			var parent_pathname="/commerce/catalog/category.jsp";
			parent_pathname += "?categoryId=" + catId;
			
			var parent_url=parent_protocol + "//" + parent_host + colon + parent_port + parent_pathname;
			
			document.location.href=parent_url;
		},
		
		productPage : function(prodId) {
			sbweb.util.log.debug("In function productPage prodId is : " + prodId);
			var colon=":";
			var parent_protocol=parent.location.protocol;
			var parent_host=parent.location.hostname;
			var parent_port=parent.location.port;
			var parent_pathname="/commerce/catalog/product.jsp";
			parent_pathname += "?prodId=" + prodId;
			
			var parent_url=parent_protocol + "//" + parent_host + colon + parent_port + parent_pathname;
			
			document.location.href=parent_url;
		},
		
		showBeacon : function() {
			window.open("","stats_debugger","width=600,height=600,location=0,menubar=0,status=1,toolbar=0,resizable=1,scrollbars=1").document.write("<script language=\"JavaScript\" src=\"https://sitecatalyst.omniture.com/sc_tools/stats_debugger.html\"></"+"script>" + "<script language=\"JavaScript\">window.focus();</script>");
		}
	};	
}();