function getClientWidth()
{
	var viewportwidth;
	 
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	 
	if (typeof window.innerWidth != 'undefined')
	{
	     viewportwidth = window.innerWidth
	}
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	else 
	if (typeof document.documentElement != 'undefined'
	     	&& 
	    typeof document.documentElement.clientWidth != 'undefined' 
	    	&& 
	    document.documentElement.clientWidth != 0)
	 {
	      viewportwidth = document.documentElement.clientWidth
	 }
	 
	 // older versions of IE	 
	 else
	 {
	      viewportwidth = document.getElementsByTagName('body')[0].clientWidth
	 }		
	 
	 return viewportwidth;
}

function getClientHeight()
{
	var viewportheight;
	 
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	 
	if (typeof window.innerWidth != 'undefined')
	{
	     viewportheight = window.innerHeight
	}
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	else 
	if (typeof document.documentElement != 'undefined'
	     	&& 
	    typeof document.documentElement.clientWidth != 'undefined' 
	    	&& 
	    document.documentElement.clientWidth != 0)
	 {
	      viewportheight = document.documentElement.clientHeight
	 }
	 
	 // older versions of IE	 
	 else
	 {
	      viewportheight = document.getElementsByTagName('body')[0].clientHeight
	 }
	 
	 return viewportheight;
}

function setSearchArea()
{
	var clientWidth = getClientWidth();
		
	//get the width of the central area
	var centralAreaWidth = document.getElementById('center').clientWidth;
	
	//determine the left and rigth offset of the central area
	var offset = (clientWidth - centralAreaWidth) / 2;
	
	var searchArea = document.getElementById('searchArea');
	
	//set the left offset to the search area
	searchArea.style.left = (offset * -1) + 'px';
	
	//set the width of the search area
	searchArea.style.width = clientWidth + 'px';
}

function getX(oElement)
{
	var iReturnValue = 0;
	
	while(oElement != null) 
	{
		iReturnValue += oElement.offsetLeft;
		oElement = oElement.offsetParent;
	}
	
	return iReturnValue;
}

function showSearchArea()
{
	//document.getElementById('searchAreaUL').style.display = 'block';
	document.getElementById('searchAreaUL2').style.display = 'block';
	
}

function switchSearchArea()
{
    if (document.getElementById('searchAreaUL2').style.display == 'none'){ 
	//document.getElementById('searchAreaUL').style.display = 'block';
	document.getElementById('searchAreaUL2').style.display = 'block';
	document.getElementById('SearchLabel').style.display = 'none';
	document.getElementById('SearchLabelC').style.display = 'block';
	}else{
	document.getElementById('searchAreaUL2').style.display = 'none';
	document.getElementById('SearchLabel').style.display = 'block';
	document.getElementById('SearchLabelC').style.display = 'none';
	}
}
function hideSearchArea()
{
	//document.getElementById('searchAreaUL').style.display = 'none';
	document.getElementById('searchAreaUL2').style.display = 'none';
}
