var viewportwidth;


function showRightBanners() {
 	
	// 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;
	}
	
	
	if (viewportwidth > 1240) {
		document.getElementById('container2').style.width="1220px";
		document.getElementById('mainRightBanner').style.display="block";	
	}
	else {
		document.getElementById('container2').style.width="1000px";
		document.getElementById('mainRightBanner').style.display="none";	
	}
	//alert(viewportwidth);

}

function init() {
	window.onresize=showRightBanners;
}	




//document.body.Attributes.Add('onload', 'showRightBanners()')
//document.body.Attributes.Add('onresize', 'showRightBanners()')


window.onresize=showRightBanners;
window.onload=showRightBanners;
