<!--
//************ Start Default Commands ************
var graphic = "";
var h = "hidden";
var v = "visible";
var db = "block";
var dn = "none";
var TimerID = null;
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 = "/80257297004E5CC5/" + graphic + "_dn.gif" } }
  if(state==0){ if (version == "js") { document[graphic].src = "/80257297004E5CC5/" + graphic + "_up.gif" } }
}
function imageover(graphic,filename) {
  if (version == "js") { document[graphic].src = "/80257297004E5CC5/" + filename }
}
function inputover(graphic,state) {
  if(state==1){ if (version == "js") { document.getElementById(graphic).src = "/80257297004E5CC5/" + graphic + "_dn.gif" } }
  if(state==0){ if (version == "js") { document.getElementById(graphic).src = "/80257297004E5CC5/" + 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; }
    }
  }
}
//************ End Default Commands ************
//********* Start Rollover Menu Functions ********
function setMenu(tVal){
  var nSel = "nav-" + tVal;
  if( (document.forms[0].isMenu.value == tVal) & (document.forms[0].navSel.value != nSel) ){
    document.forms[0].isMenu.value = "";
  } else {
    document.forms[0].isMenu.value = tVal;
  }
}
function showMenu(section){
  var iSection = "nav-" + section;
  var mSection = "dd_" + section;
  var ele = document.getElementsByTagName('div');
  for(i=0; i < ele.length; i++){
    var n = ele[i].id;
    if(n.indexOf("dd_") > -1){
      if(n.substring(3,n.length) == section){
        displayChange(mSection,'block');
        break;
      }
    }
  }
  document.forms[0].navSel.value = iSection;
  document.getElementById('nav_' + section).className = "nav_main_over";
  document.getElementById(section + '_a').className = "gry";
}
function hideMenu(section){
  var iSection = "nav-" + section;
  var mSection = "dd_" + section;
//  if(document.forms[0].Section.value == "idp_network" && section == "idpnetwork"){
//    document.getElementById('nav_' + section).className = "nav_main_idp_sel";
//    document.getElementById(section + '_a').className = "wht";
//  } else if(document.forms[0].Section.value == "about_us"){
  if(document.forms[0].Section.value == "about_us"){
    if(section == "about"){
      document.getElementById('nav_about').className = "nav_main_sel";
      document.getElementById('about_a').className = "wht";
    } else {
      document.getElementById('nav_' + section).className = "nav_main";
      document.getElementById(section + '_a').className = "gry";
    }
  } else if(document.forms[0].Section.value == section){
    document.getElementById('nav_' + section).className = "nav_main_sel";
    document.getElementById(section + '_a').className = "wht";
  } else {
    document.getElementById('nav_' + section).className = "nav_main";
    document.getElementById(section + '_a').className = "gry";
  }
  document.forms[0].navSel.value = "";
  displayChange(mSection,'none');
}
function setNavigation(section,state){
  if(TimerID){ clearTimeout(TimerID); } 
  if(section == "about"){
    hideMenu('countries');
    hideMenu('training');
    hideMenu('thematic');
    hideMenu('resources');
    hideMenu('news');
 //   hideMenu('idpnetwork');
  } else if(section == "countries"){
    hideMenu('about');
    hideMenu('training');
    hideMenu('thematic');
    hideMenu('resources');
    hideMenu('news');
 //   hideMenu('idpnetwork');
  } else if(section == "training"){
    hideMenu('about');
    hideMenu('countries');
    hideMenu('thematic');
    hideMenu('resources');
    hideMenu('news');
//    hideMenu('idpnetwork');
  } else if(section == "thematic"){
    hideMenu('about');
    hideMenu('countries');
    hideMenu('training');
    hideMenu('resources');
    hideMenu('news');
//    hideMenu('idpnetwork');
  } else if(section == "resources"){
    hideMenu('about');
    hideMenu('countries');
    hideMenu('training');
    hideMenu('thematic');
    hideMenu('news');
//    hideMenu('idpnetwork');
  } else if(section == "news"){
    hideMenu('about');
    hideMenu('countries');
    hideMenu('training');
    hideMenu('thematic');
    hideMenu('resources');
//    hideMenu('idpnetwork');
//  } else if(section == "idpnetwork"){
//    hideMenu('about');
//    hideMenu('countries');
//    hideMenu('training');
//    hideMenu('thematic');
//    hideMenu('resources');
//    hideMenu('news');
  }
  if(state==1){
    showMenu(section);
    document.getElementById('nav_' + section).className = "nav_main_over";
  } else if(state==0){
    hideMenu(section);
    document.getElementById(section + '_a').className = "gry";
//    if(document.forms[0].Section.value == "idp_network" && section == "idpnetwork"){
//      document.getElementById('nav_' + section).className = "nav_main_idp_sel";
//      document.getElementById(section + '_a').className = "wht";
//    } else if(document.forms[0].Section.value == "about_us"){
    if(document.forms[0].Section.value == "about_us"){
      if(section == "about"){
        document.getElementById('nav_about').className = "nav_main_sel";
        document.getElementById('about_a').className = "wht";
      } else {
        document.getElementById('nav_' + section).className = "nav_main";
        document.getElementById(section + '_a').className = "gry";
      }
    } else if(document.forms[0].Section.value == section){
      document.getElementById('nav_' + section).className = "nav_main_sel";
      document.getElementById(section + '_a').className = "wht";
    } else {
      document.getElementById('nav_' + section).className = "nav_main";
      document.getElementById(section + '_a').className = "gry";
    }
  }
}
function timeNav(section,st){
  if(document.forms[0].navSel.value.indexOf(section) > -1){
    if(TimerID){ clearTimeout(TimerID); } 
    TimerID = setTimeout("setNavigation('" + section + "'," + st + ")",400 );
  }
}
//********** End Rollover Menu Functions *********
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){
    if(u.indexOf('&expandview') == -1){
      location.href = (u + '&expand=' + num + '&link=' + n + '&count=10000#' + n);
    } else {
      var loc = replaceSubstring(location.href,'&expandview','');
      location.href = (loc + '&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 singleCategoryClickLinks(country,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 + '?ReadForm&country='+country+'&count=10000');
      } else {
        location.href = (d + '?ReadForm&country='+country+'&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 u = replaceSubstring(u,'&expandview','');
  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 expandNavigation(f){
  var doc = document.forms[1];
  var ele = doc.elements[f];
  if(ele.value != ""){
    var ary = ele.value.split(',');
    for(i=0; i < ary.length; i++){
	e = 'side_' + ary[i];
      if(document.getElementById(e)){
	  if(document.getElementById(e).className.indexOf("_sel") > -1){
          document.getElementById(e).className = "nav_side_dd_sel";
        } else {
          document.getElementById(e).className = "nav_side_dd";
        }
      }
    }
  }
}
function displaySelectedKey(r,ex){
  var e = r + "_" + getQuery(ex);
  var a = r + "_a_" + getQuery(ex);
  if( getQuery('link') ){
    if(document.getElementById(e)){
      document.getElementById(e).className = r + "_sel";
      document.getElementById(a).className = "gry";
    } else {
      document.getElementById(e).className = r;
      document.getElementById(a).className = "red";
    }
  }
}
function getCharCount(n,c){
  var str = "";
  var ary = new Array();
  var co = 0;
  for(i=0; i < n.length; i++){
    if(n.substring(i,(i+1)) == c){
      ary[co] = "y";
      co++;
    }
  }
  return ary.length;
}
function displayCategorySelected(r){
  if(getQuery('link') != ""){
    var n = getQuery('link');
  } else {
    var n = getQuery('expand');
  }  
  if(n.indexOf('.') > -1){
    if(getCharCount(n,'.') > 1){
      var e = r + "_" + n.substring(0,n.lastIndexOf('.'));
      var a = r + "_a_" + n.substring(0,n.lastIndexOf('.'));
    } else if(getCharCount(n,'.') == 1){
      var e = r + "_" + n.substring(0,n.indexOf('.'));
      var a = r + "_a_" + n.substring(0,n.indexOf('.'));
    } else {
      var e = r + "_" + n;
      var a = r + "_a_" + n;
    }
  } else {
    var e = r + "_" + n;
    var a = r + "_a_" + n;
  }
  var se = r + "_" + n;
  var sa = r + "_a_" + n;
  if(n != ""){
    if(document.getElementById(e)){
      if( (n.indexOf('.') > -1) && (getCharCount(n,'.') > 1) ){
        document.getElementById(e).className = r + "_sel";
        document.getElementById(a).className = "gry";
        if(document.getElementById(se)){
          document.getElementById(se).className = "sub_" + r + "_sel";
          document.getElementById(sa).className = "gry";
        }
      } else {
        document.getElementById(e).className = r + "_sel";
        document.getElementById(a).className = "gry";
      }
    }
  }
}
function displayTripleSelected(r){
  if(getQuery('link') != ""){
    var n = getQuery('link');
  } else {
    var n = getQuery('expand');
  }  
  if(n.indexOf('.') > -1){
    if(getCharCount(n,'.') > 1){
      var e = r + "_" + n.substring(0,n.lastIndexOf('.'));
      var a = r + "_a_" + n.substring(0,n.lastIndexOf('.'));
    } else {
      var e = r + "_" + n;
      var a = r + "_a_" + n;
    }
  } else {
    var e = r + "_" + n;
    var a = r + "_a_" + n;
  }
  var se = r + "_" + n;
  var sa = r + "_a_" + n;
  if(n != ""){
    if(document.getElementById(e)){
      if( (n.indexOf('.') > -1) && (getCharCount(n,'.') > 1) ){
        document.getElementById(e).className = r + "_sel";
        document.getElementById(a).className = "gry";
        if(document.getElementById(se)){
          document.getElementById(se).className = "sub_" + r + "_sel";
          document.getElementById(sa).className = "gry";
        }
      } else {
        document.getElementById(e).className = r + "_sel";
        document.getElementById(a).className = "gry";
      }
    }
  }
}
function displayAnotherSelected(r){
  if(getQuery('link') != ""){
    var n = getQuery('link');
  } else {
    var n = getQuery('expand');
  }  
  if(n.indexOf('.') > -1){
    if(getCharCount(n,'.') > 1){
      var e = r + "_" + n.substring(0,n.lastIndexOf('.'));
      var a = r + "_a_" + n.substring(0,n.lastIndexOf('.'));
    } else {
      var e = r + "_" + n;
      var a = r + "_a_" + n;
    }
  } else {
    var e = r + "_" + n;
    var a = r + "_a_" + n;
  }
  var se = r + "_" + n;
  var sa = r + "_a_" + n;
  if(n != ""){
    if(document.getElementById(e)){
      document.getElementById(e).className = r + "_sel";
      document.getElementById(a).className = "gry";
      if( (n.indexOf('.') > -1) && document.getElementById(se)) {
        document.getElementById(e.substring(0,e.indexOf('.'))).className = r + "_sel";
        document.getElementById(a.substring(0,a.indexOf('.'))).className = "gry";
        document.getElementById(se).className = "sub_" + r + "_sel";
        document.getElementById(sa).className = "gry";
      }
    }
  }
}
function checkBoxes(str,title,f){
  var doc = document.forms[f];
  var h = doc.elements[str + title];
  
  if(h.checked){
    for (var i=0; i < doc.elements.length; i++) {
      var e = doc.elements[i];
      if (e.type == 'checkbox' && e.name.indexOf(str) != -1){
        e.checked = true;
      }
    }
  } else {
    for (var i=0; i < doc.elements.length; i++) {
      var e = doc.elements[i];
      if (e.type == 'checkbox' && e.name.indexOf(str) != -1){
        e.checked = false;
      }
    }
    doc.elements['all_check'].checked = false;
  }
}
function checkAllBoxes(str,f){
  var doc = document.forms[f];
  var h = doc.elements[str];
  
  if(h.checked){
    for(var i=0; i < doc.elements.length; i++) {
      var e = doc.elements[i];
      if( (e.type == 'checkbox') && (e.name.indexOf("pr_") <= -1 && e.name.indexOf("include_") <= -1) ){
        e.checked = true;
      }
    }
  } else {
    for (var i=0; i < doc.elements.length; i++) {
      var e = doc.elements[i];
      if( (e.type == 'checkbox') && (e.name.indexOf("pr_") <= -1 && e.name.indexOf("include_") <= -1) ){
        e.checked = false;
      }
    }
  }
}
function openGalleryImage(i){
  var c = getQuery('country');
  var u = getQuery('unid');
  location.href = "/8025708F004CE90B/httpPictureGalleryImage?readform&country=" + c + "&unid=" + u + "&image=" + i;
}
function printPage(){
  var domain = "http://www.internal-displacement.org/";
  if(location.href == domain){
    window.open("/idmc/website/overview.nsf/(httpHomepages)/$first?OpenDocument&count=1000&print=yes");
  } else {
    if(location.href.indexOf('#') > 0){
      var url = location.href.substring(0,location.href.indexOf('#'));
      window.open(url + "&print=yes");
    } else {
      window.open(location.href + "&print=yes");
    }
  }
}
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){
  setCookie('font_size',sizeDifference);
  var stObj = (document.getElementById) ? document.getElementById('body_content') : document.all('body_content');
  stObj.style.fontSize = parseInt(sizeDifference) + '%';
}
function set_font_size(){
  var val = getCookie('font_size');
  var stObj = (document.getElementById) ? document.getElementById('body_content') : document.all('body_content');
  if(val){
    stObj.style.fontSize = parseInt(val) + '%';
  }
}
function setLangCookie(langcode){
  if( (location.href == "http://www.idpvoices.org") || (location.href.indexOf('?') == -1) ){
    var tmpUrl = "/";
  } else {
    var tmpUrl = location.href;
  }
  location.href = "/8025708F004BC2FE/setIDPVoicesLanguageCookie?OpenAgent&langcode="+langcode+"&url="+tmpUrl;
}
function setLangCookieURL(langcode,url){
  var tmpUrl = url;
  location.href = "/8025708F004BC2FE/setIDPVoicesLanguageCookie?OpenAgent&langcode="+langcode+"&url="+tmpUrl;
}
function updateHeight(ifr){
  var ele = parent.document.getElementById(ifr);
  if(navigator.appVersion.indexOf("MSIE") > 0){
    if(navigator.appVersion.indexOf("MSIE 7") > 0){
      var h = document.body.scrollHeight;
    } else {
      var h = document.body.offsetHeight;
    }
  } else {
    var h = (ele.contentDocument.documentElement.scrollHeight + 1);
  }
  ele.height = h;
}
function collectWidth(obj){
var wVal=0
var objs=obj.document.getElementsByTagName('*')
for (var i_tem = 0; i_tem < objs.length; i_tem++){
wVal=Math.max(objs[i_tem].offsetWidth, wVal)
}
return wVal;
}
function sizeFrame(frameObj){
if ((frameObj.contentDocument && (frameObj.contentDocument.body.offsetHeight||frameObj.contentDocument.documentElement.offsetHeight))||frameObj.Document && frameObj.Document.body.scrollHeight){
var contentHeight=window.opera? frameObj.contentDocument.documentElement.offsetHeight : frameObj.contentDocument? frameObj.contentDocument.body.offsetHeight : frameObj.Document.body.scrollHeight+4
var contentWidth=window.opera? collectWidth(frameObj.contentDocument) : frameObj.contentDocument? frameObj.contentDocument.documentElement.offsetWidth : frameObj.Document.body.scrollWidth
var frameWidth=frameObj.offsetWidth
if (window.opera&&frameWidth>=contentWidth)
frameObj.contentDocument.body.style.overflow='hidden'
frameObj.style.overflow='visible'
frameObj.height = frameWidth<contentWidth? contentHeight+18 : contentHeight+4;
}
}
function mainSearch() {
  document.forms[0].Action.value = "main";
  document.forms[0].submit();
}
function keywordSearch() {
if (document.forms[0].Keyword.value == "") {
  alert('Please enter a Keyword');
  } else {
    document.forms[0].Action.value = "keyword";
    document.forms[0].submit();
  }
}
function keywordSearchFromAgent() {
if (document.forms['keyDocSearch'].Keyword.value == "") {
  alert('Please enter a Keyword');
  } else {
    document.forms['keyDocSearch'].submit();
  }
}
function set_stats_rows(){
  if(document.all){
    tmpTr = document.all.tags("tr");
  } else if(document.getElementsByTagName){
    tmpTr = document.getElementsByTagName('tr');
  }
  n=1;
  for(i=1; i <= tmpTr.length; i++) {
    var tTr = tmpTr[i];
    if(tTr.id.indexOf('stats_') > -1){
      trm = document.getElementById('stats_' + n);
      bg1 = document.getElementById('bg1_' + n);
      bg2 = document.getElementById('bg2_' + n);
      if((n%2) == 1){
        bg1.className = "stats_row_1";
        bg2.className = "stats_row_1";
      } else {
        bg1.className = "stats_row_2";
        bg2.className = "stats_row_2";
        tTr.className = "stats_row";
      }
      n++;
    }
  }
}
function updateViewDisplay(li_name, a_name){
  var exp = getQuery('expand');
  var tmp_li = li_name + '_' + exp;
  var tmp_a = a_name + '_' + exp;
  var qs = location.search.substring(1,location.search.length);
  if(exp != ""){
    if(document.getElementById(tmp_li)){
      document.getElementById(tmp_li).className = "links_head_sel";
      document.getElementById(tmp_a).className = "links_head_a";
    }
  } else if(qs.indexOf('expandview') > -1){
    if(document.all){
      tmp_lis = document.all.tags("li");
    } else if(document.getElementsByTagName){
      tmp_lis = document.getElementsByTagName('li');
    }
    n = 1;
    for(i=1; i <= tmp_lis.length; i++) {
      var tLi = tmp_lis[i];
      if(tLi.id.indexOf(li_name + '_') > -1){
        document.getElementById(li_name + '_' + n).className = "links_head_sel";
        document.getElementById(a_name + '_' + n).className = "links_head_a";
        n++;
      }
    }
  }
}
function updateViewAdditionalDisplay(li_name, a_name){
  var exp = getQuery('expand');
  var tmp_li = li_name + '_1.' + exp;
  var tmp_a = a_name + '_1.' + exp;
  var qs = location.search.substring(1,location.search.length);
  if(exp != ""){
    if(document.getElementById(tmp_li)){
      document.getElementById(tmp_li).className = "links_head_sel";
      document.getElementById(tmp_a).className = "links_head_a";
    }
  } else if(qs.indexOf('expandview') > -1){
    if(document.all){
      tmp_lis = document.all.tags("li");
    } else if(document.getElementsByTagName){
      tmp_lis = document.getElementsByTagName('li');
    }
    n = 1;
    for(i=1; i <= tmp_lis.length; i++) {
      var tLi = tmp_lis[i];
      if(tLi.id.indexOf(li_name + '_') > -1){
        document.getElementById(li_name + '_1.' + n).className = "links_head_sel";
        document.getElementById(a_name + '_1.' + n).className = "links_head_a";
        n++;
      }
    }
  }
}
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){
  setCookie('font_size',sizeDifference);
  var stObj = (document.getElementById) ? document.getElementById('pagecontent') : document.all('pagecontent');
  stObj.className = sizeDifference;
}
function set_font_size(){
  var val = getCookie('font_size');

  var stObj = (document.getElementById) ? document.getElementById('pagecontent') : document.all('pagecontent');
  if(val){
    stObj.className = val;
  } else {
    stObj.className = '';
  }
}
//-->
