function newsletterOption()
{		
	// assigned relevant IDs 				
	assignedID = document.getElementById("checkboxList").style;							
	maskedID = document.getElementById("maskLayer").style;
		
	functionOption = parseInt(document.getElementById("checkboxList").style.height);
	var expandButton = document.getElementById("btnExpand");	
	
	if(functionOption == 0)
	{
		// replace expand button	
		expandButton.src = expandButton.src.replace("btn_choosecategory.gif","btn_choosecategory2.gif");		
		expand();
	}
	else
	{
		// replace expand button		
		expandButton.src = expandButton.src.replace("btn_choosecategory2.gif","btn_choosecategory.gif");	
		collapse();
	}
}

function expand()
{			
	var currentHeight = parseInt(assignedID.height);
	var currentMaskedHeight = parseInt(maskedID.height);
	
	var newHeight = currentHeight + 2;
	var newMaskedHeight = currentMaskedHeight + 2;
	
	if(currentHeight <= 444)
	{			
		assignedID.height = newHeight + "px";
		
		var setHeight = 138;
				
		if (navigator.appName.indexOf('Microsoft') != -1)
		{
			setHeight = 138;
		}		
		else if (navigator.appName.indexOf('Netscape') != -1)
		{
			setHeight = 140;
		} 			
		
		if(currentHeight > setHeight)
		{			
			maskedID.height = newMaskedHeight + "px";
		}
		
		if(currentHeight < 444)
		{
			setTimeout('expand()', 1);
		}
	}
}

function collapse()
{	
	var currentHeight = parseInt(assignedID.height);
	var currentMaskedHeight = parseInt(maskedID.height);
	
	var newHeight = currentHeight - 2;
	var newMaskedHeight = currentMaskedHeight - 2;
	
	assignedID.height = newHeight + "px";
	
	if(currentHeight > 140)
	{
		maskedID.height = newMaskedHeight + "px";
	}
	
	if(currentHeight > 1)
	{
		setTimeout('collapse()', 1);
	}
}	