
/*flash*/
function activeSwf(o_id, o_src, o_width, o_height, o_transparent ){
	obj =  '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,15,0" id="'+ o_id +'" name="'+ o_id +'" width="'+ o_width +'" height="'+ o_height +'" align="middle">';
	obj += '<param name="allowScriptAccess" value="always" />';
	obj += '<param name="allowFullScreen" value="false" />';
	if( o_transparent == "transparent"){
		obj += '<param name="wmode" value="transparent" />';
	}
	else if (o_transparent == "opaque") {
		obj += '<param name="wmode" value="opaque" />';
	}	
	obj += '<param name="movie" value="'+ o_src +'" />';
	obj += '<param name="quality" value="high" />';
	obj += '<param name="bgcolor" value="#ffffff" />';
	obj += '<embed src="'+ o_src +'"';
	if( o_transparent == "transparent" ){
		obj += ' wmode="transparent"';
	}
	else if( o_transparent == "opaque" ){
		obj += ' wmode="opaque"';
	}
	else {
		obj += ' wmode="window"';
	}
	obj += ' quality="high" bgcolor="#ffffff" width="'+ o_width +'" height="'+ o_height +'" name="'+ o_id +'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />';
	obj += '</object>';
	
	document.writeln( obj );
}

function icon()
{
	var obj = '<link href="/images/kor/common/favicon.ico" rel="shortcut icon" type="image/x-icon"/>';
	document.writeln(obj);
}


function cutStr(str,limit){
	var tmpStr = str;
	var byte_count = 0;
	var len = str.length;
	var dot = "";

	for(i=0; i<len; i++)
	{
		byte_count += chr_byte(str.charAt(i)); 

		if(byte_count == limit-1){
			if(chr_byte(str.charAt(i+1)) == 2)
			{
				tmpStr = str.substring(0,i+1);
				dot = "...";
			}
			else
			{
				if(i+2 != len)
				{
					dot = "...";
				}
				tmpStr = str.substring(0,i+2);
			}
			break;
		}
		else if(byte_count == limit)
		{
			if(i+1 != len)
			{
				dot = "...";
			}
			tmpStr = str.substring(0,i+1);
			break;
		}
	}

	document.writeln(tmpStr+dot);
	return true;
}

function chr_byte(chr){
	if(escape(chr).length > 4)
	{
		return 2;
	}
	else
	{
		return 1;
	}
}


