//activeX  RC 掖幫煎斜極 翕艙鼻
function media_study(url, width, height, style){
document.write('<embed src="'+url+'" autostart="false" style="'+style+'"  type="video/x-ms-wmv" TransparentAtStart="1" width="'+width+'" height="'+height+'"></embed>');
}

//activeX  RC 貲蕨曖 瞪渡 翕艙鼻
function media(url, width, height){
document.write('<object id="MediaPlayer1" width="'+width+'" height="'+height+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft?Windows?Media Player components..." type="application/x-oleobject">'
+'<param name="FileName" value="'+url+'">'
+'<param name="AudioStream" VALUE="-1">'
+'<param name="AutoSize" VALUE="-1">'
+'<param name="AutoStart" VALUE="-1">'
+'<param name="AnimationAtStart" VALUE="0">'
+'<param name="AllowScan" VALUE="-1">'
+'<param name="AllowChangeDisplaySize" VALUE="-1">'
+'<param name="AutoRewind" VALUE="0">'
+'<param name="Balance" VALUE="0">'
+'<param name="BaseURL" VALUE="">'
+'<param name="BufferingTime" VALUE="5">'
+'<param name="CaptioningID" VALUE="">'
+'<param name="ClickToPlay" VALUE="-1">'
+'<param name="CursorType" VALUE="0">'
+'<param name="CurrentPosition" VALUE="-1">'
+'<param name="CurrentMarker" VALUE="0">'
+'<param name="DefaultFrame" VALUE="">'
+'<param name="DisplayBackColor" VALUE="0">'
+'<param name="DisplayForeColor" VALUE="16777215">'
+'<param name="DisplayMode" VALUE="0">'
+'<param name="DisplaySize" VALUE="0">'
+'<param name="Enabled" VALUE="-1">'
+'<param name="EnableContextMenu" VALUE="0">'
+'<param name="EnablePositionControls" VALUE="-1">'
+'<param name="EnableFullScreenControls" VALUE="0">'
+'<param name="EnableTracker" VALUE="-1">'
+'<param name="InvokeURLs" VALUE="-1">'
+'<param name="Language" VALUE="-1">'
+'<param name="Mute" VALUE="0">'
+'<param name="PlayCount" VALUE="1">'
+'<param name="PreviewMode" VALUE="0">'
+'<param name="Rate" VALUE="1">'
+'<param name="SAMILang" VALUE="">'
+'<param name="SAMIStyle" VALUE="">'
+'<param name="SAMIFileName" VALUE="">'
+'<param name="SelectionStart" VALUE="0">'
+'<param name="SelectionEnd" VALUE="-1">'
+'<param name="SendOpenStateChangeEvents" VALUE="-1">'
+'<param name="SendWarningEvents" VALUE="-1">'
+'<param name="SendErrorEvents" VALUE="-1">'
+'<param name="SendKeyboardEvents" VALUE="0">'
+'<param name="SendMouseClickEvents" VALUE="0">'
+'<param name="SendMouseMoveEvents" VALUE="0">'
+'<param name="SendPlayStateChangeEvents" VALUE="-1">'
+'<param name="ShowCaptioning" VALUE="0">'
+'<param name="ShowControls" VALUE="-1">'
+'<param name="ShowAudioControls" VALUE="-1">'
+'<param name="ShowDisplay" VALUE="0">'
+'<param name="ShowGotoBar" VALUE="0">'
+'<param name="ShowPositionControls" VALUE="-1">'
+'<param name="ShowStatusBar" VALUE="-1">'
+'<param name="ShowTracker" VALUE="-1">'
+'<param name="TransparentAtStart" VALUE="1">'
+'<param name="VideoBorderWidth" VALUE="0">'
+'<param name="VideoBorderColor" VALUE="0">'
+'<param name="VideoBorder3D" VALUE="0">'
+'<param name="Volume" VALUE="-600">'
+'<param name="WindowlessVideo" VALUE="0">'
+'</object>');
}



// activeX 橾奩 楚蓮
function flash(url, width, height){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+width+'" height="'+height+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id=ShockwaveFlash1>'
+'<param name="movie" value="'+url+'">'
+'<param name="quality" value="high">'
+'<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash"></embed>'
+'</object>');
}


// activeX 橾奩 楚蓮 癱貲 樓撩 蹺陛
function flash_trans(url, width, height){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+width+'" height="'+height+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id=ShockwaveFlash1>'
+'<param name="movie" value="'+url+'">'
+'<param name="quality" value="high">'
+'<param name="wmode" value="transparent">'
+'<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash"></embed>'
+'</object>');
}

// activeX name 高檜 菟橫除 楚蓮
function flash_name(url, width, height, name){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="PhotoGallery_2005" align="middle">'
+'<param name="allowScriptAccess" value="sameDomain">'
+'<param name="movie" value="'+url+'">'
+'<param name="quality" value="high">'
+'<param name="bgcolor" value="#ffffff">'
+'<embed src="'+url+'" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+name+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'
+'</object>');
}


// 蝶蘋檜蝶觼楚


function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function toggleLayers(showIds, hideIds) {
    for(var i in hideIds)
        document.getElementById(hideIds[i]).style.display = 'none';
    for(var i in showIds)
        document.getElementById(showIds[i]).style.display = 'block';
}


var right_over;	// 撩溯檜橫 晦橘 滲熱

function right(i){
	document.all["right"+i].style.display="";
	document.all["right"+right_over].style.display="none";
	right_over=i;
}

function setVariables() {
	imgwidth=30;   //檜嘐雖 陛煎餌檜鍔
	imgheight=34;   //檜嘐雖 撮煎餌檜鍔
	if (navigator.appName == "Netscape") {
		horz=".left";
		vert=".top";
		docStyle="document.";
		styleDoc="";
		innerW="window.innerWidth";
		innerH="window.innerHeight";
		offsetX="window.pageXOffset";
		offsetY="window.pageYOffset";
	}
	else {
		horz=".pixelLeft";
		vert=".pixelTop";
		docStyle="";
		styleDoc=".style";
		innerW="document.body.clientWidth";
		innerH="document.body.clientHeight";
		offsetX="document.body.scrollLeft";
		offsetY="document.body.scrollTop";
		}
	}
	
var temp=223; //衛濛薄

function checkLocation() {
	objectXY="branding";
	var availableX=eval(innerW);
	var availableY=eval(innerH);
	var remitY=eval(document.body.scrollHeight);
	var currentX=eval(offsetX);
	var currentY=eval(offsetY);
//	x=(imgwidth+820);
//	y=(imgheight+600)+currentY;
	x=830;
	y=223+currentY;
	if (currentY+575>remitY)
	{
		y=remitY;
		temp=y;
	}

	if (y>remitY)
	{
		y=remitY;
		temp=y;
	}

	Refreshstaticmenu();

	setTimeout("checkLocation()",10);
}

function Refreshstaticmenu() {
	var stmnRefreshTimer;                     

	if (temp != y)
	{
		if (y<temp)
		{
			var z = (temp-y)%10;

			if (z<=1)
			{
				temp=temp-1;
			}
			else
			{
				temp=temp-z;
			}
		}
		else
		{
			var z = (temp-y)%10;

			if (z<=1)
			{
				temp=temp+1;
			}
			else
			{
				temp=temp+z;
			}
		}
		evalMove();
		stmnRefreshTimer = setTimeout ("Refreshstaticmenu();", 5); //蝶觼煤樓紫
	}
	else
	{
		clearTimeout(stmnRefreshTimer);
	}

}

function evalMove() {
	eval(docStyle + objectXY + styleDoc + horz + "=" + x);
	eval(docStyle + objectXY + styleDoc + vert + "=" + temp);
}









/* 億璽 */
function openwindow(url,intWidth,intHeight) { 
      window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",resizable=1,scrollbars=1");
}

function openwindow02(url,intWidth,intHeight) { 
      window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",resizable=0,scrollbars=0");
}


function openwindow_new(url,intWidth,intHeight) { 
      window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes") ;
      
}




/* rollover */
var changedImg;

function EImgChg(flag)
{
	source=event.srcElement;
	if (source.name == "")
	{ return false;  }

	if(changedImg == source.name)
	return;


	else if (document.images && source.tagName=="IMG") {
		imgElement = source.name;  // 檜嘐雖 name
		imgPath = source.src;   // 檜嘐雖 src 樓撩高

		imgPathLen = imgPath.length;
		imgPathFlag = imgPath.lastIndexOf("/");
		imgName = imgPath.substring(0,imgPathFlag+1);

		document.images[imgElement].src =  imgName + imgElement + "_" + flag + ".gif";

	}
}

/* 溯檜橫 */
	function LayerSH(LayerName,Status) {
	ns4 = (document.layers)?true:false
	ie4 = (document.all)?true:false
	
		if (ns4) {
			LayerN = document.layers[LayerName]
			if (Status == 'show') LayerN.visibility = 'show';
			if (Status == 'hide') LayerN.visibility = 'hidden';
		}	
		if (ie4) {
			LayerN = document.all[LayerName].style
			if (Status == 'show') LayerN.visibility = 'visible';
			if (Status == 'hide') LayerN.visibility = 'hidden';
		}
	}	
	
	
	
/* 贗葛擊陽 殮溘曖 旋濠 橈橫颶 */
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
        thefield.value = ""
} 	

/* 贗葛衛 薄摹 寰 爾檜啪  */
function allblur() {
for (i = 0; i < document.links.length; i++)
document.links[i].onfocus = document.links[i].blur;
}


	
/* 嬴檜溯歜 望檜 濠翕褻瞰 */
	function initsize() { 
		livebar.resizeTo(livebar.document.body.scrollWidth, livebar.document.body.scrollHeight); 
	} 

// popup
function popsn(url,trgt,w,h) {
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=no,resizable=no,copyhistory=no,toolbar=no');
}
function popsy(url,trgt,w,h) {
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=yes,resizable=no,copyhistory=no,toolbar=no');
}


// faq 
	var z=1

	function list(i){
		if(document.all["list"+i].style.display==""){
			document.all["list"+i].style.display="none"
		    z=1}

	    else{
	        document.all["list"+z].style.display="none";
            document.all["list"+i].style.display="";
	        z=i
	   }
	}

/* tab 餌辨衛 溯檜橫(龔 贗葛 頂辨 爾罹輿晦 - 2偃) */
		function menu2(index) {
			if (navigator.userAgent.indexOf("MSIE") != -1) {
				if (index == 1) {
					t1.style.display = "";
					t2.style.display = "none";			
				} 
				
				
			    else if (index == 2) {
					t1.style.display = "none";
					t2.style.display = "";									
			   }
			   					 	   

		}}		


		function menu21(index) {
			if (navigator.userAgent.indexOf("MSIE") != -1) {
				if (index == 3) {
					t3.style.display = "";
					t4.style.display = "none";			
				} 
				
				
			    else if (index == 4) {
					t3.style.display = "none";
					t4.style.display = "";									
			   }
			   					 	   

		}}

		function menu31(index) {
			if (navigator.userAgent.indexOf("MSIE") != -1) {
				if (index == 5) {
					t5.style.display = "";
					t6.style.display = "none";			
				} 
				
				
			    else if (index == 6) {
					t5.style.display = "none";
					t6.style.display = "";									
			   }
			   					 	   

		}}




	var isNN = (navigator.appName.indexOf("Netscape")!=-1);

	function autoTab(input,len, e) {
		var keyCode = (isNN) ? e.which : e.keyCode; 
		var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
		if(input.value.length >= len && !containsElement(filter,keyCode)) {
		input.value = input.value.slice(0, len);
		input.form[(getIndex(input)+1) % input.form.length].focus();
	}

	function containsElement(arr, ele) {
		var found = false, index = 0;
		while(!found && index < arr.length)
		if(arr[index] == ele)
			found = true;
		else
			index++;
		return found;
	}

	function getIndex(input) {
		var index = -1, i = 0, found = false;
		while (i < input.form.length && index == -1)
			if (input.form[i] == input)index = i;
			else i++;
			return index;
		}
		return true;
	}


	function resizeHeight(fr) {
		fr = typeof fr == 'string' ? document.getElementById(fr) : fr;
		fr.setExpression('height',livebar.document.body.scrollHeight);

	}

	// LineMap 羹觼/轎溘 熱 - made by Yoon
	function check(path){

		var chk01 = ' > ';
		var chk02 = '>';

		var p0=1;
		var p1=0;

		var s0 = path;
		var s1;

		while(p0>0)
		{
			s0=s0.slice(p0+3,s0.length);
			p0=s0.indexOf(chk01);
			p1=p1+p0+3;
		}

		s1 = path.slice(0, p1+2);
		p0 = s0.indexOf(chk02);

		if (p0 >0)
		{
			s0 = s0.slice(p0+1,s0.length-4);
		}

		document.write(s1 + '<b>'+s0+'</b>');
	}
	
<!--06_enjoy popup
function newwin(pop,width,height,flag)
{
	var url = pop;
	var wd = width;
	var he = height;
	var scw = (screen.width-wd)/2;
	var sch = (screen.height-he)/2;
	

	if (flag == 0 )
	{
		window.open(url,"0","toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ",top="+sch+",left="+scw+";")
	}
	else
	{
		window.open(url,"0","toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ",top="+sch+",left="+scw+";")

	}
}
//-->
