
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];}
}




function flash(id, width, height, name){
	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="'+name+'">'
	+'<param name="movie" value="'+id+'">'
	+'<param name="quality" value="high">'
	+'<param name="wmode" value="transparent">'
    +'<param name="allowScriptAccess" value="always" />'
	+'<embed src="'+id+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" showLiveConnect="true" name="'+name+'" allowScriptAccess="always"></embed>'
	+'</object>');
}

function cgf_CenterWindow(as_url, as_name, as_w, as_h, as_scroll, as_resize){
	var PosLeft; 
	var PosTop; 

	PosLeft = (window.screen.width/2) - (as_w/2 + 10); 
	PosTop = (window.screen.height/2) - (as_h/2 + 50);

//	as_scroll = 0;

	if(window.screen.width < as_w+10){
		PosLeft = 0;
		as_w = window.screen.width - 10;
		as_scroll = 1;
	}

	if(window.screen.height < as_h+60){
		PosTop = 0;
		if(window.screen.width>as_w+10){
			as_w +=15;
		}

		as_h = window.screen.height - 60;
		as_scroll = 1;
	}

	var objWin = window.open(as_url,as_name,"status,height=" + as_h + ",width=" + as_w + ", scrollbars=" + as_scroll + ",resizable=" + as_resize + ",left=" + PosLeft + ",top=" + PosTop + ",screenX=" + PosLeft + ",screenY=" + PosTop + ",status=no"); 
	if(objWin == null){
		alert("팝업창이 차단되었습니다.\n\n팝업창 차단 설정을 해제하여주십시요.\n\n팝업창 차단 설정은\n웹페이지 상단에 나타나는 [알림 표시줄]에서 설정이 가능합니다.\n\n또는 [도구 > 인터넷옵션 > 개인정보 > 팝업차단 > 설정]에서\n설정이 가능합니다.");
	}
}
