// Role_over

function rollOver(obj,val) {
obj.src = val;
}

// window open close
function oyaWin(oyaURL){
if(!window.opener || window.opener.closed){
	if(!window.oya){
		oya2=window.open("","oya");
		oya2.location=oyaURL;
		oya2.focus();
	}else{
	window.oya.location=oyaURL;}
	return(!window.opener);
}else if(!window.opener.closed){
window.opener.location=oyaURL;
window.opener.focus();}
return;
}

// get xHeight ------- source from >> http://cross-browser.com/x/lib/view.php?sym=xclientheight
function xClientHeight() {
  var v=0,d=document,w=window;
  if(d.compatMode == 'CSS1Compat' && !w.opera && d.documentElement && d.documentElement.clientHeight)
    {v=d.documentElement.clientHeight;}
  else if(d.body && d.body.clientHeight)
    {v=d.body.clientHeight;}
  else if(xDef(w.innerWidth,w.innerHeight,d.width)) {
    v=w.innerHeight;
    if(d.width>w.innerWidth) v-=16;
  }
  return v;
}

// footer height control
function heightcontrol() {
var wndwHeight = xClientHeight();
var divHeightall = document.getElementById('header').offsetHeight + document.getElementById('globalmenu').offsetHeight + document.getElementById('maincontents').offsetHeight + document.getElementById('footer').offsetHeight;
var divHeight = document.getElementById('maincontents').offsetHeight;
var cntntHeightB = document.getElementById('leftmenu').offsetHeight;
var vein = wndwHeight - divHeightall;
var cntntHeight = divHeight + 0 + vein;

if(vein > 0)
	document.getElementById('contentbox').style.height = cntntHeight +"px";
	else if(cntntHeightB >= cntntHeight)
	document.getElementById('contentbox').style.height = cntntHeightB +"px";
	else
	document.getElementById('contentbox').style.height = cntntHeight +"px";
}