
<!--

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location.href='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function SetRefSiteCookie(mysite)
{
   
  var myurl = document.referrer.toLowerCase();
  if (myurl.length >= 5) {
    islocal = (myurl.match('http://www.'+ mysite)) || (myurl.match('http://'+ mysite))|| (myurl.match('http://www.theshop.co.nz')) || (myurl.match('http://theshop.co.nz')) ;
    if (!islocal) {
       var thistime = new Date();
       var cexdate = thistime.getTime() + (24 * 60 * 60 * 1000);  
       thistime.setTime(cexdate);
       document.cookie = "TSRefSite=" + myurl+ "; expires=" + thistime.toGMTString();
       document.cookie = "TSLandURL=" + document.URL+ "; expires=" + thistime.toGMTString();
   } 
  }
}

function SetFieldWithRefSiteCookies(myform)
  {
   if (document.getElementById) {
     var input = document.createElement('INPUT');
      if (document.all) { // what follows should work 
                          // with NN6 but doesn't in M14
        input.type = "hidden";
        input.name = "TSRefCookie";
        input.value = document.cookie;
      }
      else if (document.getElementById) { // so here is the
                                          // NN6 workaround
        input.setAttribute('type', "hidden");
        input.setAttribute('name', "TSRefCookie");
        input.setAttribute('value', document.cookie);
      }
    myform.appendChild(input);
  }
 }  


function ReadCookie(cookieName) {  // that one is not used but could be useful sometimes
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

-->
