﻿

function setHPBoxHeight() {
    var heightSet = document.getElementById('contentBox').offsetHeight;
    
    alert(heightSet);
}

function matchHeight(){ 
 if(document.getElementsByTagName) { 
     var divs,contDivs,maxHeight,divHeight,d; 
     
     // get all <div> elements in the document 
     divs=document.getElementsByTagName('div'); 

     contDivs=[]; 

     // initialize maximum height value 
     maxHeight=0; 

     // iterate over all <div> elements in the document 
     for(var i=0;i<divs.length;i++){ 
          // make collection with <div> elements with class attribute 'setheight'
          
          if(/\bsetheight\b/.test(divs[i].className)){
                d=divs[i]; 
                contDivs[contDivs.length]=d; 
                
                // determine height for <div> element 
                if(d.offsetHeight){ 
                     divHeight=d.offsetHeight; 
                } 
                else if(d.style.pixelHeight){ 
                     divHeight=d.style.pixelHeight; 
                } 

                // calculate maximum height 
                maxHeight=Math.max(maxHeight,divHeight); 
                //if (maxHeight < 450) {
                  //  maxHeight = 450;
                //}

          } 
     } 

     // assign maximum height value to all of container <div> elements 
     for(var i=0;i<contDivs.length;i++){ 
          contDivs[i].style.height = maxHeight + "px"; 
     } 
   }
} 

function newImage(arg) { 
   if (document.images) { 
      rslt = new Image(); 
      rslt.src = arg; 
      return rslt; 
   } 
} 

function changeImagesPre() { 
   if (document.images && (preloadFlag == true)) { 
      for (var i=0; i<changeImages.arguments.length; i+=2) { 
         document[changeImages.arguments[i]].src = changeImages.arguments[i+1]; 
      } 
   } 
} 

function preloadImages() { 
   if (document.images) { 
      empLT = newImage("/images"); 
   } 
} 

function chgImg(id, strPath) {
    var imgObj = document.getElementById(id);
    imgObj.src = strPath;
}

if (document.images) {
  image1on = new Image();
  image1on.src = "/images/empOverLt.jpg";

  image2on = new Image();
  image2on.src = "/images/contactOverRt.jpg";
  
  image1off = new Image();
  image1off.src = "/images/empOffLt.jpg";

  image2off = new Image();
  image2off.src = "/images/contactOffRt.jpg";
}
  
function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

function chgTabImg(aID, aClassName) {
    var cssObj = document.getElementById(aID);
    
    cssObj.className = aClassName;
}



