function openWindow(url,x,y) {
	x=x+10;	y=y+30;
	winStats='toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,width='+x+',height='+y;
	if (navigator.appName.indexOf("Microsoft")>=0) winStats+=',left=10,top=25';
	else winStats+=',screenX=10,screenY=25';
	floater=window.open(url,'kuva',winStats);
	floater.resizeTo(x, y);				
	floater.focus();
}

var browser_IE_NS = (document.body.clientHeight) ? 1 : 0;
var browser_MOZ = (self.innerWidth) ? 1 : 0;
var browser_IE7 = (document.documentElement.clientHeight) ? 1 : 0;
var bh;

allocateSidebarHeight = function () {

if (browser_IE_NS)
	bh = document.body.clientHeight;
else if (browser_MOZ)
	bh = self.innerHeight;
else if (browser_IE7)
	bh = document.documentElement.clientHeight;

var contentDom = document.getElementById("content");
var sidebarDom = document.getElementById("left");


if(
(bh > sidebarDom.offsetHeight && bh > contentDom.offsetHeight)) {
sidebarDom.style.height = bh+"px";
contentDom.style.height = bh+"px";
}
else {
if(contentDom.offsetHeight > sidebarDom.offsetHeight)
	sidebarDom.style.height = (contentDom.offsetHeight)+"px";
else if(contentDom.offsetHeight < sidebarDom.offsetHeight) 
	contentDom.style.height = (sidebarDom.offsetHeight)+"px"; 

}

}

window.onresize=allocateSidebarHeight;
window.onload=allocateSidebarHeight;
