/*Roll Over & Out*/

var $cc = new Object();
$cc.Img = function($mouseover, $mouseout) {
  this.mouseover = $mouseover;
  this.mouseout = $mouseout;
}
$cc.Base = function() {
  var $undefined;
  return arguments[0] == $undefined ? '' : arguments[0];
}
$cc.Cache = function($obj) {
  for(var $p in $obj) {
    eval('this.'+$p+' = new Object()');
    for(var $p2 in eval('$obj.'+$p)) {
      eval('this.'+$p+'.'+$p2+' = new Image()');
      eval('this.'+$p+'.'+$p2+'.src = $cc.Cache.base+$obj.'+$p+'.'+$p2);
    }
  }
}
$cc.Load = function($id, $obj) {
  eval('$obj.'+$id+'.mouseout.src = $obj.'+$id+'.mouseover.src');
  eval('document.'+$id+'.src = $obj.'+$id+'.mouseover.src');
}
$cc.Mouseover = function($id, $obj) {
  eval('document.'+$id+'.src = $obj.'+$id+'.mouseover.src');
}
$cc.Mouseout = function($id, $obj) {
  eval('document.'+$id+'.src = $obj.'+$id+'.mouseout.src');
}
$cc.img = new Object();




/* Index Trouble Area */
$cc.img.index_btn_trouble01 = new $cc.Img("data/index_btn_trouble01_over.gif", "data/index_btn_trouble01.gif");
$cc.img.index_btn_trouble02 = new $cc.Img("data/index_btn_trouble02_over.gif", "data/index_btn_trouble02.gif");
$cc.img.index_btn_trouble03 = new $cc.Img("data/index_btn_trouble03_over.gif", "data/index_btn_trouble03.gif");
$cc.img.index_btn_trouble04 = new $cc.Img("data/index_btn_trouble04_over.gif", "data/index_btn_trouble04.gif");
$cc.img.index_btn_trouble05 = new $cc.Img("data/index_btn_trouble05_over.gif", "data/index_btn_trouble05.gif");
$cc.img.index_btn_trouble06 = new $cc.Img("data/index_btn_trouble06_over.gif", "data/index_btn_trouble06.gif");

/* Trouble Page btn Area */
$cc.img.btn_trouble01 = new $cc.Img("trouble/data/btn_trouble01_over.png", "trouble/data/btn_trouble01.png");
$cc.img.btn_trouble02 = new $cc.Img("trouble/data/btn_trouble02_over.png", "trouble/data/btn_trouble02.png");
$cc.img.btn_trouble03 = new $cc.Img("trouble/data/btn_trouble03_over.png", "trouble/data/btn_trouble03.png");
$cc.img.btn_trouble04 = new $cc.Img("trouble/data/btn_trouble04_over.png", "trouble/data/btn_trouble04.png");
$cc.img.btn_trouble05 = new $cc.Img("trouble/data/btn_trouble05_over.png", "trouble/data/btn_trouble05.png");
$cc.img.btn_trouble06 = new $cc.Img("trouble/data/btn_trouble06_over.png", "trouble/data/btn_trouble06.png");






/* Form Input Area Color
-------------------------------------------------------------------------------------------------------- */

// OBJがフォーカスを得たとき
function getf(OBJ) {
	OBJ.style.background="#FFF4E8";
	//OBJ.style.border="solid 1px #FF0000";
}
// OBJがフォーカスを失ったとき
function lostf(OBJ) {
	OBJ.style.background="#FFFFFF";
	//OBJ.style.border="solid 1px #DDDDDD";
}







/* New Icon */
function DelImg02(yyyymmdd)
		{
		datas=new Array();
		datas=yyyymmdd.split(",");
		dayNum=new Date();
		nowTime=dayNum.getTime();
		selfNum=new Date(datas[0]+'/'+datas[1]+'/'+datas[2]).getTime();
		if(selfNum < nowTime && selfNum+(limit*24*60*60*1000) > nowTime)
			document.write('<img src="img/icon_new.gif"'+'" width="'+"19"+'" height="'+"5"+'" border="0" alt="'+"new"+'">');
}





/*Center Open Window*/
function openWin(url,height,width,name) {
  var str="height=" + height + ",innerHeight=" + height;
  str+=",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah=screen.availHeight-30;
    var aw=screen.availWidth-10;

    var xc=(aw-width)/2;
    var yc=(ah-height)/2;

    str+=",left="+xc+",screenX="+xc;
    str+=",top="+yc+",screenY="+yc;
  }
  str+=",scrollbars=no,status =yes,resizable =no";
  return window.open(url,name,str);
}

function openWin2(url,height,width,name) {
  var str="height=" + height + ",innerHeight=" + height;
  str+=",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah=screen.availHeight-30;
    var aw=screen.availWidth-10;

    var xc=(aw-width)/2;
    var yc=(ah-height)/2;

    str+=",left="+xc+",screenX="+xc;
    str+=",top="+yc+",screenY="+yc;
  }
  str+=",scrollbars=yes,resizable =no";
  return window.open(url,name,str);
}

function openWin3(url,height,width,name) {
  var str="height=" + height + ",innerHeight=" + height;
  str+=",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah=screen.availHeight-30;
    var aw=screen.availWidth-10;

    var xc=(aw-width)/2;
    var yc=(ah-height)/2;

    str+=",left="+xc+",screenX="+xc;
    str+=",top="+yc+",screenY="+yc;
  }
  str+=",scrollbars=yes,resizable =no,menubar =yes";
  return window.open(url,name,str);
}





/* Newest Page Jump */
function newestPage() {
	myD       = new Date();
	myYear    = myD.getYear();
	myYear4   = (myYear < 2000) ? myYear+1900 : myYear;
	document.write( "<meta http-equiv='refresh' content='0;URL=/schedule/" + myYear4 + "/'>" );
}



/*Flash Setting*/

/*Susume Check*/

function StepMov(){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="900" height="750">\n');
document.write('<param name="allowScriptAccess" value="always">\n');
document.write('<param name="movie" value="data/step.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="data/step.swf" quality="high" width="900" height="750" align="middle" allowScriptAccess="always" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>\n');
document.write('</object>\n');
}
