//platform and browser check

var ISieWIN = false;
var platform = navigator.appVersion;
var browser = navigator.appName;

if ((platform.indexOf("Win") >= 0) || (platform.indexOf("NT") >= 0))
{
	if(browser == "Microsoft Internet Explorer")
	{
		
		//for layer opacity
		ISieWIN = true;

		//for pngs
		document.writeln('<style type="text\/css">img { visibility:hidden; } <\/style>');
		window.attachEvent("onload", fnLoadPngs);
		
	}	
}


function popSide()
{

	var winHeight;
	var pageHeight;
	var sideHeight;
	var winWidth;
	var pageWidth;
	
	
	if (window.innerHeight)//safari... firefox2, firefox3
	{
		//alert(1);
		winHeight = window.innerHeight;
		winWidth =  window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientHeight)// ??
	{
		//alert(2);
		winHeight = document.documentElement.clientHeight;
		winWidth = document.documentElement.clientWidth;
	}
	else if (document.body)//ie6, ie7
	{
		//alert(3);
		winHeight = document.body.clientHeight;
		winWidth = document.body.clientWidth;
	}

	//alert("winHeight = " + winHeight);
	
	
	
	
	
	//pageWidth = Math.max(1024,winWidth);
	//document.getElementById("page").style.width = (pageWidth-67) + "px";

 
	//alert(document.getElementById("page").offsetWidth +" or "+ winWidth);
	
	pageHeight = document.getElementById("page").offsetHeight;
	
	
	//alert("pageHeight = " + pageHeight);
	
	

	sideHeight = Math.max(winHeight,pageHeight);
	
	

	document.getElementById("sider").style.height = sideHeight + "px";
	 
 
	//alert(sideHeight);

	

}




//png fix in IE windows

function fixToo()
{
	if(ISieWIN )
	{
		fnLoadPngs();
	}
}



function fnLoadPngs() {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
		if (itsAllGood && img.src.match(/\.png$/i) != null) {
			var src = img.src;
			img.style.width = img.width + "px";
			img.style.height = img.height + "px";
			img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
			img.src = "images/spacer.gif";
		}
		img.style.visibility = "visible";
	}
}