/*-----------------------------------------------------------Mac or Others CSS Font Identification-----------------------------------------------------------*/var ua = navigator.userAgent.toUpperCase();var apver = navigator.appVersion.toUpperCase();var apname = navigator.appName.toUpperCase();var mac = ua.indexOf("MAC",0) > -1;var win =  ua.indexOf("WIN",0) > -1;var macppc = (mac) && (ua.indexOf("OS X",0) == -1);  //contained IE for OSXvar win95 = ua.indexOf("Windows 95",0) > -1;var win98 = ua.indexOf("Windows 98",0) > -1;var ie  = apname.indexOf("MICROSOFT INTERNET EXPLORER",0) > -1;var nn  = apname.indexOf("NETSCAPE",0) > -1;var gecko = ua.indexOf("GECKO",0) > -1;var safari = ua.indexOf("SAFARI",0) > -1;var s = ua.indexOf("MSIE",0) +5;var e = ua.indexOf(";",s);var IEver = ua.substring(s,e);if(mac) { document.writeln("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" HREF=\"http://www.oceanchild.net/script/fontmac.css\" MEDIA=\"all\" TITLE=\"FONTPROPERTY\">"); } else if(win && ie && (IEver < 6)) {document.writeln("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" HREF=\"http://www.oceanchild.net/script/fontwin5.css\" MEDIA=\"all\" TITLE=\"FONTPROPERTY\">"); }else { document.writeln("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" HREF=\"http://www.oceanchild.net/script/font.css\" MEDIA=\"all\" TITLE=\"FONTPROPERTY\">"); }/*-----------------------------------------------------------ImagePreload & swapImage-----------------------------------------------------------*/function preloadimg(img) {if (document.images) (new Image()).src = img;}function preloadimg(imgarray) {	if (document.images) {		for (i=0; i<imgarray.length; i++) {			(new Image()).src = imgarray[i];}}}function preloadmenuimg(){var swapimg = new Array("../img/menu-news1.gif","../img/menu-news1.gif","../img/menu-filmo1.gif","../img/menu-works1.gif","../img/menu-profile1.gif","../img/menu-blog1.gif");preloadimg(swapimg);}function swapimage(nm,img) {	document.images[nm].src = img;}/*-----------------------------------------------------------[openWin] 	@param  url @param  targetwin	@param width	@param height	@param option : menubar, toolbar, location, status	@param scroll : "0" | "1" *left, top, resizable are fixed.-----------------------------------------------------------*/function openWin(url, targetwin, width, height, option, scroll){windowFeatures = "left=10, top=10, resizable=1, menubar=" +option+ ", toolbar=" +option+ ", location=" +option+ ", status=" +option+ ", scrollbars=" +scroll+ ", width=" + width + ",height=" + height;window.open(url,targetwin,windowFeatures);}/*-----------------------------------------------------------[openWin2] 	@param width	@param height	@param option : menubar, toolbar, location, status	@param scroll : "0" | "1" *left, top, resizable, targetwin="new" are fixed.-----------------------------------------------------------*/function openWin2(width, height, option, scroll){windowFeatures = "left=10, top=10, resizable=1, menubar=" +option+ ", toolbar=" +option+ ", location=" +option+ ", status=" +option+ ", scrollbars=" +scroll+ ", width=" + width + ",height=" + height;window.open("","new",windowFeatures);}function randomBG(imgA,imgB,bgColor){bgimg = new Array();bgimg[0] = imgA;bgimg[1] = imgB;chip = Math.floor(bgimg.length * Math.random());myBG = bgimg[chip];htm="";htm+="<div class='boxS01' style='background-color:"+bgColor+";";htm+=" background-image:url("+myBG+");'></div>";document.write(htm);}/*-----------------------------------------------------------Filmography --- Trailer --- Select Form-----------------------------------------------------------*/function trailer2(){Select = document.trailerForm.trailerSelect.selectedIndex;if (Select == 0) return;HTML = "trailer.html";Title = document.trailerForm.trailerSelect.options[Select].text;space = " ";splitTitle = Title.split(space);TitleJa = splitTitle[0];TitleEn = splitTitle[1];fpass = document.trailerForm.trailerSelect.options[Select].value;if ( navigator.appVersion.indexOf( "KHTML" ) > -1 ) {URL = HTML+"?titleJ="+encodeURIComponent(TitleJa)+"&titleE="+encodeURIComponent(TitleEn)+"&file="+encodeURIComponent(fpass);} else {URL = HTML+"?titleJ="+escape(TitleJa)+"&titleE="+escape(TitleEn)+"&file="+escape(fpass);}window.open(URL,"trailerwin","width=380, height=420, toolbar=0, location=0, menubar=0, scrollbars=0, resizable=1, status=1");}/*-----------------------------------------------------------Filmography --- Trailer --- Encode-----------------------------------------------------------*/function trailer(TitleJa,TitleEn,fpass){HTML = "trailer.html";if ( navigator.appVersion.indexOf( "KHTML" ) > -1 ) {URL = HTML+"?titleJ="+encodeURIComponent(TitleJa)+"&titleE="+encodeURIComponent(TitleEn)+"&file="+encodeURIComponent(fpass);} else {URL = HTML+"?titleJ="+escape(TitleJa)+"&titleE="+escape(TitleEn)+"&file="+escape(fpass);}window.open(URL,"trailerwin","width=380, height=450, toolbar=0, location=0, menubar=0, scrollbars=0, resizable=1, status=1");}/*-----------------------------------------------------------Filmography --- Trailer --- Decode-----------------------------------------------------------*/function myGetQuery(myKeyWord){   myKeyWord = "&" + myKeyWord + "=";   myValue = null;   myStr = location.search;   myLen = myStr.length;   myStr = "&" + myStr.substring(1,myLen) + "&";   myOfst = myStr.indexOf(myKeyWord);   if (myOfst != -1){      myStart = myOfst + myKeyWord.length;      myEnd   = myStr.indexOf("&" , myStart);      myValue = myStr.substring(myStart,myEnd);if ( navigator.appVersion.indexOf( "KHTML" ) > -1 ) {      myValue = decodeURIComponent(myValue);} else {     myValue = unescape(myValue);}}return myValue;}trailerTitle = myGetQuery("titleJ");trailerTitleEn = myGetQuery("titleE");trailerFile1 = myGetQuery("file");for(i=0; i<navigator.plugins.length; i++){if (navigator.plugins[i].name.indexOf("QuickTime",0) > -1) {e = navigator.plugins[i].name.length;QTver3 = navigator.plugins[i].name.substring(18,e);QTver2 = navigator.plugins[i].name.substring(18,21);}}if(QTver2 >= 7){trailerFile = trailerFile1+'.mov';}else{trailerFile = trailerFile1+'low.mov';}/*----------------------------------------------------------- [CreateQuickTimeObj]	@param fpass  :  pass to movie file	@param width	@param height	@param bgcolor	@param controller : "true" | "false" 	@param autoplay : "true" | "false"	@param kioskmode : "true" | "false"-----------------------------------------------------------*/function CreateQuickTimeObj(fpass,width,height,bgcolor,controller,autoplay,kioskmode){htm="";if(controller=="true"){          // added contoroller's height : 16pxheight=eval(height+16);}htm+="<OBJECT";htm+=" id='QT'";htm+=" classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'";htm+=" width='"+width+"' height='"+height+"'";htm+=" codebase='http://www.apple.com/qtactivex/qtplugin.cab'>\n";htm+="<param name='SRC' value='"+trailerFile+"'>\n";/*htm+="<param name='QTSRC' value='"+trailerFile+"'>\n";*/htm+="<EMBED";htm+=" name='QT'";htm+=" pluginspage='http://www.apple.co.jp/quicktime/download/'";htm+=" type='video/quicktime'";htm+=" src='"+trailerFile+"'";htm+=" qtsrc='"+trailerFile+"'";htm+=" width='"+width+"' height='"+height+"'";htm+=" controller='"+controller+"'";htm+=" autoplay='"+autoplay+"'";htm+=" kioskmode='"+kioskmode+"'";htm+=" enablejavascript='true'";htm+=" bgcolor='"+bgcolor+"'>\n";htm+="</EMBED>\n";htm+="</OBJECT>\n";document.write(htm);}function posChkX(){return document.body.scrollLeft;}function posChkY(){return document.body.scrollTop;}var timer;function scrollPageTop(xto,yto,tm,xfrom,yfrom) {	if(timer) clearTimeout(timer);	if (!xto) xto = 0;	if (!yto) yto = 0;	var sec=14;	var xscr=posChkX();	var yscr=posChkY();	if (!tm) tm = 5;	if(!xfrom) xfrom = 0 + xscr;	if(!yfrom) yfrom = 0 + yscr;	xfrom += (xto - xscr) / tm;	(xfrom < 0)?(xfrom = 0):Math.ceil(xfrom);	yfrom += (yto - yscr) / tm;	(yfrom < 0)?(yfrom = 0):Math.ceil(yfrom);	window.scrollTo(xfrom, yfrom);	if((Math.ceil(xscr - xto) < 1) && (Math.ceil(yscr - yto) < 1)){		clearTimeout(timer);		window.scroll(xto,yto);	}else if(xfrom != xto || yfrom != yto){		timer = setTimeout("scrollPageTop("+xto+","+yto+","+tm+","+xfrom+","+yfrom+")",sec);	}else{		clearTimeout(timer);	}}