

/*______________________________________________

  htdocs/js/common.js
  Copyright 2003 Koensha. All rights reserved.
  
________________________________________________*/


var Mac = navigator.appVersion.indexOf('Mac',0) != -1;
var Win = navigator.appVersion.indexOf('Win',0) != -1;
var IE  = navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1;
var NN  = navigator.appName.indexOf("Netscape",0) != -1;
var GE  = navigator.userAgent.indexOf("Gecko") != -1;

// CSS Detect
if( Mac ) {
    document.write('<LINK rel="stylesheet" type="text/css" href="css/mac.css">')
}
if( Win ) {
  if( IE ){
    document.write('<LINK rel="stylesheet" type="text/css" href="/css/msie.css">')
  } else if( NN || GE ){
    document.write('<LINK rel="stylesheet" type="text/css" href="/css/msie.css">')
  } else {
    document.write('<LINK rel="stylesheet" type="text/css" href="/css/moss.css">')
  }
}

// New Window
function information(url){
  var newWindow = window.open(url,'Information','height=600,width=800,top=5,left=5,scrollbars=yes,resizable=yes');
  }
  
function information2(url){
  var newWindow = window.open(url,'Information2','height=420,width=800,top=5,left=5,scrollbars=yes,resizable=yes');
  }
  
function information3(url){
  var newWindow = window.open(url,'Information3','height=600,width=310,top=5,left=5,scrollbars=yes,resizable=yes');
  }

function information4(url){
  var newWindow = window.open(url,'Information4','height=610,width=805,top=5,left=5,scrollbars=yes,resizable=yes');
  }
  
function register(){ 
  window.open("/200411campaign/","mail","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=530,height=600") 
  }
 
function attention(){ 
  window.open("/200411campaign/","mail","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=530,height=600") 
  }

// Scroll Move
function movePosition(){
  position = Math.floor(position*0.8);
  if( position > 0.1 ){
    window.scrollTo(0,position)
    setTimeout("gotoPageTop()",50);
  } else { window.scrollTo(0,0) }
}

function gotoPageTop(){
  if( IE ){
    position = document.body.scrollTop;
  } else {
    position = window.pageYOffset;
  } movePosition()
}


// Goto Top Icon

function arrowOver(n) {
  document.images.arw.src = '/img/gototop_on.gif'
}

function arrowOut(n) {
  document.images.arw.src = '/img/gototop_off.gif'
}

