//Had its own script tag

var d_site= 'sears';

//Early functionality - 92 - some looks like it gets used right away.
	var storeIdValue= '10153';
	var catalogIdValue = '12605';
	function setStoreId(storeIdValue){
	storeId = storeIdValue;
	}
	setStoreId(storeIdValue);
	setCatalogId(catalogIdValue);
	
	function goToVertical(name){
	  	var langId="-1";
	 	var storeId="10153";
		var catalogId="12605";
		if(name!='select'){
			location.href="/shc/s/BrowseVertical?langId="+langId+"&storeId="+storeId+"&catalogId="+catalogId+"&vName="+escape(name);
		}
	}

	function goToAllVertical(name){
	  	var langId="-1";
	 	var storeId="10153";
		var catalogId="12605";
		location.href="/shc/s/BrowseAllVertical?langId="+langId+"&storeId="+storeId+"&catalogId="+catalogId+"&sbf="+escape(name);
	}

	function fnSearchSubmit(){
                var storeId="10153";
                var catalogId="12605";
                if(trim(document.searchForm.keyword.value).length > 0)
	         {

	         var action = '/shc/s/KeywordSearch?storeId=' + storeId
		 	                               +'&catalogId=' + catalogId
		                                       +'&keyword=' + escape(document.searchForm.keyword.value)
		                                       +'&vName=' + escape(document.searchForm.vName.value);
		          document.searchForm.action=action;
	       	          document.searchForm.submit();

                 } else {

	                return false;

	         }

	}
	
	function noenter() {
		if(window.event.keyCode == 13){
			var keyword = trim(document.searchForm.keyword.value);
			if(keyword != ""){
				fnSearchSubmit();
			} else {
				return false;
			}
		} else {
  			return true;
  		}
  	}

  	function trim( value ) {
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
	}


	function RecentlyViewed(value)
	{
		var DivRef = document.getElementById('recentView');
		DivRef.style.display = "block";
		DivRef.innerHTML = value;
		divFloat('recentView', true);
	}
	// Function for displaying Recently Viewed-Wide Format
	function RecentlyViewedWide(value)
	{
		var DivRef = document.getElementById('recentlyView');
		DivRef.style.display = "block";
		DivRef.innerHTML = value;
		Sears.showHideRecentlyView(true);
	}
function relogon()
{
	var langId="-1";
 	var storeId="10153";
	var catalogId="12605";
	var url = "/shc/s/TopCategoriesDisplayView?storeId="+storeId+"&catalogId="+catalogId+"&langId="+langId;
	ajaxCall(url,'reLogon','','');
	setTimeout("callRecentlyViewed()",3000);
}
function callRecentlyViewed()
{
	var langId="-1";
 	var storeId="10153";
	var catalogId="12605";
	var recentlyViewedUrl = "/shc/s/RecentlyViewedCmd?storeId="+storeId+"&catalogId="+catalogId+"&langId="+langId;
	ajaxCall(recentlyViewedUrl,'RecentlyViewedWide');	
}