// JavaScript Document

function CC_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.CC_p) d.CC_p=new Array();

	var i,j=d.CC_p.length,a=CC_preloadImages.arguments; for(i=0; i<a.length; i++)

	if (a[i].indexOf("#")!=0){ d.CC_p[j]=new Image; d.CC_p[j++].src=a[i];}}

}



function CC_swapImgRestore() { //v3.0

  var i,x,a=document.CC_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function CC_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=CC_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function CC_swapImage() { //v3.0

  var i,j=0,x,a=CC_swapImage.arguments; document.CC_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=CC_findObj(a[i]))!=null){document.CC_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

// Custom in English
function initButton(){ // Bito Added

	document.forms[1].elements[1].disabled = false;
	document.forms[1].elements[3].disabled = false;
	document.forms[1].elements[5].disabled = false;
	document.forms[1].elements[1].value = "Generate_MN" ;
	document.forms[1].elements[3].value = "Create_CM" ;
	document.forms[1].elements[5].value = "Create_HDR" ;

}

// Basic in English
function initButton2(){ // Bito Added

	document.forms[1].elements[1].disabled = false;
	document.forms[1].elements[3].disabled = false;
	document.forms[1].elements[1].value = "Generate_MN" ;
	document.forms[1].elements[3].value = "Create_CM" ;

}

// Standard in English
function initButton3(){ // Bito Added

	document.forms[1].elements[1].disabled = false;
	document.forms[1].elements[4].disabled = false;
	document.forms[1].elements[1].value = "Generate_MN" ;
	document.forms[1].elements[4].value = "Create" ;

}

// Custom in English
function submitForm(theBottun){ // Bito Added
	
	theBottun.form.elements[1].disabled = true;
	theBottun.form.elements[3].disabled = true;
	theBottun.form.elements[5].disabled = true;

	var dummyButton = document.createElement('input');
	dummyButton.type = 'hidden';
	dummyButton.name = theBottun.name;
	dummyButton.value = theBottun.value;
	
	theBottun.form.appendChild(dummyButton);
	theBottun.value = "Sending..." ;
	
	setTimeout('initButton()',4000) ;

	theBottun.form.submit(); 
	theBottun.form.removeChild(dummyButton);
	return false;
	//return true;

}

// Basic in English
function submitForm2(theBottun){ // Bito Added
	
	theBottun.form.elements[1].disabled = true;
	theBottun.form.elements[3].disabled = true;

	var dummyButton = document.createElement('input');
	dummyButton.type = 'hidden';
	dummyButton.name = theBottun.name;
	dummyButton.value = theBottun.value;
	
	theBottun.form.appendChild(dummyButton);
	theBottun.value = "Sending..." ;
	
	setTimeout('initButton2()',4000) ;

	theBottun.form.submit(); 
	theBottun.form.removeChild(dummyButton);
	return false;
	//return true;

}

// Standard in English
function submitForm3(theBottun){ // Bito Added
	
	theBottun.form.elements[1].disabled = true;
	theBottun.form.elements[4].disabled = true;

	var dummyButton = document.createElement('input');
	dummyButton.type = 'hidden';
	dummyButton.name = theBottun.name;
	dummyButton.value = theBottun.value;
	
	theBottun.form.appendChild(dummyButton);
	theBottun.value = "Sending..." ;
	
	setTimeout('initButton3()',4000) ;

	theBottun.form.submit(); 
	theBottun.form.removeChild(dummyButton);
	return false;
	//return true;

}

// Custom in Japanese
function initButtonKanji(){ // Bito Added

	document.forms[1].elements[1].disabled = false;
	document.forms[1].elements[3].disabled = false;
	document.forms[1].elements[5].disabled = false;
	document.forms[1].elements[1].value = "MN取得" ;
	document.forms[1].elements[3].value = "CM作成" ;
	document.forms[1].elements[5].value = "Header作成" ;
	document.forms[1].elements[5].

}
// Basic in Japanese
function initButtonKanji2(){ // Bito Added

	document.forms[1].elements[1].disabled = false;
	document.forms[1].elements[3].disabled = false;
	document.forms[1].elements[1].value = "MN取得" ;
	document.forms[1].elements[3].value = "CM作成" ;

}
// Standard in Japanese
function initButtonKanji3(){ // Bito Added

	document.forms[1].elements[1].disabled = false;
	document.forms[1].elements[4].disabled = false;
	document.forms[1].elements[1].value = "MN取得" ;
	document.forms[1].elements[4].value = "作成" ;

}

// Custom in Japanese
function submitFormKanji(theBottun){ // Bito Added
	
	theBottun.form.elements[1].disabled = true;
	theBottun.form.elements[3].disabled = true;
	theBottun.form.elements[5].disabled = true;

	var dummyButton = document.createElement('input');
	dummyButton.type = 'hidden';
	dummyButton.name = theBottun.name;
	dummyButton.value = theBottun.value;
	
	theBottun.form.appendChild(dummyButton);
	theBottun.value = "送信中..." ;
	
	setTimeout('initButtonKanji()',4000) ;

	theBottun.form.submit(); 
	theBottun.form.removeChild(dummyButton);
	return false;
	//return true;

}
// Basic in Japanese
function submitFormKanji2(theBottun){ // Bito Added
	
	theBottun.form.elements[1].disabled = true;
	theBottun.form.elements[3].disabled = true;

	var dummyButton = document.createElement('input');
	dummyButton.type = 'hidden';
	dummyButton.name = theBottun.name;
	dummyButton.value = theBottun.value;
	
	theBottun.form.appendChild(dummyButton);
	theBottun.value = "送信中..." ;
	
	setTimeout('initButtonKanji2()',4000) ;

	theBottun.form.submit(); 
	theBottun.form.removeChild(dummyButton);
	return false;
	//return true;

}

// Standard in Japanese
function submitFormKanji3(theBottun){ // Bito Added
	
	theBottun.form.elements[1].disabled = true;
	theBottun.form.elements[4].disabled = true;

	var dummyButton = document.createElement('input');
	dummyButton.type = 'hidden';
	dummyButton.name = theBottun.name;
	dummyButton.value = theBottun.value;
	
	theBottun.form.appendChild(dummyButton);
	theBottun.value = "送信中..." ;
	
	setTimeout('initButtonKanji3()',4000) ;

	theBottun.form.submit(); 
	theBottun.form.removeChild(dummyButton);
	return false;
	//return true;

}

