// create flash control
function CreateFlash(flashid, srcpath, width, height, cssclass) {
  var proto = location.protocol;
  var flash_tag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+proto+'//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" id="'+flashid+'" align="middle">'+
  '<param name="allowScriptAccess" value="sameDomain" />' +
  '<param name="movie" value="'+srcpath+'" />' +
  '<param name="quality" value="high" />' +
  '<param name="bgcolor" value="#ffffff" />' +
  '<embed src="'+srcpath+'" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+flashid+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="'+proto+'//www.macromedia.com/go/getflashplayer" />'+
  '</object>';
  
  document.write('<div class="'+cssclass+'">' + flash_tag + '</div>');
}


function gologin() {
  location.href='https://sems.shoeisha.com/users/login/enterprisezine?ref='+escape(location.href)
}

function goregist() {
  location.href='/user/regist/?ref='+escape(location.href);
}


function getaddr(enddom, startdom, user, islink)
{
  var email = user + '@' + startdom + enddom;
  var link = email;
  if (islink)
    link = '<a href="mailto:'+email+'">'+email+'</a>';
    
  document.write(link);
}


//-----------------------------------------------------------------------------
// impAct AD CODE
function impA_rotate(list) {
  var i = list.length;
  while (--i) {
  var j = Math.floor(Math.random() * (i + 1));
  if (i == j) continue;
  var k = list[i]; list[i] = list[j]; list[j] = k;
  }
  for ( i = 0; i <= list.length; i++){ if ( list[i] == "" ) list.splice(i,1);}
  return list;
}
//-----------------------------------------------------------------------------


function menu_open(id,active){
  var isMSIE = navigator.appVersion.indexOf('MSIE')>=0;
  for(var i = 1 ; i <= 8 ; i++){
    if(!document.getElementById('menu-0' + i)){
      continue;
    }
    document.getElementById('menu-0' + i).className = (id != i ? "" : "active");
    if (active != i){
      if(isMSIE){
        document.getElementById('menu-0' + i).attachEvent("onmouseout",function(){ 
          if(event.srcElement.parentNode){
            event.srcElement.parentNode.className = "";
          }
        });
      }else{
        document.getElementById('menu-0' + i).addEventListener( "mouseout",function(){ 
            this.className = "";
              } ,false);
      }
    }
  }
  document.getElementById('menu-0' + active).className = "active";
}
