
function shuffle (elements_a, theWidth)
{
	
if (elements_a!=null)
	
{
		
 for (i=0; i<elements_a.length; i++)
		
 { 

	var anElement=document.getElementById(elements_a[i]);
			
	if (elements_a[i]!="flan_nav")
			
		anElement.style.position="relative"; 
			
	var mptotal=0;
			
        var mpleft=0;
			
        var mptop=0;
			
        if (elements_a[i]=="batt_topbk") { mpleft=0; mptotal=2; mptop=15; }
			
        if (elements_a[i]=="flan_leader") { mpleft=0; mptotal=2; mptop=0; }
			
        if (elements_a[i]=="flan_nav"){ mpleft=0; mptotal=4;}
			
        anElement.style.width=anElement.offsetWidth-theWidth-mptotal+"px";
			
        anElement.style.left=anElement.offsetLeft+theWidth-mpleft+"px";
			
			
        if (elements_a[i]!="maincontent_wrapper")
			
          anElement.style.top=anElement.offsetTop-mptop+"px";
			
		 
 }
	
}

}

function resetLead1()
{

	var theNode=document.getElementById("batt_news");
	
		
        theNode.style.background="#e2e2e2";
		
        theNode.style.float="right";
	
        theNode.style.padding="20px 15px 20px 192px";
	
        var bnews_childNodes=theNode.childNodes;
	
        var diff=0;
	
        for (i=0; i<bnews_childNodes.length; i++) 
	
        {
		
           if (bnews_childNodes[i].nodeName=="H2")
		
	   {
			
             bnews_childNodes[i].style.position="absolute";
			
             bnews_childNodes[i].style.top="40px";
			
             bnews_childNodes[i].style.left="15px";
			
             bnews_childNodes[i].style.width="150px";
			
             diff=bnews_childNodes[i].offsetHeight;
		
           }
		
           if (bnews_childNodes[i].nodeName=="P")
		
	   {
			
               bnews_childNodes[i].style.position="absolute";
			
               bnews_childNodes[i].style.top=43+diff+"px";
			
               bnews_childNodes[i].style.left="15px";
			
               bnews_childNodes[i].style.width="150px";
	
    	   }
	
        } 
	

}

function resetLead()
{
	
var theNode=document.getElementById("batt_right");

	if (typeof(theNode)!="undefined")
	{
		theNode.style.float="left";

		theNode.style.width="180px";

		theNode.style.paddingRight="20px";

		theNode=document.getElementById("batt_news");

		theNode.style.float="left";

		theNode.style.width="295px";	

	}

}

function resetCP()
{
	
    var strHTML="<ifr"+"ame sr"+"c='http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=battmedia&synd=open&w=300&h=340&title=&border=0px' width='300' height='390' style='display:block;overflow:autohidden' frameborder='0' scrolling='no'><\/ifr"+"ame>";
    document.getElementById("slider2_wrap").innerHTML=strHTML;
	
    document.getElementById("slider2_wrap").style.height="390px";

}

function structureTransform()
{
	
    var theElement=document.getElementById("spaceTaker");
	
    var theWidth=173; 
    theElement.style.position="absolute";
	
    theElement.style.top="-90px";
	
    theElement.style.left="0px";
	
    theElement.style.width=theWidth-20+"px";

    var affectedDivs=[ "batt_topbk","flan_leader","flan_content","maincontent_wrapper","flan_nav"]
;	
    shuffle(affectedDivs, theWidth);
	
    document.getElementById("batt_content").style.padding="64px 0px 0px 0px";
	
    document.getElementById("batt_topbk").innerHTML=theElement.innerHTML;
	
    var contentNode = document.getElementById("batt_features_wrap");
	
    contentNode.style.visibility="hidden";
	
    theElement.innerHTML=contentNode.innerHTML;
	
    contentNode.innerHTML="";
	
    document.getElementById("batt_features").style.height=document.getElementById("batt_content_wrap").offsetHeight+"px";
	
    resetCP();
    resetLead();
	
}


structureTransform();