function CreateControlFlash(DivID, CLSID, CODEBASE, WIDTH, HEIGHT, URL)
{
  var d = document.getElementById(DivID);
  d.innerHTML ='<object classid=' + CLSID + ' codebase=' + CODEBASE + ' width=' + WIDTH + ' height=' + HEIGHT +'><param name="movie" value=' + URL + '><param name="quality" value="high"><embed src=' + URL + ' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width=' + WIDTH + ' height=' + HEIGHT +'/></object>';
}

function CreateControlFlashVar(DivID, CLSID, CODEBASE, WIDTH, HEIGHT, FVAR, URL)
{
  var v = document.getElementById(DivID);
  v.innerHTML ='<object classid=' + CLSID + ' codebase=' + CODEBASE + ' width=' + WIDTH + ' height=' + HEIGHT +'><param name="movie" value=' + URL + '><param name="quality" value="high"><param name="flashvars" value=' + FVAR + '><embed src=' + URL + ' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars=' + FVAR + ' width=' + WIDTH + ' height=' + HEIGHT +' wmode="transparent"/></object>';
}

function insert_object(ob_name)
{
        document.write(ob_name);
		
}

function CreateControlFlash(DivID, CLSID, CODEBASE, WIDTH, HEIGHT, URL)
{
  var d = document.getElementById(DivID);
  d.innerHTML ='<object classid=' + CLSID + ' codebase=' + CODEBASE + ' width=' + WIDTH + ' height=' + HEIGHT +'><param name="movie" value=' + URL + '><param name="quality" value="high"><embed src=' + URL + ' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width=' + WIDTH + ' height=' + HEIGHT +'/></object>';
}

function insert_object(ob_name)
{
        document.write(ob_name);
		
}

////////////////////////////////////////////////////////////////////////////
// Flash Embed  End //
////////////////////////////////////////////////////////////////////////////

function flash_write(strSrc, strW, strH )
{	
	document.write('<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="'+strW+'" height="'+strH+'" id="company_flash_sub_v1" ALIGN="">');
	document.write('<PARAM NAME=movie VALUE="'+strSrc+'"> ');
	document.write('<PARAM NAME=menu VALUE=false> ');
	document.write('<PARAM NAME=quality VALUE=high> ');
	document.write('<PARAM NAME=wmode VALUE=transparent> ');
	document.write('<PARAM NAME=bgcolor VALUE=#CCCCCC> ');
	document.write('<EMBED src="'+strSrc+'" menu=false quality=high wmode=transparent bgcolor=#CCCCCC  WIDTH="'+strW+'" HEIGHT="'+strH+'" NAME="company_flash_sub_v1" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write('</OBJECT>');
}

function mediaPlayerShow(strSrc){
	document.write('<object id="MediaPlayer" 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">');
	document.write('<param name="Filename" value="'+ strSrc +'">');
	document.write('<param name="DefaultFrame" value="ppt"><param name="AudioStream" value="-1">');
	document.write('<param name="AutoSize" value="false"><param name="AutoStart" value="true">');
	document.write('<embed type="application/x-mplayer2" pluginspage = "http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="'+ strSrc +'" defaultframe="ppt" showstatusbar=1 filename="wish.asf" audiostream="-1" autosize="false" autostart="true" animationatstart="true" allowscan="true" allowchangedisplaysize="true" autorewind="false" balance="0" bufferingtime="5" clicktoplay="true" cursortype="0" currentposition="1" currentmarker="0" displaybackcolor="0" displayforecolor="16777215" displaymode="0" displaysize="0" enabled="true" enablecontextmenu="true" enablepositioncontrols="true" enablefullscreencontrols="false" enabletracker="true" invokeurls="true" language="-1" mute="false" playcount="1" previewmode="false" rate="1" selectionstart="-1" selectionend="-1" sendopenstatechangeevents="true" sendwarningevents="true" senderrorevents="true" sendkeyboardevents="false" sendmouseclickevents="false" sendmousemoveevents="false" sendplaystatechangeevents="true" showcaptioning="false" showdisplay="false" showgotobar="false" showtracker="true" showcontrols="true" showpositioncontrols="true" showaudiocontrols="true" transparentatstart="false" videoborderwidth="0" videobordercolor="0" videoborder3d="false" volume="0" windowlessvideo="false" wmode=" transparent"></embed> </object>');
}

function media_write(strSrc){
	if (strSrc.substr(strSrc.length - 4) == ".flv"){
		flash_write("/flash/flvplayer__.swf?file=http://" + document.domain + strSrc, "340", "295");
	} else {
		mediaPlayerShow("http://" + document.domain + strSrc);
//		document.write("<OBJECT ID='ipopx' WIDTH=0 HEIGHT=0 CLASSID='CLSID:92D0D610-A6FA-48D8-94CB-BD47FDF68655' codebase='http://www.gagci.com/common/ucc/ipopx.cab#version=1,0,0,11'></OBJECT>");
//		RunGom(strSrc);	
	}
}

////////////////////////////////////////////////////////////////////////////
// Flash Embed  End //
////////////////////////////////////////////////////////////////////////////

// ¸¶¿ì½º ·Ñ¿À¹ö ÀÌ¹ÌÁö ½ºÅ©¸³Æ® ½ÃÀÛ //
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_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_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];}
}
// ¸¶¿ì½º ·Ñ¿À¹ö ÀÌ¹ÌÁö ½ºÅ©¸³Æ® ³¡ //

var floatsTop = 315;

///ÇÃ·ÎÆÃ¸Þ´º ½ÃÀÛ
function doFloating(op){
	if (op == "2") floatsTop = 220;
	
	var appBrowser = navigator.appName;
	if (appBrowser == "Microsoft Internet Explorer"){
		quick_move_ie(document.getElementById("quckMenu").offsetHeight + 120);
	} 
	else if (appBrowser == "Netscape") {
		quick_move_ns(document.getElementById("quckMenu").offsetHeight + 156);
	}
}


//*** ½ºÅ©·Ñ ¹Ù IE
function quick_move_ie(d_height, op){
	var tot_height = document.body.scrollHeight;
	var cur_top = document.body.scrollTop + floatsTop; //Äü¸Þ´ºÅ¾À¸·ÎºÎÅÍÀ§Ä¡
	if (cur_top > (tot_height-d_height)){
		cur_top = (tot_height-d_height);
	}
	var Yposi = parseInt(document.getElementById("quckMenu").style.pixelTop);
 	document.getElementById("quckMenu").style.pixelTop += (cur_top - Yposi)/4;
	setTimeout("quick_move_ie("+ d_height +")",50);
}

//*** ½ºÅ©·Ñ ¹Ù NS
function quick_move_ns(d_height){
	var tot_height = document.body.scrollHeight;
	var cur_top = self.pageYOffset + floatsTop; //Äü¸Þ´ºÅ¾À¸·ÎºÎÅÍÀ§Ä¡
	if (cur_top > (tot_height - d_height)){
		cur_top = (tot_height - d_height);
	}
	var Yposi = parseInt(document.getElementById("quckMenu").style.top);
	document.getElementById("quckMenu").style.top = Yposi + (cur_top - Yposi)/4;
	setTimeout("quick_move_ns("+ d_height +")",50);
}

function floatmenu(val){
	switch (val){
		case "1" :
			location.href = "/community/area/area.asp";
			break;
		case "2" :
			location.href = "/community/job/job.asp";
			break;
		case "3" :
			location.href = "/community/home/default.asp";
			break;
		case "4" :
			smartSMS();
			break;
		case "5" :
			location.href = "/about_acro/status.asp";
			break;
		case "6" :
			location.href = "/utility/member_edit.asp";
			break;
	}
}

