/*20070703版*/

/*Roll Over*/

function CIWN(NAME1,URL1){
	if(navigator.appVersion.substring(0,1)>=3){
		var args = CIWN.arguments;
		for (var i = 0; i < args.length; i += 2){
			document.images[args[i]].src=args[i+1];
		}
		return true;
	}
}
		

/*Pulldown-SelfWindow*/

function goMenu(){
	Select = document.ContentsList.ContentsListPopup.selectedIndex;
	SelectLink=document.ContentsList.ContentsListPopup.options[Select].value;
	if (SelectLink!="NoAccess") {
		self.location.href=SelectLink;
	}
}
		

/*Pulldown-TopWindow*/

function goMenuTop(){
	Select = document.ContentsList.ContentsListPopup.selectedIndex;
	SelectLink=document.ContentsList.ContentsListPopup.options[Select].value;
	if (SelectLink!="NoAccess") {
		parent.top.location.href=SelectLink;
	}
}
		

/*Pulldown-NewWindow*/

function goMenuNew(PopupName){
	Select = document.ContentsList.elements[PopupName].selectedIndex;
	SelectLink=document.ContentsList.elements[PopupName].options[Select].value;
	if (SelectLink!="NoAccess") {
		WOA(SelectLink,'',750,600);
	}
}


/*New Window*/

function WO(URL,NAME,XS,YS){
	if(navigator.appName.charAt(0)=="N"){
		var FCS;
		FCS=window.open(URL,NAME,"toolbar=no,location=no,directries=no,status=no,menubar=no,scrollbars=yes,resizable=yes,"+"width="+XS+","+"height="+YS)
		FCS.focus();
	}else{
		S1="toolbar=no,location=no,directries=no,status=no,menubar=no,scrollbars=yes,resizable=yes,"+"width="+XS+","+"height="+YS;
		window.open(URL,NAME,S1);
	}
}

/*New Window (Window Tools Actived)*/

function WOA(URL,NAME,XS,YS){
	if(navigator.appName.charAt(0)=="N"){
		var FCS;
		FCS=window.open(URL,NAME,"toolbar=yes,location=yes,directries=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,"+"width="+XS+","+"height="+YS)
		FCS.focus();
	}else{
		S1="toolbar=yes,location=yes,directries=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,"+"width="+XS+","+"height="+YS;
		window.open(URL,NAME,S1);
	}
}

/*Close Window*/

function Close(){
	window.close();
}
	
/*for MSIE*/

function writeFlashTag(filePath, version, width, height, quality, autoPlay, loop, bgColor){
	//detect the version
	var VER4 = "swflash.cab#version=4,0,0,0";
	var VER5 = "swflash.cab#version=5,0,0,0";
	var versionCode = "";
	switch( version ){
		case 4:
			versionCode = VER4;
			break;
		case 5:
			versionCode = VER5;
			break;
		default:
			versionCode = "";
			break;
	}
	
	document.write( "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/" );
	document.write( versionCode );
	document.write( "' width='" );
	document.write( width );
	document.write( "' height='" );
	document.write( height );
	document.write( "'>" );
	document.write( "\n" );
	
	document.write( "<param name=movie value='%22%20);%20%09document.write(%20filePath%20);%20%09document.write(%20%22'>" );
	document.write( "\n" );
	
	document.write( "<param name=quality value=" );
	document.write( quality );
	document.write( "'>" );
	document.write( "\n" );
	
	document.write( "<param name=play value=" );
	document.write( autoPlay );
	document.write( "'>" );
	document.write( "\n" );
	
	document.write( "<param name=loop value=" );
	document.write( loop );
	document.write( "'>" );
	document.write( "\n" );
	
	document.write( "<param name=bgcolor value=" );
	document.write( bgColor );
	document.write( "'>" );
	document.write( "\n" );
	
	document.write( "<embed src='%22%20);%20%09document.write(%20filePath%20);%20%09document.write(%20%22' quality='" );
	document.write( quality );
	document.write( "'  bgcolor='" );
	document.write( bgColor );
	document.write( "' width='" );
	document.write( width );
	document.write( "' height='" );
	document.write( height );
	document.write( "' play='" );
	document.write( autoPlay );
	document.write( "' loop='" );
	document.write( loop );
	document.write( "'  type='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>" );
	document.write( "</embed>" );
	document.write( "</object>" );

}

function writeQTTag( filePath, width, height, controller, cache, loop, autoPlay, bgColor ){

	document.write( "<embed src='%22%20);%20%09document.write(%20filePath%20);%20%09document.write(%20%22' width='" );
	document.write( width );
	document.write( "' height='" );
	document.write( height );
	document.write( "' controller='" );
	document.write( controller );
	document.write( "' cache='" );
	document.write( cache );
	document.write( "' loop='" );
	document.write( loop );
	document.write( "' autoPlay='" );
	document.write( autoPlay );
	document.write( "' bgcolor='" );
	document.write( bgColor );
	document.write( "' pluginspage='http://www.apple.co.jp/quicktime/download/'>" );
	document.write( "\n" );
	
}

/* Split the Mail Address for SPAM */

function mailSplitter( account, domain ){
	var STR1 = "<a href='mailto:";
	var STR2 = "'>"
	var STR3 ="</a>"
	var ATMARK = "@";
	var completeAddress = "";
	var completeStrings = "";
	
	completeAddress = account + ATMARK + domain
	completeStrings = STR1 + completeAddress + STR2 + completeAddress + STR3;
	
	document.write( completeStrings );
}

/*オムロン：ニューウインドウ*/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


/*オムロン：プルダウンのリンク*/
function jumpMenu(selectObject){
	parent.location.href = selectObject.options[selectObject.selectedIndex].value;
}

/*オムロン：JSウインドウ*/
function jump_1(my_url){
	window.open(my_url,"","width=400,height=410,scrollbars=no");
}
function jump_2(my_url){
	window.open(my_url,"","width=520,height=560,scrollbars=yes");
}
function jump_3(my_url){
	window.open(my_url,"","width=580,height=630,scrollbars=no");
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*End subroutine*/
