/* 
  ------------------------------------------------
For setting two <div> columns to equal heights
  ------------------------------------------------
*/
function colH2(){
 var i,oh,h=0,tg,el,np,dA=document.eqc,an=document.eqa;
 if(dA&&dA.length){
 	for(i=1;i<dA.length;i+=2){
 		dA[i+1].style.paddingBottom='';
 	}for(i=1;i<dA.length;i+=2)
 	{
 	oh=dA[i].offsetHeight;
 	h=(oh>h)?oh:h;
 	}
	for(i=1;i<dA.length;i+=2){
	oh=dA[i].offsetHeight;
 	if(oh<h)
 	{
 		np=h-oh;
 		if(!an&&dA[0]==1){eqA2(dA[i+1].id,0,np);
 		}else{
 			dA[i+1].style.paddingBottom=np+"px";
 		}
 	}
 }
 
 document.eqa=1;
 document.eqth=document.body.offsetHeight;
 document.eqtw=document.body.offsetWidth;
 }
}
function eqT2(){ 
 if(document.eqth!=document.body.offsetHeight||document.eqtw!=document.body.offsetWidth){
 	colH2();
 }
}


function equalCols2(){ 
 var c,e,el;
 if(document.getElementById){
 document.eqc=new Array();
 document.eqc[0]=arguments[0];
 for(i=1;i<arguments.length;i+=2){
 	el=null;
 	c=document.getElementById(arguments[i]);
 	if(c){
 		e=c.getElementsByTagName(arguments[i+1]);
 		if(e){
		el=e[e.length-1];
 			if(!el.id){
 				el.id="eq"+i;
 			}
		}
 	}
 	if(c&&el){
 		document.eqc[document.eqc.length]=c;
 		document.eqc[document.eqc.length]=el
 	}
 }
 setInterval("eqT2()",10);
 }
}


function eqA2(el,p,pt){
 var sp=10,inc=20,g=document.getElementById(el);
 np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";
 if(np<pt){np+=inc;
 	setTimeout("eqA2('"+el+"',"+np+","+pt+")",sp);
	}
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
