
addLoadEvent(resizeImage);

initialcheck = function() {
	setTimeout('CheckWidth()', 100); 
}
addLoadEvent(initialcheck);
//addLoadEvent(getImageSize);


function getImageSize()
{
	
}

function resizeImage()
{
	//alert('call');
	height = document.documentElement.clientHeight;
	width = document.documentElement.clientWidth;
	
	//alert(width + "/" + height);
	//height = width / 3.683;
	height = width / 2.5781;
	
	if (document.getElementById('ef_obj'))
	{
		document.getElementById('content_top_front').style.height = height + "px";
		document.getElementById('ef_obj').style.height = height + "px";
		document.getElementById('content_top_front').style.width = width + "px";
		document.getElementById('ef_obj').style.width = width + "px";
		
		var obj = document.getElementById('ef_obj2');
		if (obj != null) 
		{
			obj.style.height = height + "px";
			obj.style.width = width + "px";
		}
		WindowWidth = GetWidth();
		CheckWidth();
	}
}

//window.onresize = resizeImage;

// for IE

function GetWidth()
{
	if (typeof window.innerWidth != 'undefined')
	{
		viewportwidth = window.innerWidth,
		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)
	{
		viewportwidth = document.documentElement.clientWidth,
		viewportheight = document.documentElement.clientHeight
	}

	// older versions of IE

	else
	{
		viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		viewportheight = document.getElementsByTagName('body')[0].clientHeight
	}
	
	return viewportwidth;
}

function CheckWidth()
{
	if (GetWidth() != WindowWidth)
	{
		resizeImage();
	}
	setTimeout('CheckWidth()', 100); 
}

WindowWidth = 0;
