<!--
function readCookie(name) {
 var nameEQ = name + "=";
 var ca = document.cookie.split(';');
 for (var i = 0; i < ca.length; i++) {
  var c = ca[i];
  while (c.charAt(0) == ' ') c = c.substring(1, c.length);
  if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
 }
 return "";
}
function setCookie(name, value, days) {
 var expires = "";
 if (days) {
  var date = new Date();
  date.setTime(date.getTime() + (days*24*60*60*1000));
  expires = "; expires=" + date.toGMTString();
 }
 document.cookie = name + "=" + value + expires + "; path=/";
}
function utf8Decode(utftext) {
 // From http://www.webtoolkit.info/javascript-url-decode-encode.html
 utftext = unescape(utftext);
 var result = "";
 var i = 0;
 var c = c1 = c2 = 0;
 while (i < utftext.length) {
  c = utftext.charCodeAt(i);
  if (c < 128) {
   result += String.fromCharCode(c);
   i++;
  }
  else if((c > 191) && (c < 224)) {
   c2 = utftext.charCodeAt(i+1);
   result += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
   i += 2;
  }
  else {
   c2 = utftext.charCodeAt(i+1);
   c3 = utftext.charCodeAt(i+2);
   result += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
   i += 3;
  }
 }
 return result;
}
function setSearchTerm() {
 var kw = readCookie("SEARCHTERM");
 if (kw != "") {
  kw = unescape(kw);
  document.getElementById("dm_Content4__searchBox").value = kw;
 }
}

//-->

