
var isDOM=(document.getElementById)?true:false;
var isMSIE=(document.all)?true:false;

function getElement(arg) {
  if (isDOM) { return(document.getElementById(arg)); }
  else if (isMSIE) { return(document.all[arg]); }
  else { return(false); }
}

function showMenu(arg) {
  menu=getElement(arg);
  menu.style.display='';
}

function hideMenu(arg) {
  menu=getElement(arg);
  menu.style.display='none';
}


function createFlashObject(){

 var embed = document.createElement('embed');
 embed.setAttribute('width',879);
 embed.setAttribute('height',82);
 embed.setAttribute('src','./images/scrollbar.swf');
 embed.setAttribute('type','application/x-shockwave-flash');
 embed.setAttribute('allowScriptAccess','always');
 embed.setAttribute('movie','./images/scrollbar.swf');
 embed.setAttribute('quality','high');
 embed.setAttribute('bgcolor','#617290');
 embed.setAttribute('wmode','transparent');

 var div = getElement('flashobject');
 var holder = getElement('flashholder');
 holder.replaceChild(embed,div);

}

function loadBanner(){

 var embed = document.createElement('embed');
 embed.setAttribute('width',560);
 embed.setAttribute('height',200);
 embed.setAttribute('src','./images/kabostyl2007.swf');
 embed.setAttribute('type','application/x-shockwave-flash');
 embed.setAttribute('allowScriptAccess','always');
 embed.setAttribute('movie','./images/kabostyl2007.swf');
 embed.setAttribute('quality','high');
 embed.setAttribute('bgcolor','#FFFFFF');

 var div = getElement('flashobject');
 var holder = getElement('flashholder');
 holder.replaceChild(embed,div);

}


function GetScreenMiddleX(width) {
  ret = Math.round(top.screen.width/2-width/2);
  return (ret);
}

function GetScreenMiddleY(height) {
  ret = Math.round(top.screen.height/2-height/2);
  return (ret);
}

function openWinInCenter(url,winWidth,winHeight) {
popup=window.open(url,'popup','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+winWidth+',height='+winHeight+',left='+GetScreenMiddleX(winWidth)+',top='+GetScreenMiddleY(winHeight));
}

function wnopen(url) {
openWinInCenter(url,600,700);
}


