
var eqcolumns=new Object()

// SEETINGS
//Eqcolumns.columnswatch=[ "leftcolumn", "midcolumn", "rightcolumn"]
eqcolumns.columnswatch=[ "container" ]
// -----

eqcolumns.setHeights=function(reset){
var tallest=0
var resetit=(typeof reset=="string")? true : false
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null){
if (resetit)
document.getElementById(this.columnswatch[i]).style.height="auto"
if (document.getElementById(this.columnswatch[i]).offsetHeight>tallest)
tallest=document.getElementById(this.columnswatch[i]).offsetHeight
}
}
if (tallest > 0){
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null)
document.getElementById(this.columnswatch[i]).style.height=tallest+"px"
}
}
}

eqcolumns.resetHeights=function(){
this.setHeights("reset")
}

eqcolumns.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}

eqcolumns.dotask(window, function(){eqcolumns.setHeights()}, "load")
eqcolumns.dotask(window, function(){if (typeof eqcolumns.timer!="undefined") clearTimeout(eqcolumns.timer); eqcolumns.timer=setTimeout("eqcolumns.resetHeights()", 200)}, "resize")


