// checked for highest height
// equal columns
jQuery(document).ready(function(){
	jQuery(".tooltip-link").tooltip({ 
		bodyHandler: function() { 
			var ids=jQuery(this).attr("tooltip-handler");
			return jQuery(ids).html(); 
		}, 
		showURL: false,
		opacity: 1,
		extraClass: "",
		track: true, 
		delay: 0, 
		fixPNG: true			
	});
});
	function fixH(one,two) 
{
		if (document.getElementById(one)) 
	{
		var lh=document.getElementById(one).offsetHeight;
		var rh=document.getElementById(two).offsetHeight;
		var nh = Math.max(lh, rh); 
		document.getElementById(one).style.height=nh+"px";
		document.getElementById(two).style.height=nh+"px";
	}
}

//for three columns
	function sortNum(a,b) { return b-a} 
	function fixH2(one,two,three) {
		if (document.getElementById(one)) {
		var obj=new Array(3);
		var option=[one,two,three];
		for(var i=0; i<option.length; i++) {
		document.getElementById(option[i]).style.height="auto";
		obj[i]=document.getElementById(option[i]).offsetHeight;
		nh=obj.sort(sortNum);
}	

	nh1=nh.splice(1,2);
	for(var i=0; i<option.length; i++) {
	document.getElementById(option[i]).style.height=nh+"px";
	}
}
}
//

	window.onload=function(){
	fixH('sidebar1','pagecontent'); 
	fixH('col1a','col1b');
}

//end equal columns

function correctPNG() // correctly handle PNG transparency
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}
//window.attachEvent("onload", correctPNG);
