/*
' -------------------------------------------------------------
'' eSRO Basket Site
'' Version: 3.2.5 
'' May 28, 2006 
'' Powered by: TopTix LTD.
'' -------------------------------------------------------------
'' flow_netscape.js - script that handles the content overflow
'' for the flow container DIV's on gecko-based browsers
'' -------------------------------------------------------------
*/
	if (window.navigator.appName.toLowerCase().indexOf("netscape")>-1)
	{
		window.addEventListener('load',handle_overlows,false);
		window.addEventListener('resize',handle_overlows,false);
	}
	
	function handle_overlows()
	{
		var th,tw,tmp,ch,cw;
		var dvs=document.getElementsByTagName("div");
		
		for (var i=dvs.length-1; i>=0; i--)
			if (dvs[i].getAttribute('mark1')!=null)
			{
			    ch=dvs[i].clientHeight;
			    cw=dvs[i].clientWidth;
			    if (dvs[i].className=='d2'){
			        tw=th=0;
			        for (var j=0;j<dvs[i].childNodes.length;j++){
			            if (typeof(tmp=dvs[i].childNodes[j].clientHeight)!='undefined')
				            th+=tmp;
				        if (typeof(tmp=dvs[i].childNodes[j].clientWidth)!='undefined')
				            tw+=tmp;
				    }
			    }else{
			        th=dvs[i].getElementsByTagName('div')[1].clientHeight;
			        tw=dvs[i].getElementsByTagName('div')[1].clientWidth;
			    }
			    if (th>ch)
				    dvs[i].style.height=th;
				if (tw>cw)
				    dvs[i].style.width=tw;
			}
	}
