function getBrowserHeight() {
        if ( window.innerHeight ) {
                return window.innerHeight;
        }
        else if ( document.documentElement && document.documentElement.clientHeight != 0 ) {
                return document.documentElement.clientHeight;
        }
        else if ( document.body ) {
                return document.body.clientHeight;
        }
        return 0;
}

window.onload=function() {
	if(h = document.getElementById("right")){
		lm = document.getElementById("left_menu");
		if(h.clientHeight > lm.clientHeight+100){
			boxh = h.clientHeight - 100 + "px";
			document.getElementById("left_menu").style.height = boxh;
		}else{
			l = document.getElementById("left");
			boxh = (l.clientHeight - 84) + "px";
			document.getElementById("right_contents").style.height = boxh;
		}
	}
	
	bh = getBrowserHeight();
	ch = document.getElementById("contents");
	
	if(bh > ch.clientHeight + 221){
		document.getElementById("contents_fix").style.height = bh - 221 + 'px';
	}
}

function opn_win(URL,W,H) {
	var win;
	win = window.open(URL, 'NewWin', 'toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width='+W+',height='+H);
}
