/******************************************************************************/
/*  1. ÇÁ·ÎÁ§Æ®  : ExamPlus ¸®´º¾ó                                               */
/*  2. ÆÄÀÏÀÌ¸§  : cn_function.js                                             */
/*  3. ÆÄÀÏ±â´É  : »çÀÌÆ® °øÅë function js                                         */
/*  4. ÀÛ¼ºÀÚ    : ±Ç¿À»ó                                                      */
/*  5. ÀÛ¾÷ÀÏ½Ã  :                                                  */
/*  5. ¼öÁ¤ÀÏ    :                                                             */
/*****************************************************************************/

var digit = '0123456789';
var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

/*******************************************************************/
/* ¹®ÀÚ ±æÀÌ °Ë»ç										/
/*******************************************************************/
function gfnCalculateStr(pobj,pstrValue,pintMAX) 
{
	var i, intLen = 0, intByte = 0;

	for (i = 0; i < pstrValue.length; i++) {
		var n = pstrValue.charCodeAt(i);	
			intByte += 2;
			intLen ++;
	}
	
	if(pstrValue.length > pintMAX) {			
		alert("»ç¿ëÇÏ½Ç ¼ö ÀÖ´Â ÃÖ´ëÀÇ ±ÛÀÚ¼ö´Â " + pintMAX + " ÀÔ´Ï´Ù.!!");
		pobj.value = pstrValue.substring(0,pintMAX);
		return 0;
	} 
	
	return pintMAX-intLen;
}

// write layer 
function gfnCheckLen(pobj,pstrValue,pobjLayer,pintMAX) 
{
	var strLength = "" + gfnCalculateStr(pobj,pstrValue,pintMAX);
	document.all[pobjLayer].innerHTML = strLength;
}

/*******************************************************************/
/* Æû °ËÁõ ÇÔ¼ö														/
/*******************************************************************/
 function gfncheckForm(f) {
    
	var fLen = f.elements.length;
	var fObj; // Æû ¿ä¼Ò
	var fTyp; // Æû ¿ä¼Ò Type
	var fVal; // Æû ¿ä¼Ò Value
	var fMsg; // °æ°í ¸Þ½ÃÁö ¼Ó¼º
	var fNum; // ¼ýÀÚ¸¸ ÀÔ·Â ¼Ó¼º
	var fMax; // ÃÖ´ë ±æÀÌ ÁöÁ¤
	var fMin; // ÃÖ¼Ò ±æÀÌ ÁöÁ¤
	var fMxN; // ÃÖ´ë°ª ÁöÁ¤
	var fMnN; // ÃÖ¼Ò°ª ÁöÁ¤
	var fMal; // ¸ÞÀÏ FORMAT
	var fJary; //ÀÚ¸®¼ö ÁöÁ¤
	var fengsu; //¿µ¹®ÇÏ°í ¼ýÀÚ¸¸
	var fName; //ÀÌ¸§ Ã¼Å©

	for (i=0;i<fLen;i++) {
		fObj = f.elements[i];
		fTyp = gfntoUpperCase(fObj.getAttribute("type"));
		fVal = fObj.getAttribute("value");
		fMsg = fObj.getAttribute("msg");  // °æ°í ¸Þ½ÃÁö
		fNum = fObj.getAttribute("chknum");  // ¼ýÀÚ¸¸ ±âÀÔ °¡´ÉÇÏµµ·Ï
		fMax = fObj.getAttribute("maxlen");  // ÃÖ´ë ÀÔ·Â±ÛÀÚ¼ö Á¦ÇÑ
		fMin = fObj.getAttribute("minlen");  // ÃÖ¼Ò ÀÔ·Â±ÛÀÚ¼ö Á¦ÇÑ
		fMxN = fObj.getAttribute("maxnum");  // ÃÖ´ë ¼ýÀÚ Á¦ÇÑ
		fMnN = fObj.getAttribute("minnum");  // ÃÖ¼Ò ¼ýÀÚ Á¦ÇÑ
		fMal = fObj.getAttribute("chkmail"); // ÀÌ¸ÞÀÏ Ã¼Å©
        fJary = fObj.getAttribute("chklen"); // ÀÚ¸®¼öÃ¼Å©
        fengsu = fObj.getAttribute("chkengnum"); // ¼ýÀÚ¿Í ¿µ¹®¸¸ ÀÔ·Â
        fName = fObj.getAttribute("chkname"); // ÀÌ¸§ Ã¼Å©
       
		if (fMsg != null && (fTyp == "TEXT" || fTyp == "HIDDEN" || fTyp == "TEXTAREA" || fTyp == "PASSWORD") && fVal.replace(/ /gi,"") == "") {
		alert(fMsg + " ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		if (fTyp != "HIDDEN") {fObj.focus();}
		return false;
		}

		if (fMsg != null && (fTyp == "SELECT-ONE" || fTyp == "SELECT-MULTIPLE") && fVal =="") {
		alert(fMsg + " ¼±ÅÃÇØ ÁÖ¼¼¿ä");
		fObj.focus(); return false;
		}
		if (fMsg != null && (fTyp == "RADIO" || fTyp == "CHECKBOX") && gfncheckChecked(fObj) == false) {
		alert(fMsg + " ¼±ÅÃÇØ ÁÖ¼¼¿ä");
		fObj.focus(); return false;
		}
		if (fNum != null && isNaN(fVal)) {
		alert("¼ýÀÚ·Î¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		fObj.focus(); return false;
		}
		if (fMax != null && fMax < gfngetLen(fVal)) {
		alert("ÀÔ·ÂµÈ ±ÛÀÚ¼ö°¡ "+fMax+"ÀÚº¸´Ù ÀÛ¾Æ¾ßÇÕ´Ï´Ù.\n(¿µ¹® "+fMax+"ÀÚ, ÇÑ±Û "+Math.floor(fMax/2)+"ÀÚ ±îÁö °¡´ÉÇÕ´Ï´Ù.)");
		fObj.focus(); return false;
		}
		if (fMin != null && fMin > gfngetLen(fVal)) {
		alert("ÀÔ·ÂµÈ ±ÛÀÚ¼ö°¡ "+fMin+"ÀÚº¸´Ù Ä¿¾ßÇÕ´Ï´Ù.");
		fObj.focus(); return false;
		}
		if (fMxN != null && parseInt(fMxN) < parseInt(fVal)) {
		alert("ÀÔ·ÂµÈ ¼ýÀÚ´Â "+fMxN+"º¸´Ù ÀÛ¾Æ¾ßÇÕ´Ï´Ù.");
		fObj.focus(); return false;
		}
		if (fMnN != null && parseInt(fMnN) > parseInt(fVal)) {
		alert("ÀÔ·ÂµÈ ¼ýÀÚ´Â "+fMnN+"º¸´Ù Ä¿¾ßÇÕ´Ï´Ù.");
		fObj.focus(); return false;
		}
		if (fMal != null && gfncheckEmail(fVal) == false && fVal != "") {
		alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù");
		fObj.focus(); return false;
		}
		if (fJary != null && (fJary != fVal.length)) {
		alert("ÀÚ¸®¼ö°¡ ¸ÂÁö ¾Ê½À´Ï´Ù.");
		fObj.focus(); return false;
		}
		/*
		if (fengsu != null && fnEngSuCheck(fObj, digit+alpha)) {
		alert("¿µ¹®°ú ¼ýÀÚ·Î¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		fObj.focus(); return false;
		}
		*/
		if (fengsu != null && fnEngSuCheck(fObj, digit+alpha) == false){
		alert("¿µ¹®°ú ¼ýÀÚ·Î¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		fObj.focus(); return false;
		}
		if (fName != null && gfncheck_name(fVal) == false){
		alert("ÀÌ¸§ÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
		fObj.focus(); return false;
		}
		
		fnNotReady
		//alert(fMsg)
	}
	return true;
}

/*******************************************************************/
/* Æû¿¡ ÇØ´çÇÏ´Â ÄÁÆ®·ÑµéÀÇ ±âº»°ª ½±°Ô ¼ÂÆÃÇØ ÁÖ±â						/
/*******************************************************************/
function gfninitForm(f) {
	var nLen; // form ¿ä¼ÒÀÇ °¹¼ö
	var ival; // °¢ ¿ä¼ÒÀÇ default value °ª Áï! ÃÊ±âÈ­ÇÏ°íÀÚ ÇÏ´Â°ª
	var fTyp; // form ¿ä¼ÒÀÇ Å¸ÀÔ(select, radio, checkbox...)
	
	for (var i = 0; i < f.elements.length; i++) {
		fTyp = gfntoUpperCase(f.elements[i].type);
		ival = f.elements[i].ival;
		if (ival && fTyp == "SELECT-ONE") {
			nLen = f.elements[i].options.length;
			for (var j = 0; j < nLen; j++) {
				if (f.elements[i].options[j].value == ival)
					f.elements[i].options[j].selected = true;
			}
		}
		if (fTyp == "SELECT-MULTIPLE") {
			nLen = f.elements[i].options.length;
			for (var j = 0; j < nLen; j++) {
				if (f.elements[i].options[j].value == f.elements[i].options[j].ival)
					f.elements[i].options[j].selected = true;
				}
			}
		if (ival && (fTyp == "RADIO" || fTyp == "CHECKBOX")) {
		if (f.elements[i].value == ival)
			f.elements[i].checked = true;
		}
	}
	return true;
}

/*******************************************************************/
/* ¹è¿­ ¿ä¼ÒÀÏ °æ¿ì checked µÈ°ÍÀÌ ÀÖ´ÂÁö È®ÀÎ							/
/*******************************************************************/
function gfncheckChecked(pobj) {
	var fname = pobj.form.name;
	var objnm = pobj.name;
	var oElem = eval(fname+"."+objnm);
	var ret = false;
	
	if (typeof(oElem.length) == "undefined") {
		if (oElem.checked) {
			ret = true;
		}
	}else{
		for (var i=0;i<oElem.length;i++) {
			if (oElem[i].checked) {
				ret = true;
			}
		}
	}
	return ret;
}

/*******************************************************************/
/* ÀÌ¸ÞÀÏ À¯È¿¼º Ã¼Å©													/
/*******************************************************************/
function gfncheckEmail(pstr){
	var reg = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/;
	if (pstr.search(reg) != -1) {
		return true;
	}
	return false;
}

/*******************************************************************/
/* ¹®ÀÚ ±æÀÌ ¹ÝÈ¯ (¿µ¹® 1byte, ÇÑ±Û 2byte °è»ê)							/
/*******************************************************************/
function gfngetLen(pstr) {
	var len;
	var temp;
	
	len = pstr.length;
	var tot_cnt = 0;
	for(k=0;k < len;k++){
		temp = pstr.charAt(k);
		
		if(escape(temp).length > 4)
			tot_cnt += 2;
		else
			tot_cnt++;
	}
	return tot_cnt;
}

/*******************************************************************/
/* ´ë¹®ÀÚ º¯È¯ ex) gfntoUpperCase(¹®ÀÚ)								/
/*******************************************************************/
function gfntoUpperCase(pstr) {
	var ret;
	pstr != null ? ret = pstr.toUpperCase() : ret = "";
	return ret;
} 

/*******************************************************************/
/* popup È£ÃâÇÏ±â														/
/*******************************************************************/
function gfnPopup(pstrGoUrl, pstrWinName, pintWidth, pintHh, pstrScroll) {
	var lintTop = (screen.width - pintWidth) / 2;
	var lintBottom = (screen.height - pintHh) / 2;
	winprops = 'height='+pintHh+',width='+pintWidth+',top='+lintTop+',left='+lintBottom+',scrollbars='+pstrScroll+',resizable'
	newWin = window.open(pstrGoUrl, pstrWinName, winprops)
	if (parseInt(navigator.appVersion) >= 4)
		newWin.window.focus();
}

/*******************************************************************/
/* »õ Ã¢ ¶ç¿ì±â														/
/*******************************************************************/
function gfnNewWindow(pstrGoUrl, pstrWinName, pintWidth, pintHh, pintTop, pintLeft, pstrScroll) {
	winprops = 'height='+pintHh+',width='+pintWidth+',top='+pintTop+',left='+pintLeft+',scrollbars='+pstrScroll+',resizable'
	newWin = window.open(pstrGoUrl, pstrWinName, winprops)
	newWin.window.focus();
}

/*******************************************************************/
/* »õ Ã¢ °¡¿îµ¥ ¶ç¿ì±â												/
/*******************************************************************/
function gfnNewWindowCenter(pstrGoUrl, pstrWinName, pintWidth, pintHh, pstrScroll) {
	var intLeft = screen.width / 2 - pintWidth / 2;
	var intTop = screen.height / 2 - pintHh / 2;

	winprops = 'height='+pintHh+',width='+pintWidth+',top='+intTop+',left='+intLeft+',scrollbars='+pstrScroll+',resizable'
	newWin = window.open(pstrGoUrl, pstrWinName, winprops)
	newWin.window.focus();
}


/*******************************************************************/
/* popup ´ÝÀ»½Ã popup ´Ý°í ÇØ´ç ÆäÀÌÁö ÀÌµ¿ÇÏ±â							/
/*******************************************************************/
function gfnPopGoClose(pstrGoUrl) {
	top.opener.location.href = pstrGoUrl;
	self.close();
}

/*******************************************************************/
/* ÀÌ¹ÌÁö ¿ø »çÀÌÁî º¸±â												/
/*******************************************************************/
function gfnview(pstrImgName) { 
	/*
	H = imageid.height; 
    W = imageid.width;        
    O = "width="+W+",height="+H; 
    imgWin = window.open("/pds/imgView.asp?src="+pstrImgName,"",O); 
*/
	var imgwin = window.open("",'WIN','scrollbars=no,status=no,toolbar=no,resizable=no,location=no,menu=no,width=10,height=10'); 
	imgwin.focus(); 
	imgwin.document.open(); 
	imgwin.document.write("<html>\n"); 
	imgwin.document.write("<head>\n"); 
	imgwin.document.write("<title>ÀÌ¹ÌÁö</title>\n"); //¿ÀÇÂÃ¢ Å¸ÀÌÆ² ÀÌ¸§ ÁöÁ¤ÇÏ´Â ºÎºÐ 

	imgwin.document.write("<sc"+"ript>\n"); 
	imgwin.document.write("function resize() {\n"); 
	imgwin.document.write("pic = document.il;\n"); 
	imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
	imgwin.document.write(" if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 29; myWidth = eval(pic).width;\n"); 
	imgwin.document.write(" } else { myHeight = eval(pic).height + 9; myWidth = eval(pic).width; }\n"); 
	imgwin.document.write(" clearTimeout();\n"); 
	imgwin.document.write(" var height = screen.height;\n"); 
	imgwin.document.write(" var width = screen.width;\n"); 
	imgwin.document.write(" var leftpos = width / 2 - myWidth / 2;\n"); 
	imgwin.document.write(" var toppos = height / 2 - myHeight / 2; \n"); 
	imgwin.document.write(" self.moveTo(leftpos, toppos);\n"); 
	imgwin.document.write(" self.resizeTo(myWidth, myHeight);\n"); 
	imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
	imgwin.document.write("</sc"+"ript>\n"); 

	imgwin.document.write("</head>\n"); 
	imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 

	imgwin.document.write("<table cellpadding=0 cellspacing=0 border=0><tr><td><img border=0 src='"+pstrImgName+"' xwidth=100 xheight=9 name=il onload='resize();' onClick='window.close();' style='cursor:hand;'></td></tr></table>\n"); 

	imgwin.document.write("</body>\n"); 
	imgwin.document.write("</html>\n"); 
	imgwin.document.close(); 
}

/*******************************************************************/
/* ¼ýÀÚÀÔ·Â Ã¼Å©															/
/*******************************************************************/
function gfnGetKey()
     {
     if (event.keyCode >= 48 && event.keyCode <= 57) {
          event.returnValue = true;
          }
     else {
          event.returnValue = false;
          }
     }

/*******************************************************************/
/* ÁÖ¹Îµî·Ï¹øÈ£È®ÀÎ													/
/*******************************************************************/
function gfnssnCheck(pstr1,pstr2){
	temp = "0123456789" 
	inttemp = 0
	k = 0
	idnum = pstr1.concat(pstr2);
	i = 0 
	j = 2;
	RemNum = 0
	CalcPos = 0
	CheckSum = 0

	if(idnum.length < 13){
		return false;
	}else{
		for(i = 0; i < 12; i++, j++){
			CheckSum += temp.indexOf( idnum.substring(i,i+1)) * j
			if(i == 7) j = 1
		}

		RemNum = CheckSum % 11
		if(RemNum == 0){
			CalcPos = 1
		}
		else if(RemNum == 1){
			CalcPos = 0
		}
		else{
			CalcPos = 11 - RemNum
		}
		if(CalcPos != temp.indexOf(idnum.substring(12,13))){
			return false;
		}
		else{
			return true;
		}
	}
}

/*******************************************************************/
/* ¾ËÆÄºª°Ë»ç															/
/*******************************************************************/
function gfnIsAlpha(pcheckStr)
{
	var checkOK = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.";
	for (i = 0;  i < pcheckStr.length;  i++){
		ch = pcheckStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
			if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			return (false);
			break;
		}
	}
	return (true);
}

/*******************************************************************/
/* ¼ýÀÚ°Ë»ç															/
/*******************************************************************/
function gfnbIsAllNum(pcheckInt) {
	for(var ii = 0; ii < pcheckInt.length; ii ++) {
		if(isNaN(pcheckInt.charAt(ii)))
			return false;
	}
	return true;
}

/*******************************************************************/
/* °ø¹é°Ë»ç															/
/*******************************************************************/
function gfnblankcheck(pcheckStr){
	for(i=0; i<pcheckStr.length; i++){
		if(pcheckStr.charAt(i)==' '){
			return false;
			break;
		}
	}
}

/*******************************************************************/
/* ÀÌ¸§ È®ÀÎ															/
/*******************************************************************/
function gfncheck_name(pstr)
{
	var temp = pstr.replace(' ','');
	var cust_name = temp;

	// ÀÌ¸§¿¡ ÇÑ±Û ÀÌ¿ÜÀÇ ¹®ÀÚ°¡ µé¾î°¡ ÀÖÀ» ¶§
	for ( var i = 0; i < cust_name.length; i++)
	{
		var ch = cust_name.charAt(i);
		if ((ch >= '¤¿' && ch <= 'È÷') || (ch >= '¤¡' && ch <= '¤¾'))
		{
			;
		}
		else
		{
			return false;
		}
	}

    /*
	if (navigator.userAgent.substring(0,11) != "Mozilla/4.0")
		cust_name_length = pstr.length;
	else
		cust_name_length = pstr.length / 2;
    */
    cust_name_length = pstr.length

	// ÀÌ¸§ ±æÀÌ°¡ 2ÀÚ¹Ì¸¸ÀÏ °æ¿ì
	if ( cust_name_length < 2  || cust_name_length > 10)
	{
		return false;
	}

	pstr = cust_name;
	return true;
}

/*******************************************************************/
/* ÀÌ¹ÌÁö ¸®»çÀÌÁî													/
/*******************************************************************/
function img_resize(gintCnt, pintSize){
	if (gintCnt > 0 ){
		for(i=1;i<=gintCnt;i++){
			if ( eval('document.imgPhoto' + i + '.width > '+ pintSize +'') ) {
				eval('document.imgPhoto' + i + '.width = '+ pintSize +'') ;
			}
		}
	}
}

/*******************************************************************/
/* ÁÖ¹Î¹øÈ£ ´ÙÀ½Ä­À¸·Î ÀÌµ¿ÇÏ±â		                				/
/*******************************************************************/
function fnJuminNext(f){
    var str = f.txtSsn1.value.length;
    if (str == 6)
        f.txtSsn2.focus();
}

    function fnFindObj(n, d) { //v3.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=fnFindObj(n,d.layers[i].document); return x;
    }
    function fnShowHideLayers() { //v3.0
        Diary_View.style.display='';
        var i,p,v,obj,args=fnShowHideLayers.arguments;
        for (i=0; i<(args.length-2); i+=3) if ((obj=fnFindObj(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 fnHideLayers() { //v3.0
        //HTMLEDITOR.document.body.focus();
        Diary_View.style.display='none';
    }

/*******************************************************************/
/* ÁØºñÁß ¾Ë¸®±â					                				/
/*******************************************************************/    
function fnNotReady(){
	alert ("ÁØºñÁßÀÔ´Ï´Ù.");
}

/*******************************************************************/
/* ¿µ¹® ¶Ç´Â ¼ýÀÚ Ã¼Å©                                              /
/*******************************************************************/    
function fnEngSuCheck(objTarget, filter){
    var obj_value = objTarget.value
    for(var i=0; i<obj_value.length; i++){
		if(filter.indexOf(obj_value.substring(i,i+1))<0){
			return false;
		}
	}
	return true;
}

/*******************************************************************/
/* ÀÌ¹ÌÁö ·Ñ¿À¹ö	                                                /
/*******************************************************************/  
function change_img(id,after) { 
    eval(id+'.filters.blendTrans.stop();'); 
    eval(id+'.filters.blendTrans.Apply();'); 
    eval(id+'.src="'+after+'";'); 
    eval(id+'.filters.blendTrans.Play();'); 
} 

/*******************************************************************/
/* ·¹ÀÌ¾î Ã³¸®		                                                /
/*******************************************************************/  
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 MM_findObj(n, d) { //v3.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); return x;
}

function show_shopcategory()
{
	if(document.all.id_shopcategory.style.display == "none")
	{
		document.all.id_shopcategory.style.display = "";
	}
	else
	{
		hide_shopcategory();
	}
}

function hide_shopcategory()
{
	document.all.id_shopcategory.style.display = "none";
}

/*******************************************************************/
/* ÇÃ·¡½¬ Ã³¸®		                                                /
/*******************************************************************/ 
function swf(src,w,h) {
 html = '';
 html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
 html += '<param name="movie" value="'+src+'">';
 html += '<param name="quality" value="high">';
 html += '<param name="bgcolor" value="#ffffff">';
 html += '<param name="menu" value="false">';
 html += '<param name="wmode" value="transparent">';
 html += '<param name="swliveconnect" value="true">';
 html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
 html += '<\/object>';
 document.write(html);
}

// ¼ýÀÚ¿¡ 3ÀÚ¸®¸¶´Ù ÄÞ¸¶Âï±â(Çö±ÝÇ¥½Ã)#################
function Format_comma(val1){
	var newValue = val1+""; //¼ýÀÚ¸¦ ¹®ÀÚ¿­·Î º¯È¯
	var len = newValue.length;  
	var ch="";
	var j=1;
	var formatValue="";

	// ÄÞ¸¶Á¦°Å  
	newValue = newValue.replace(/\,/gi, ' ');

	// commaÁ¦°ÅµÈ ¹®ÀÚ¿­ ±æÀÌ
	len = newValue.length;

	for(i=len ; i>0 ; i--){
		ch = newValue.substring(i-1,i);
		formatValue = ch + formatValue;

		if ((j%3) == 0 && i>1 ){
			formatValue=","+formatValue;
		}
		j++
	}
	return formatValue;
}