/* Expanding Div Code starts here */
var DefHt=0; // Default Height of Div
var NewDivId=""; // Div to be opened
var NewDivHt=""; // Height of Div
var CheckDivId=""; // Check Div for closing in For loop

function ExpandDiv(DivId,DivHt) // Main function of the div to open / close - being called from pages
{
	DefHt=0;
    NewDivId="Div"+DivId;
    NewDivHt=DivHt;
	CloseDiv(DivId)
}
function CloseDiv(DivId) // Main function for closing div
{
	for(i=1; i<=4; i++) // this will work for 14 divs
	{
		CheckDivId="Div"+i;
		if(i==DivId) // checking the for loop div with the current which needs to be opened. 
		{
			// Do Nothing
		}
		else // For closing the already open div's
		{
			document.getElementById(CheckDivId).style.height="0px";
			document.getElementById(CheckDivId).style.display="none";
		}
	}
	
	// opening the required div and initialising the Div to zero height
    document.getElementById(NewDivId).style.height=0+"px";
	document.getElementById(NewDivId).style.display="block";
    document.getElementById(NewDivId).style.height=0+"px";
	NewExpDiv(); // initialise the Div Expansion
}
function NewExpDiv()
{
    if(DefHt<NewDivHt)
	{
	    document.getElementById(NewDivId).style.height=DefHt+"px";
	    DefHt=DefHt+16;
	    setTimeout("NewExpDiv()",16);
	}
}
/* Expanding Div Code ENDS here */