function setHeight(flashPadding){
		clearHeight();
		var leftPadding=34;
		var leftbarPadding=0;		
		//IE
		if (document.styleSheets[0].rules){
			leftPadding=4;
		}
		var bodycontentPadding=flashPadding+15*2;
		var maincontentPadding=flashPadding+15*2;
		var rightPadding=flashPadding+15*2;
		//IE
		if (document.styleSheets[0].rules){
			rightPadding=flashPadding;
			}
		if (document.styleSheets[0].rules){
			leftbarPadding=30;
		}

		var mainHeight=document.getElementById("bodycontent").offsetHeight; 
		var leftHeight=document.getElementById("menu").offsetHeight;
		var rightHeight=document.getElementById("right").offsetHeight;
		mainHeight+=flashPadding;
		rightHeight+=flashPadding;
		var offHeight=0;
		//	alert("mainHeight=" + mainHeight+"  leftHeight=" +leftHeight+"  rightHeight=" + rightHeight);
		offHeight=leftHeight;		
		if (mainHeight>offHeight) offHeight=mainHeight;
		if (rightHeight>offHeight) offHeight=rightHeight;
		//if (offHeight<680) offHeight=680; //right image height+linkbox;
		offHeight+=50;

		document.getElementById("bodycontent").style.height=(offHeight-bodycontentPadding) +"px";//45 is the top+bottom margin/padding.
		document.getElementById("leftbar").style.height=(offHeight+leftbarPadding) +"px";//45 is the top+bottom margin/padding.
		document.getElementById("menu").style.height=(offHeight-leftPadding) +"px";//45 is the top+bottom margin/padding.
		document.getElementById("right").style.height=(offHeight-rightPadding) +"px";
		document.getElementById("maincontent").style.height=(offHeight-maincontentPadding) +"px";
}

function clearHeight(){
		document.getElementById("bodycontent").style.height="auto";
		document.getElementById("menu").style.height="auto";
		document.getElementById("right").style.height="auto";
		document.getElementById("maincontent").style.height="auto";

}
function clearNewsletter(curItem){
	if(curItem.value=='submit your email')
		curItem.value='';
}

function setNewsletter(curItem){
	if(curItem.value=='' || curItem.value=='submit your email')
		curItem.value='submit your email';
}

document.getElementsByClassName = function(searchClass, node, tag)
{
	var classElements = [];
	if (node == null) 
	{
		node = document;
	}
	if (tag == null) 
	{
		tag = '*';
	}
	var els = node.getElementsByTagName(tag);
	var pattern = new RegExp("(^|\\s)" + searchClass + "(\\s|$)");
	for (i = 0, elsLen = els.length; i < elsLen; i++) 
	{
		if (pattern.test(els[i].className)) 
		{
			classElements.push(els[i]);
		}
	}
	return classElements;
};
