var iHeight = 200 ;
var collapseStep = 100 ;
var aniSpeed = 2;

function minimisepanel(objDiv)
{
	var t = parseInt( YAHOO.util.Dom.getStyle(objDiv, 'height'));
//	YAHOO.util.Dom.setStyle(objDiv, 'opacity',t/iHeight );
	if(t>0)
	{	t=t-collapseStep ;
		if(t<=0){YAHOO.util.Dom.setStyle(objDiv, 'display','none');}
		YAHOO.util.Dom.setStyle(objDiv, 'height',t);
		setTimeout( "minimisepanel('"+objDiv+"');",aniSpeed);
	}
}

function maximisepanel(objDiv)
{
	YAHOO.util.Dom.setStyle(objDiv, 'display','block')
	var t = parseInt( YAHOO.util.Dom.getStyle(objDiv, 'height'));
//	YAHOO.util.Dom.setStyle(objDiv, 'opacity',t/iHeight );
	if(t<=(iHeight-collapseStep))
	{	t=t+collapseStep ;
		YAHOO.util.Dom.setStyle(objDiv, 'height',t);
		setTimeout( "maximisepanel('"+objDiv+"');",aniSpeed);
	}
	
}


function ShowHide(objID,DivBG,img,max,min)
{
	if (YAHOO.util.Dom.getStyle(objID, 'display')=='block')
	{
	minimisepanel(objID);
	DivBG.style.backgroundColor = "#275481"
	document.getElementById(img).style.display = "none"
	document.getElementById(max).style.display = "inline"
	document.getElementById(min).style.display = "none"
	
	return
	}
	
	maximisepanel(objID);
	DivBG.style.backgroundColor = "#8fa2ce";
	document.getElementById(img).style.display = "block"
	document.getElementById(max).style.display = "none"
	document.getElementById(min).style.display = "inline"


	
}


function BGChange(objID1,bgColor)
{
	if (YAHOO.util.Dom.getStyle(objID1, 'display')=='block')
	{
		bgColor.style.backgroundColor = "#8fa2ce"
	}

	else if (bgColor.style.backgroundColor == "#275481")
	{
	bgColor.style.backgroundColor = "#8fa2ce"
	}
	else if (bgColor.style.backgroundColor == "#8fa2ce")
	{
	bgColor.style.backgroundColor = "#8fa2ce"
	}


}

function BGChange2(objID2,bgColor2)
{
	var t = parseInt( YAHOO.util.Dom.getStyle(objID2, 'height'));
	
	if (t==200)
	{
		bgColor2.style.backgroundColor = "#8fa2ce";
	
	}
else 
{
	bgColor2.style.backgroundColor = "#275481"
	
		
}
	
}		
 

