function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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.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_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];}
}

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; }
}


function FlashActivate ( strFlashUrl , n4Width , n4Height , strWmode , strId , strClassName ) {
	document.writeln( GetFlashActivateString( strFlashUrl , n4Width , n4Height , strWmode , strId , strClassName ) );
}

function GetFlashActivateString ( strFlashUrl , n4Width , n4Height , strWmode , strId , strClassName ) {
	//width,height ¿©ºÎ & ¹­À½ (width,height°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	var objSize_attribute = "";
	var objId_attribute = "";
	var objId_IE_attribute = "";
	var className_attribute = "";
	var wmode_param = "";
	var wmode_attribute = "";

	
	if (n4Width != 0) {
		objSize_attribute = " width='"+ n4Width +"' height='"+ n4Height +"'";
	} 
	//id ¿©ºÎ (ID ¼¿·º·ºÅÍ°¡ ¾øÀ»°æ¿ì 0À¸·Î¼±¾ð)
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} 
	//class ¿©ºÎ (class°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (strClassName != 0) {
		className_attribute = " class='" + strClassName + "'";
	} 
	//wmode ¿©ºÎ (wmode°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (strWmode != 0) {
		wmode_param = "<param name='wmode' value='" + strWmode + "' />";
		wmode_attribute = " wmode='" + strWmode + "'";
	} 
	
	var textToWrite = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' " + objSize_attribute + objId_IE_attribute + className_attribute + ">\n";
    textToWrite += "<param name='allowScriptAccess' value='always' />\n";
    textToWrite += "<param name='movie' value='"+ strFlashUrl +"' />\n";
	textToWrite += "<param name='quality' value='high' />\n";
	textToWrite += "<param name=bgcolor value='#FFFFFF'>\n";
	textToWrite += "<param name='allowScriptAccess' value='always' />\n";
	textToWrite += wmode_param+"\n";
	textToWrite += "<!-- Hixie method -->\n";
	textToWrite += "<!--[if !IE]> <-->\n";
	textToWrite += "<object allowScriptAccess='always' type='application/x-shockwave-flash' bgcolor='#FFFFFF' data='"+ strFlashUrl +"'" + objSize_attribute + objId_attribute + wmode_attribute + className_attribute + "></object>\n";
	textToWrite += "<!--> <![endif]-->\n";
	textToWrite += "</object>\n";

	return 	textToWrite;
}

// CommonÇÃ·¡½Ã
function SetCommonFlashObject(src, width, Height, loop, quality, wmode, bgcolor, FlashVars)
{
    var strflash;

    strflash = "";

    strflash = strflash + "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='" + width + "' height='" + Height + "' align='middle'>";
   strflash = strflash + "<param name='allowScriptAccess' value='always' />";
    strflash = strflash + "<param name='movie' value='" + src + "'>";
    strflash = strflash + "<param name='loop' value='" + loop + "'>";
    strflash = strflash + "<param name='quality' value='" + quality + "'>";
    strflash = strflash + "<param name='wmode' value='" + wmode + "'>";
    strflash = strflash + "<PARAM NAME='FlashVars' Value='" + FlashVars + "'>";
    strflash = strflash + "<embed src='" + src + "' flashvars='" + FlashVars + "' loop='" + loop + "' quality='" + quality + "' wmode='" + wmode + "' bgcolor='" + bgcolor + "' width='" + width + "' height='" + Height + "' allowScriptAccess='always'>";
    strflash = strflash + "</object>";

    document.write(strflash);
}

// Commonµ¿¿µ»ó
function SetCommonMovieObject(id, FileName, width, Height, AutoStart, ShowControls, ShowDisplay, ShowGotoBar)
{
    var strmovie;

    strmovie = "";

    strmovie = strmovie + "<object id=" + id + " classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' width='" + width + "' height='" + Height + "'>";
    strmovie = strmovie + "<param name='FileName' value='" + FileName + "'>";
    strmovie = strmovie + "<PARAM NAME='AutoStart' Value='" + AutoStart + "'>";
    strmovie = strmovie + "<param name='ShowControls' value='" + ShowControls + "'>";
    strmovie = strmovie + "<param name='ShowDisplay' value='" + ShowDisplay + "'>";
    strmovie = strmovie + "<param name='ShowGotoBar' value='" + ShowGotoBar + "'>";
    strmovie = strmovie + "<embed src='" + FileName + "' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' width='" + width + "' height='" + Height + "'></embed>";
    strmovie = strmovie + "</object>";

    document.write(strmovie);
}
function makeFlashObject(swfURL,w,h,id,flashVars,wmode){
	var swfHTML = ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ w +'" height="'+h+'" id="'+id+'" align="middle">');
	swfHTML+=('<param name="allowScriptAccess" value="always" />');
	swfHTML+=('<param name="FlashVars" value="'+ flashVars +'"/>');
	swfHTML+=('<param name="menu" value="false"/>');
	swfHTML+=('<param name="wmode" value="'+wmode+'"/>');
	swfHTML+=('<param name="movie" value="'+swfURL+'" /><param name="quality" value="high" /><param name="salign" value="lt" />');
	swfHTML+=('<embed menu="false" src="'+ swfURL +'"  quality="high" FlashVars="'+flashVars+'" wmode="transparent" width="'+w+'" height="'+h+'" name="'+id+'" align="middle" salign="lt" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	swfHTML+=('</object>');
	document.write(swfHTML);
}

function SetCommonMovieObjectNew(id, FileName, width, Height, AutoStart, ShowControls, ShowDisplay, ShowGotoBar)
{
    var strmovie;

    strmovie = "";

    strmovie = strmovie + "<object id=" + id + " classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' width='" + width + "' height='" + Height + "'>";
    strmovie = strmovie + "<param name='URL' value='" + FileName + "'>";
    strmovie = strmovie + "<PARAM NAME='AutoStart' Value='" + AutoStart + "'>";
    strmovie = strmovie + "<param name='ShowControls' value='" + ShowControls + "'>";
    strmovie = strmovie + "<param name='ShowDisplay' value='" + ShowDisplay + "'>";
    strmovie = strmovie + "<param name='ShowGotoBar' value='" + ShowGotoBar + "'>";
    strmovie = strmovie + "<embed src='" + FileName + "' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' width='" + width + "' height='" + Height + "'></embed>";
    strmovie = strmovie + "</object>";

    document.write(strmovie);
}