/*--------------------------------------------------------------------------* * * heightline javascript library beta4 * * mit-style license. * * 2007 kazuma nishihata * http://www.webcreativepark.net * *--------------------------------------------------------------------------*/ new function(){ function heightline(){ this.classname="heightline"; this.parentclassname="heightlineparent" reg = new regexp(this.classname+"-([a-za-z0-9-_]+)", "i"); objcn =new array(); var objall = document.getelementsbytagname ? document.getelementsbytagname("*") : document.all; for(var i = 0; i < objall.length; i++) { var eltclass = objall[i].classname.split(/\s+/); for(var j = 0; j < eltclass.length; j++) { if(eltclass[j] == this.classname) { if(!objcn["main cn"]) objcn["main cn"] = new array(); objcn["main cn"].push(objall[i]); break; }else if(eltclass[j] == this.parentclassname){ if(!objcn["parent cn"]) objcn["parent cn"] = new array(); objcn["parent cn"].push(objall[i]); break; }else if(eltclass[j].match(reg)){ var ocn = eltclass[j].match(reg) if(!objcn[ocn]) objcn[ocn]=new array(); objcn[ocn].push(objall[i]); break; } } } //check font size var e = document.createelement("div"); var s = document.createtextnode("s"); e.appendchild(s); e.style.visibility="hidden" e.style.position="absolute" e.style.top="0" document.body.appendchild(e); var defheight = e.offsetheight; changeboxsize = function(){ for(var key in objcn){ if (objcn.hasownproperty(key)) { //parent type if(key == "parent cn"){ for(var i=0 ; iccn[j].offsetheight?max_height:ccn[j].offsetheight; } } for(var j=0 ; jobjcn[key][i].offsetheight?max_height:objcn[key][i].offsetheight; } for(var i=0 ; i