  var ContainerName = 'http://contact.src-inet.co.jp/UserEntry/Main';
var mainWindowObj = null;
function indexEventCall ( argEventID , argOperation ) {
    var form=document.getElementById("BODY");
    form.EVENT_ID.value  = argEventID;
    form.OPERATION.value = argOperation;
    var x = "",y  = "";
    var wText = "";
    var hText = "";

    wText = 800;
    hText = 864;
    if ( mainWindowObj != null ) {
      if ( !mainWindowObj.closed ) {
        mainWindowObj.close();
      }
    }
    var winParam = "width="+wText+",height="+hText+",left="+x+",top="+y+",status=yes,scrollbars=yes,resizable=yes";
    mainWindowObj = window.open("" , "MainWindow" , winParam);
    form.action = ContainerName;
    form.target = "MainWindow";
    form.submit();
}

function changeMenuColor(argType){
  var anchor = document.getElementById("mmenu"+argType);
  anchor.style["backgroundColor"]="#8C8CDE";
  anchor.style["cursor"]="pointer";
}
function normMenuColor(argType){
  var anchor = document.getElementById("mmenu"+argType);
  anchor.style["backgroundColor"]="#3366cc";
}

/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Konstantin Jagello | http://javascript-array.com/ */

var TimeOut         = 300;
var currentLayer    = null;
var currentitem     = null;
var currentLayerNum = 0;
var noClose         = 0;
var closeTimer      = null;

function mopen(n) {
  var l  = document.getElementById("menu"+n);
  var mm = document.getElementById("mmenu"+n);

  changeMenuColor(n);
  switch (n) {
  case 1:
    break;
  case 2:
    l.style.width = 240;
    break;
  case 3:
    l.style.width = 220;
    break;
  case 4:
    l.style.width = 150;
    break;
  }

  if(l) {
    mcancelclosetime();
    l.style.visibility='visible';
    if(currentLayer && (currentLayerNum != n))
      currentLayer.style.visibility='hidden';
    currentLayer = l;
    currentitem = mm;
    currentLayerNum = n;			
  } else if(currentLayer) {
    currentLayer.style.visibility='hidden';
    currentLayerNum = 0;
    currentitem = null;
    currentLayer = null;
 	}
}

function mclosetime(n) {
  closeTimer = window.setTimeout(mclose, TimeOut);
  normMenuColor(n);
}

function mcancelclosetime() {
  if(closeTimer) {
    window.clearTimeout(closeTimer);
    closeTimer = null;
  }
}

function mclose() {
  if(currentLayer && noClose!=1)   {
    currentLayer.style.visibility='hidden';
    currentLayerNum = 0;
    currentLayer = null;
    currentitem = null;
  } else {
    noClose = 0;
  }
  currentLayer = null;
  currentitem = null;
}

document.onclick = mclose; 

