

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.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; }
}

//layer center align
function DivAlign(theDiv){
	var obj,fun,dw,lw,x;
	var dy,ly,y;

	fun = (document.all) ? document.getElementById : MM_findObj;
	obj = (document.all) ? document.getElementById(theDiv) : MM_findObj(theDiv);

	if(obj){
		if(document.all){
			dw = document.body.clientWidth;
			}
		else{
			dw = innerWidth;
		}
		if(document.layers){
			lw = obj.clip.width;
			}
		else{
			lw = obj.style.width.replace("px","");
		}
		x = (document.layers) ? ".left" : ".style.left";
		eval(fun+"('"+theDiv+"')"+x+"="+dw+"/2-"+lw+"/2");
	}
}


//ÇÃ·¡½Ã ±âº» + ÆÄ¶ó¹ÌÅÍ
//function FlashIncParam(f_name,f_value,f_width,f_height,f_align,f_param){
//	document.write('<object id="'+f_name+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+f_width+'" height="'+f_height+'">') ;
//	document.write('<param name="movie" value="'+f_value+'.swf" />') ;
//	document.write('<param name="quality" value="high" />') ;
//	document.write('<param name="menu" value="false" />') ;
//	document.write('<param name="wmode" value="transparent" />') ;
//	document.write('<param name="allowScriptAccess" value="always" />');
//	document.write('<PARAM NAME=scale VALUE=noscale> ');
//	document.write('<PARAM NAME="SAlign" VALUE="'+f_align+'">') ;
//	document.write('<param name="FlashVars" value="'+f_param+'">');
//	document.write('<embed src="'+f_value+'.swf" quality="high" name="'+f_name+'" SAlign="'+f_align+'" scale=noscale width="'+f_width+'" height="'+f_height+'" allowScriptAccess="always"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />') ;
//	document.write('</object>') ;

//	eval("window." + f_name + " = document.getElementById('" + f_name + "');");
//}


// ÇÃ·¡½¬¸Þ´º °øÅë
function showFlashObject(objID, objSource, objWidth, objHeight, objQuality, objWmode, objBgcolor)
{
	/* Default Value Setting */
	if (objID == "") objID = 'ShockwaveFlash1';
	if (objWidth == "") objWidth = '0';
	if (objHeight == "") objHeight = '0';
	if (objQuality == "") objQuality = 'best';
	if (objWmode == "") {
		objWmode = 'transparent';
	} else {
		objWmode = '';
	}
	/* Flash 8.0 version */
	document.write('<OBJECT id="' + objID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('type="application/x-shockwave-flash" ');
	document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '">');
	document.write('<PARAM NAME=menu value=false>');
	document.write('<PARAM NAME=allowScriptAccess value=always>');
	document.write('<PARAM NAME=wmode value="'+ objWmode +'">');
	document.write('<PARAM NAME=movie VALUE="'+ objSource +'">');
	document.write('<PARAM NAME=quality VALUE="'+ objQuality +'">');
	document.write('<PARAM NAME=bgcolor VALUE="'+ objBgcolor +'">');
	document.write('<embed allowScriptAccess="always" swLiveConnect="true" src="' + objSource + '" menu="false" quality="' + objQuality + '" wmode="' + objWmode + '" bgcolor="' + objBgcolor + '" width="' + objWidth + '" height="' + objHeight + '" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer">');
	document.write('</OBJECT>');
}


