/****
 *  Common
 *  	Contains JavaScript functions common to many pages
 */


/****
 * equalColumns - Sets two CSS columns to have an equal CSS style height
 * @param {String} lCol - Left column
 * @param {String} rCol - Right column
 */
function equalColumns(lCol,rCol){
    l = document.getElementById(lCol);
    r = document.getElementById(rCol);
    
    r.offsetHeight >= l.offsetHeight ? l.style.height = r.offsetHeight + "px" : r.style.height = l.offsetHeight + "px";
}  

  
/****
 * For element el, appends "_on" to el's className for a mouseover effect
 * Appropriate classes must be defined in a selector for el
 * 
 * @param {Object} el Object to roll over
 */
function bgImg_on(el){
    if(el.className.indexOf("_on") == -1){
        el.className += "_on";  
    } 
}


/****
 * For element el, removes "_on" from el's className for a mouseout effect
 * Appropriate classes must be defined in a selector for el 
 * 
 * @param {Object} el Object to roll out
 */
function bgImg_off(el){
    var i = el.className.indexOf("_on");
    if(i != -1){
        el.className = el.className.substring(0,i); 
    }    
    i = null;             
}