function div_Init(pProps)
{
	this.DivID = pProps.DivTagID;
	this.CloseImage = pProps.CloseImage;
	this.OpenImage = pProps.OpenImage;
	this.ButtonID = pProps.ButtonTagID;
	this.ButtonClosedValue = pProps.ButtonClosedValue;
	this.ButtonClosedAlt = pProps.ButtonClosedAlt;
	this.ButtonOpenedValue = pProps.ButtonOpenedValue;
	this.ButtonOpenedAlt = pProps.ButtonOpenedAlt;
	this.setOpenCloseState = div_setOpenCloseState;
	this.MaxHeightDuration = 
	this.onLoad = div_onLoad;
}

function div_setOpenCloseState(x)
{
	var b = document.getElementById(this.ButtonID);
	var c = document.getElementById(this.DivID);
	if (b.value == this.ButtonOpenedValue)
	{
		setCookie("MaxHeight",0,"",-1000)
		b.value = this.ButtonClosedValue
		b.alt = this.ButtonClosedAlt
		b.src= this.OpenImage
		c.style.overflow = "auto";
	} 
	else
	{
		setCookie("MaxHeight",1,"",1000*60*10)
		b.value = this.ButtonOpenedValue
		b.alt = this.ButtonOpenedAlt
		b.src=this.CloseImage
		c.style.overflow = "visible";
	}
}
function div_onLoad(x)
{
	var k = getCookie('MaxHeight');
	if (k != null && k ==1)
	{
		this.setOpenCloseState(x)
	}
}
