function SH_Menu (elem) {
 hTR = document.getElementsByTagName('tr');
 for (i = 0; i < hTR.length; i++) {
  if (hTR[i].id != '' && hTR[i].id * 1 == hTR[i].id) {
   hTR[i].style.display = 'none';
  }
  if (hTR[i].id.substr(1, 2) == '-1' || hTR[i].id.substr(2, 2) == '-1' || hTR[i].id.substr(3, 2) == '-1' || hTR[i].id.substr(4, 2) == '-1') {
   hTR[i].style.display = 'none';
  }
 }
 SH_TD();
 myDiv = document.getElementById(elem).style;
 if (myDiv.display != '' && MenuShow != elem) {
  document.getElementById(elem + '-01').background = './images/menu_g_o.jpg';
  document.getElementById(elem + '-02').background = './images/menu_c_o.jpg';
  document.getElementById(elem + '-03').background = './images/menu_c_o.jpg';
  document.getElementById(elem + '-04').background = './images/menu_d_o.jpg';
  myDiv.display = '';
 } else {
  document.getElementById(elem + '-01').background = './images/menu_g.jpg';
  document.getElementById(elem + '-02').background = './images/menu_c.jpg';
  document.getElementById(elem + '-03').background = './images/menu_c.jpg';
  document.getElementById(elem + '-04').background = './images/menu_d.jpg';
  myDiv.display = 'none';
 }
 myDiv = document.getElementById(elem + '-1').style;
 if (myDiv.display != '' && MenuShow != elem) {
  myDiv.display = '';
  MenuShow = elem;
 } else {
  myDiv.display = 'none';
  MenuShow = 0;
 }
}

function SH_TD () {
 hTD = document.getElementsByTagName('td');
 for (i = 0; i < hTD.length; i++) {
  if (hTD[i].id != '') {
   if (hTD[i].id.substr(1, 3) == '-01' || hTD[i].id.substr(2, 3) == '-01' || hTD[i].id.substr(3, 3) == '-01' || hTD[i].id.substr(4, 3) == '-01') {
    hTD[i].background = './images/menu_g.jpg';
   }
   if (hTD[i].id.substr(1, 3) == '-02' || hTD[i].id.substr(1, 3) == '-03' || hTD[i].id.substr(2, 3) == '-02' || hTD[i].id.substr(2, 3) == '-03' || hTD[i].id.substr(3, 3) == '-02' || hTD[i].id.substr(3, 3) == '-03' || hTD[i].id.substr(4, 3) == '-02' || hTD[i].id.substr(4, 3) == '-03') {
    hTD[i].background = './images/menu_c.jpg';
   }
   if (hTD[i].id.substr(1, 3) == '-04') {
    hTD[i].background = './images/menu_d.jpg';
   }
  }
 }
}

MenuShow = 0;

iframeids=["Content"]
iframehide = 'yes';
getFFVersion = navigator.userAgent.substring(navigator.userAgent.indexOf('Firefox')).split('/')[1];
FFextraHeight=parseFloat(getFFVersion) >= 0.1 ? 16 : 0

function resizeCaller () {
 dyniframe = new Array();
 for (i = 0; i < iframeids.length; i++) {
  if (document.getElementById) {resizeIframe(iframeids[i]);}
  if ((document.all || document.getElementById) && iframehide == 'no') {
   tempobj = document.all ? document.all[iframeids[i]] : document.getElementById(iframeids[i])
   tempobj.style.display = 'block';
  }
 }
}

function resizeIframe (frameid) {
 currentfr = document.getElementById(frameid);
 if (currentfr && !window.opera) {
  currentfr.style.display = 'block';
  if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) {
   currentfr.height = currentfr.contentDocument.body.offsetHeight + FFextraHeight;
  } else if (currentfr.Document && currentfr.Document.body.scrollHeight) {
   currentfr.height = currentfr.Document.body.scrollHeight;
  }
  if (currentfr.addEventListener) {
   currentfr.addEventListener('load', readjustIframe, false);
  } else if (currentfr.attachEvent) {
   currentfr.detachEvent('onload', readjustIframe);
   currentfr.attachEvent('onload', readjustIframe);
  }
 }
 scroll(0, 0);
}

function readjustIframe (loadevt) {
 crossevt = (window.event) ? event : loadevt
 iframeroot = (crossevt.currentTarget) ? crossevt.currentTarget : crossevt.srcElement
 if (iframeroot) {resizeIframe(iframeroot.id);}
}

function loadintoIframe (iframeid, url) {
 if (document.getElementById) {document.getElementById(iframeid).src = url;}
}

if (window.addEventListener) {
 window.addEventListener('load', resizeCaller, false);
} else if (window.attachEvent) {
 window.attachEvent('onload', resizeCaller);
} else {
 window.onload=resizeCaller;
}
