	function squaretabs(){
		var tabbar = document.getElementById('tabs');
		// this will fail if there's random HTML in that div
		
		var ul  = tabbar.childNodes[0];
		var lis = ul.getElementsByTagName('li');
		var i=0; 
		var li;	
		var liPos;
		var offsetTopInit = -1;
		var clientHeightInit = -1;
		
		for  (i = 0; i<lis.length; i++)
			{
			li = lis[i];
			liPos = globalFindPos(li);
			
			if (offsetTopInit ==-1) 
				{
				
				offsetTopInit = liPos[1];
				clientHeightInit =li.clientHeight;
				}
			else
				{
					if (liPos[1] != offsetTopInit || li.clientHeight!= clientHeightInit)
						{
						
						// find appropriate content, move to no tab area
						var tab=document.getElementById(li.id.replace(/tab_/g,'cb_'));
						var x;

						tab.className = tab.className.replace(' cbnotselected','');
						tab.className = tab.className.replace(' cbselected','');
						tab.className = tab.className + ' cbalways';
						var ntc= document.getElementById('nontabcontainer');
						addheader(tab);
						ntc.appendChild(tab);
						ul.removeChild(li);
						i=i-1;	
						}
				}
			}

		}
    function addheader(tab){
    //if we remove a tab, lets add the header back
		tab.innerHTML = tab.innerHTML.replace('iazheadhide', 'iazhead');
		
    }		
		
	function maketabactive(activeid)
	{	
	
		//history.previous='www.cnn.com';
		//alert('maketabactcall');
		//var brtt = URLDecode(activeid);
		var contentid  = 'cb_' + activeid;
		
		//var tabs = document.getElementsByName('contentbox'); 
		// IE Doesn't like document get elements by name
		var tabs = getElementsByName_iefix('div','contentbox');
		var tab;
		var i = 0 ;
		var tabcontainer = document.getElementById('tabcontainer1');
	
		
		for (i = 0; i<=tabs.length - 1; i=i+1)
		{
			tab = tabs[i];
			tab.className = tab.className.replace(' cbnotselected','')
			tab.className = tab.className.replace(' cbselected','')
				
			
			if (tab.className.indexOf('cbalways') == -1)
			{
			if(tab.id != contentid) 
				{
					
					
					//alert(thetr);
					tab.style.display='none';

				}
			else
				{
					tab.style.display='';
				};
			};
		};
		if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) 
		{
			var thetr = document.getElementById('thetr');
			if (thetr) {
				var thetrParent = thetr.parentNode;
				
				var ttpbs = document.getElementById('ttpbs');
				if (ttpbs) {
				var ttpbsParent = ttpbs.parentNode;
				ttpbs.vAlign ='top';
				ttpbs.innerHTML = thetr.innerHTML;
				ttpbs.style.paddingTop = '2px';
				thetrParent.removeChild(thetr);
				
				}
				
			}		
		}

		
		
		//alert(thetab.offsetHeight);
		
		//var thetr = document.getElementById('thetr');
		
		//thetr.style.height='auto';
		//thetr.style.verticalAlign='top';
		
		//alert(thetr.innerHTML);
		//var ih =thetr.innerHTML;
		//thetr.innerHTML ='';
		
		//thetr.style.height='auto';
		//var par = thetr.parentNode;
		
		//par.removeChild(thetr);
		//alert(par.childNodes.length);
		//par.appendChild(thetr);
		//alert(par.childNodes.length);
				
		var tabs = getElementsByName_iefix('li', 'tab');
		var thisID;
		var tabPar;
		
		for (i = 0; i<=tabs.length -1 ; i=i+1)
		{
			tab = tabs[i];
			
			if (tab.className !='inactive') {
			
				
				
				
				if (tab.id != 'tab_' + activeid) {
					tab.style.display='none';
					tab.className = 'unselected';
					tab.style.display='inline';
					//tab['className'] = 'unselected';
					//tab.style.display='none';
					//tab.style.display='block';
					//tab.style.fontweight='bold';	
					//tab.style.backgroundimage= url(../images/tab-pbgs.jpg);
							}
				else 			{
					
					//tab['className'] = 'selected';
					tab.style.display='none';
					tab.className = 'selected';
					tab.style.display='inline';
					
								};
						
				//tab.parentNode.appendChild(tab);	
				
					
				
											};	
			
					
		};
				
		//return false;	
	};
		
		
		
	
	