// JavaScript Document
/*
-----------------------------------------------------------
	mmm.js
	(C)2007 M.M.M Kawamura
-----------------------------------------------------------
*/

/* Window Open */

 function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/* L-size + banner ID Window Open */

 function OpWindow_lb(theURL,winName) {
  window.open(theURL,winName,'scrollbars=no,resizable=no,width=860,height=750');
}

/* L-size ID Window Open */

 function OpWindow_l(theURL,winName) {
  window.open(theURL,winName,'scrollbars=no,resizable=no,width=860,height=690');
}

/* S-size_ID Window Open */

 function OpWindow_s(theURL,winName) {
  window.open(theURL,winName,'scrollbars=no,resizable=no,width=800,height=550');
}

/* L-size Movie Window Open */

 function OpWindow_lmov(theURL,winName) {
  window.open(theURL,winName,'scrollbars=no,resizable=no,width=780,height=400');
}

/* S-size Movie Window Open */

 function OpWindow_smov(theURL,winName) {
  window.open(theURL,winName,'scrollbars=no,resizable=no,width=400,height=400');
}

/* Center Window Open */

function window_open(url, w, h){

 	X = w;Y = h;
 	WX = (screen.width - X) / 2;
 	WY = (screen.height - Y) / 2;
	window.open(url,"index","left=" + WX + ",top=" + WY + ",width=" + X + ",height=" + Y);

}


/* to Top Scroll */

var scrj = 1;
function softScrollBack() {
   if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat")
      var scdist = document.body.parentNode.scrollTop;
   else
      var scdist = document.body.scrollTop;
   if(scrj<50 && scdist) {
      scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
      scrj++;
      scrollBy(0,-scdist);
      setTimeout("softScrollBack()",20);
   } else {
      scrollTo(0,0);
      scrj = 1;
   }
}
