<!--

// Pre-define functions as null 
function takeShortcut() { }

// DHTML Menu Functions
function showMenu(menu) {}
function hideMenu(menu) {}

// Predefine menu image state functions.
var topnavDown = "";
var snavDown   = "";

function imgOn(imgName) {}
function imgOff(imgName) {}
function imgDown(imgName, locale) {}

function submitForm() {document.catalogSelect.submit();}

// Shortcuts Function
function takeShortcut() {
   var number   = document.ShortcutMenu.Shortcuts.selectedIndex;
   var url      = document.ShortcutMenu.Shortcuts.options[number].value; 
   if (url != "------------------" && url != "Shortcuts") {
      location.href = url;
   }
}

// Shortcuts Function
function selectSPPRegion() {
   var number   = document.regionSelect.region.selectedIndex;
   var url      = document.regionSelect.region.options[number].value; 
   if (url != "------------------" && url != "Select a regional site") {
      location.href = url;
   }
}

function openHelpWindow(url, name) {
   popupWin = window.open(url, name, "toolbar,resizable,scrollbars,height=400,width=400,left=0,top=0");

   if (popupWin.opener == null) {
      popupWin.opener = window;
      popupWin.opener.name = "opener";
      popupWin.focus();
   }
}

function openRetailWindow(url, name) {
   popupWin = window.open(url, name, "toolbar,menubar,location,status,resizable,scrollbars,height=600,width=570,left=0,top=0");

   if (popupWin.opener == null) {
      popupWin.opener = window;
      popupWin.opener.name = "opener";
      popupWin.focus();
   }
}

function openLargeWindow(url, name) {
   newWindow = window.open(url, name, "toolbar,resizable,status,scrollbars,height=600,width=800,left=0,top=0");
   if (newWindow.opener == null) {
      newWindow.opener      = window;
      newWindow.opener.name = "opener";
      newWindow.focus();
   }
}

function popupRedirect(url) {
   if (window.opener) {	
      window.opener.window.parent.location.href = url;
      window.opener.focus();
      popupClose();
   } else {
      window.location.href = url;
   }	
}

function popupRedirectNew(url) {
   openLargeWindow( url, "new_window" );
   popupClose();
}

function popupClose() {
   window.opener.focus();
   window.close();
}

function searchSubmit(form) {
   var searchString = form.query.value;
   if (searchString.length == 0 || searchString == 'Enter keyword(s)') {
      var errString = "Please enter keywords for your search.";
      alert(errString);
      return false;
   }
   return true;
}

function countrySiteGo( ) {
   var number   = document.chooseCountrySite.countryList.selectedIndex;
   var url      = document.chooseCountrySite.countryList.options[number].value; 
   if ( url != "------" && url != "none" ) {
      location.href = url;
   }
}



// Submit Login Stuff
function resetCredFields() {
   document.loginForm.PASSWORD.value = "";
}

function submitOnEnter(formName, formAlternate, fieldName) {
   eval("document." + formName + "." + fieldName + ".value = document." + formAlternate + "." + fieldName + ".value");
}

function loginFocus() {
   document.forms["loginForm"].elements["USER"].focus();
}

// Cookie Functions for regional SPP login page

function setCookie (name, value, expires) {
    if (!expires) {
		expires = new Date();
		document.cookie = name + "=" + escape (value) + "; path=/";
	} else {
    	document.cookie = name + "=" + escape (value) + "; expires=" + expires.toGMTString() + "; path=/";
	}
}    

function getCookie (name) {
    var cname = name + "=";
    var dc = document.cookie;
    if (dc.length > 0) {
		begin = dc.indexOf(cname);
        if (begin != -1) {
        	begin += cname.length;
        	end = dc.indexOf(";", begin);
          	if (end == -1) end = dc.length;
          	return unescape(dc.substring(begin, end));
         }
    }
    return null;
}

 function delCookie (fname) {
 	var expireNow = new Date();
    document.cookie = fname + "=" + "; expires=Wed, 03-Jan-90 00:00:01 GMT" +  "; path=/";
    }

 function setValue(element,expFlag) {
 	exp = new Date();
	exp.setTime (exp.getTime() + (1000 * 60 * 60 * 24 * 365));
	if (expFlag == 1) {
    	setCookie("sppCountryPref", element.value, exp);
	} else {
		
		setCookie("sppCountryPref", element.value);
		
		
	}
}


//for support page
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function See(URL,NAME) {
  window2 = window.open(URL,NAME,'scrollbars,resizable,width=350,height=300');
  if(window2.focus) window2.focus();
}

//-->
