<!--
/* This content should be in the scripting.js text asset
/* in the overview DB. However, it contains computed values
/* which are invisible and uneditable in that environment.
/* Therefore, the easiest way to modify the computed fields
/* is to copy it into a Page element, edit the computed fields,
/* then copy it back to the text asset.
*/
//************ Start Default Commands ************
var graphic = "";   
var isNS4 = 0; var isIE4 = 0; var isNS6 = 0; var isNew = 0;
var docObj, styleObj, currObj, cstyleObj;
var bVer = (parseInt(navigator.appVersion));
var bName = navigator.appName;
var brow = ((navigator.appName) + (parseInt(navigator.appVersion)));
if (bName == "Netscape" && bVer >= 3) version = "js";
else if (bName == "Microsoft Internet Explorer" && bVer >= 4) version = "js";
else if (bName == "Netscape" && bVer == 2) version = "no";
else if (bName == "Microsoft Internet Explorer" && bVer >= 2) version = "no";
if (parseInt(navigator.appVersion >= 5)){isNew = 1}
else if (brow == "Netscape4") {isNS4 = 1;}
else if (brow == "Netscape5") {isNS6 = 1;}
else if (brow == "Microsoft Internet Explorer4") {isIE4 = 1;}
				
if (isNS4||isNS6||isIE4||isNew) {
  if(isNS4){ docObj = "document."; }
  else if(isNS6){ docObj = "document.getElementById('"; }
  else { docObj = "document.all."; }
  if(isNS4){ styleObj = ""; }
  else if(isNS6){ styleObj = "').style"; }
  else { styleObj = ".style"; }
  
  if(isNS4){ cstyleObj = ""; }
  else if(isNS6){ cstyleObj = "').currentStyle"; }
  else { cstyleObj = ".currentStyle"; }
}
function getQuery(val){
  var querystring = location.search.substring(1,location.search.length);
  var o = "";
  var tSec = querystring.indexOf(val+"=");
  var tStr = querystring.substring( (tSec+(val.length+1)),querystring.length);
  
  if(tSec != -1){
    if(tStr.indexOf('&') != -1){
      o = tStr.substring(0,tStr.indexOf('&'));
    } else {
      o = tStr;
    }
  }
  return o;
}
function replaceSubstring(s,f,w){
  rtn = "";
  flg = 0;
  
  for(i = 0; i < s.length; i++){
    if(s.substr(i,f.length) == f){
      rtn += w;
      i += (f.length - 1);
    } else {
      rtn += s.charAt(i);
    }
  }
  
  return (rtn);
}
function writeFlash(fName,bg,w,h){
  if( (navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4) ){
    document.write('<embed src="' + fName + '" quality="high" bgcolor="#' + bg + '" WIDTH="' + w + '" HEIGHT="' + h + '" NAME="header" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" />');
  } else {
    document.write('<OBJECT data="' + fName + '" width="' + w + '" height="' + h + '" id="header" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" codetype="application/x-shockwave-flash">');
    document.write(' <PARAM NAME="movie" VALUE="' + fName + '" />');
    document.write(' <PARAM NAME="quality" VALUE="high" />');
    document.write(' <PARAM NAME="bgcolor" VALUE="#' + bg + '" />');
    document.write('<embed src="' + fName + '" quality="high" bgcolor="#' + bg + '" WIDTH="' + w + '" HEIGHT="' + h + '" NAME="header" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" />');
    document.write('</OBJECT>');
  }
}
function openPopup(URL,id,width,height){
  window.open(URL, id, "toolbar=no,location=no,width="+width+",height="+height+",status=yes,scrollbars=yes,scrolling=yes,menubar=no,resizable=yes");
}
function openPopupLocked(URL,id,width,height){
  window.open(URL, id, "toolbar=no,location=no,width="+width+",height="+height+",status=yes,scrollbars=yes,scrolling=yes,menubar=no,resizable=no");
}
function goPage(u){
  location.href = u;
}
function layerChange(tmpLayer,tmpVisible) {
  if (isNS4||isNS6||isIE4||isNew) { eval(docObj + tmpLayer + styleObj + '.visibility = "' + tmpVisible + '"') }
}
function displayChange(tmpLayer,tmpVisible) {
  if (isNS4||isNS6||isIE4||isNew) { eval(docObj + tmpLayer + styleObj + '.display = "' + tmpVisible + '"') }
}
function rollover(graphic,state) {
  if(state==1){ if (version == "js") { document[graphic].src = "/802577570055D117/" + graphic + "_dn.gif" } }
  if(state==0){ if (version == "js") { document[graphic].src = "/802577570055D117/" + graphic + "_up.gif" } }
}
function imageover(graphic,filename) {
  if (version == "js") { document[graphic].src = "/802577570055D117/" + filename }
}
function inputover(graphic,state) {
  if(state==1){ if (version == "js") { document.getElementById(graphic).src = "/802577570055D117/" + graphic + "_dn.gif" } }
  if(state==0){ if (version == "js") { document.getElementById(graphic).src = "/802577570055D117/" + graphic + "_up.gif" } }
}
function clearText(f,t,d){
  if(d == ""){ d = 0; }
  var doc = document.forms[d];
  var ele = doc.elements[f].value;
  if(ele == t){
    doc.elements[f].value = "";
  }
}
function expandChange(l,e,c1,c2) {
  if(isNS4||isNS6||isIE4||isNew){
    var lay = eval(docObj + l + styleObj + '.display');
    if(lay == "none"){
      displayChange(l,'block');
	if(e != ""){ document.getElementById(e).className = c2; }
    } else {
      displayChange(l,'none');
	if(e != ""){ document.getElementById(e).className = c1; }
    }
  }
}
function getCookie(Name){ 
   var search = Name + "=" 
   if (document.cookie.length > 0) { 
      offset = document.cookie.indexOf(search) 
      if (offset != -1) { 
         offset += search.length 
         end = document.cookie.indexOf(";", offset) 
         if (end == -1) 
            end = document.cookie.length 
         return unescape(document.cookie.substring(offset, end)) 
      } 
   } 
} 
function setCookie(name, value) {
  var today = new Date(); 
  expires = new Date(); 
  expires.setTime(today.getTime() + 1000*60*60*24*1);
  document.cookie = name + "=" + value + ";path=/;expires=" + expires.toGMTString();
}
function changeFontSize(sizeDifference,lay,label){
  setCookie('font_size',sizeDifference);
  setCookie('font_size_label',label);
  var lbl_ary = Array('a_nrm','a_sml','a_med','a_lrg');
  for(i=0; i < lbl_ary.length; i++){
    var ele = document.getElementById(lbl_ary[i]);
    if(lbl_ary[i] == label){
      ele.className = "label_selected";
    } else {
      ele.className = "label";
    }
  }
  var stObj = (document.getElementById) ? document.getElementById(lay) : document.all(lay);
  stObj.style.fontSize = parseInt(sizeDifference) + '%';
  stObj.style.lineHeight = (parseInt(sizeDifference)+55) + '%';
}
function set_font_size(lay){
  var val = getCookie('font_size');
  var lbl = getCookie('font_size_label');
  if(val == undefined){ val = "70"; }
  if(lbl == undefined){ lbl = "a_nrm"; }
  var ele = document.getElementById(lbl);
  ele.className = "label_selected";
  var stObj = (document.getElementById) ? document.getElementById(lay) : document.all(lay);
  if(val != ""){
    stObj.style.fontSize = parseInt(val) + "%";
    stObj.style.lineHeight = (parseInt(val)+55) + "%";
  } else {
    stObj.style.fontSize = 70 + "%";
    stObj.style.lineHeight = 125 + "%";
  }
}
//************ End Default Commands ************
function singleCategoryClick(n){
  var u = location.href;
  var d = u.substring(0,u.indexOf('?'));
  var e = getQuery('expand');
  var num = n.substring(n.indexOf('.')+1, n.length);
  if(u.indexOf('&expand=') == -1){
    location.href = (u + '&expand=' + num + '&link=' + n + '&count=10000#' + n);
  } else {
    if(e != num){
      location.href = (u.substring(0,u.indexOf('&expand=')) + '&expand=' + num + '&link=' + n + '&count=10000#' + n);
    } else {
      if(num.indexOf('.') == -1){
        location.href = (d + '?OpenDocument&count=10000');
      } else {
        location.href = (d + '?OpenDocument&expand=' + num.substring(0,num.lastIndexOf('.')) + '&link=' + n + '&count=10000#' + n);
      }
    }
  }
}
function CategoryClick(n){
  var u = location.href;
  var d = u.substring(0,u.indexOf('?'));
  var e = getQuery('expand');
  var num = n.substring(n.indexOf('.')+1, n.length);
  if(u.indexOf('&expand=') == -1){
    location.href = (u + '&expand=' + n + '&count=10000#' + n);
  } else {
    location.href = (u.substring(0,u.indexOf('&expand=')) + '&expand=' + n + '&count=10000#' + n);
  }
}
function submitSearch(e,f){
  var doc = document.forms[f];
  var q = doc.elements[e];
  if((q.value == "") ){
    alert('Please enter a search query');
  } else {
    doc.submit();
  }
}
function updateFeedType(t){
  if(getQuery('feedtype') != ""){
    location.href = location.href.substring(0,location.href.indexOf('&feedtype')) + "&feedtype=" + t.options[t.selectedIndex].value;
  } else {
    location.href = location.href + "&feedtype=" + t.options[t.selectedIndex].value;
  }
}
function viewTextOnly(){
  var url = "/802577570055BF85/SetTextOnlyCookie?OpenAgent&value=yes&url=" + location.href;
  location.href = url;
}
function viewGraphics(){
  var url = "/802577570055BF85/SetTextOnlyCookie?OpenAgent&value=no&url=" + location.href;
  location.href = url;
}
function ou_init(){
}
//-->

