

// ADD ONRESIZE EVENTS
function add_onresize_event( new_function )
{
	var old_onresize = window.onresize;
	if (typeof window.onresize != 'function')
	{
		window.onresize = new_function;
	}
	else
	{
		window.onresize = function()
		{
			old_onresize();
			new_function();
		}
	}
}








function show(id)
{
	document.getElementById(id).style.display='block';
}

function hide(id)
{
	document.getElementById(id).style.display='none';
}

function window_width() 
{
	var myWidth = 0;
	if( typeof( window.innerWidth ) == 'number' ) 
	{
		//Non-IE
		myWidth = window.innerWidth;
	} 
	else if( document.documentElement && ( document.documentElement.clientWidth ) ) 
	{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	} 
	else if( document.body && ( document.body.clientWidth ) )
	{
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	}
	return Number( myWidth );
}