// =====================================================================
// ----- 1. ÇÃ·¡½¬ °ü·Ã ½ÃÀÛ -------------------------------------------

// ÇÃ·¡½¬ - Åõ¸í
function swf_trans(src,w,h,id)	// (ÀÌ¸§, ³ÐÀÌ, ³ôÀÌ)
{
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="'+id+'" 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="wmode" value="transparent">';
	html += '<param name="menu" value="false">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high   menu="false" width="'+w+'" height="'+h+'" swliveconnect="true" id="'+id+'" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

// ÇÃ·¡½¬ - ¹ÙÅÁÈò»ö
function swf_bgcolor(src,w,h)	// (ÀÌ¸§, ³ÐÀÌ, ³ôÀÌ)
{
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,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="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);
}
// ÇÃ·¡½¬ - ¸ÞÀÎ
function swf_main(src,w,h)	// (ÀÌ¸§, ³ÐÀÌ, ³ôÀÌ)
{
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,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="wmode" value="transparent">';
	html += '<param name="menu" value="false">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'%" height="'+h+'" swliveconnect="true" id="param" allowScriptAccess="sameDomain" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';

	html += '<\/object>';
	document.write(html);
}
// ----- 1. ÇÃ·¡½¬ °ü·Ã ³¡ ---------------------------------------------
// =====================================================================

function iframeResize(iframeId) {
	with (document.getElementById(iframeId)) {
		width = contentWindow.document.body.scrollWidth;
		height = contentWindow.document.body.scrollHeight;
	}
}


function goMenu(menuIdx, subMenuIdx, boardIdx, gisuJo, n) {
	if (!boardIdx) boardIdx = "";
	if (!gisuJo) gisuJo = "";
	if (!n) n = "";
	location.href = "/em/common/?mId=" + menuIdx + "&sId=" + subMenuIdx + "&boardIdx=" + boardIdx + "&gi_su_jo=" + gisuJo + "&n=" + n;
}


String.prototype.trim = function()
{
	return this.replace(/^(\s+)|(\s+)$/g,"");
}



_editor_url = "/em/lib/htmlarea/";

var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);

if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5)
{
	document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
	document.write(' language="JavaScript"></scr' + 'ipt>');
}
else
{
	document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>');
}

function LoadHtmlEditor(formName)
{
	var config = new Object();    // create new config object

	config.width = "100%";
	config.height = "300px";
	config.bodyStyle = 'background-color: white; font-family: "±¼¸²"; font-size: 9pt; color:555555;';
	config.debug = 0;

	// NOTE:  You can remove any of these blocks and use the default config!

	config.toolbar = [
		['fontname'],
		['fontsize'],
	//    ['fontstyle'],
		['bold','italic','underline','separator'],
		['strikethrough','subscript','superscript','separator'],
		['linebreak'],
		['justifyleft','justifycenter','justifyright','separator'],
		['OrderedList','UnOrderedList','Outdent','Indent','separator'],
		['forecolor','backcolor','separator'],
		['HorizontalRule','Createlink','InsertImage','InsertTable','htmlmode','popupeditor'],
	//    ['about','help','popupeditor'],
	];

	config.fontnames = {
		"±¼¸²":            "±¼¸²",
		"±¼¸²Ã¼":          "±¼¸²Ã¼",
		"µ¸¿ò":            "µ¸¿ò",
		"µ¸¿òÃ¼":          "µ¸¿òÃ¼",
		"¹ÙÅÁ":            "¹ÙÅÁ",
		"¹ÙÅÁÃ¼":          "¹ÙÅÁÃ¼",
		"±Ã¼­":            "±Ã¼­",
		"±Ã¼­Ã¼":          "±Ã¼­Ã¼",
		"Arial":           "arial, helvetica, sans-serif",
		"Courier New":     "courier new, courier, mono",
		"Georgia":         "Georgia, Times New Roman, Times, Serif",
		"Tahoma":          "Tahoma, Arial, Helvetica, sans-serif",
		"Times New Roman": "times new roman, times, serif",
		"Verdana":         "Verdana, Arial, Helvetica, sans-serif",
		"impact":          "impact",
		"WingDings":       "WingDings"
	};

	config.fontsizes = {
		"1 (8 pt)":  "1",
		"2 (10 pt)": "2",
		"3 (12 pt)": "3",
		"4 (14 pt)": "4",
		"5 (18 pt)": "5",
		"6 (24 pt)": "6",
		"7 (36 pt)": "7"
	  };

	//config.stylesheet = "http://www.domain.com/sample.css";

	config.fontstyles = [   // make sure classNames are defined in the page the content is being display as well in or they won't work!
	  { name: "headline",     className: "headline",  classStyle: "font-family: arial black, arial; font-size: 28px; letter-spacing: -2px;" },
	  { name: "arial red",    className: "headline2", classStyle: "font-family: arial black, arial; font-size: 12px; letter-spacing: -2px; color:red" },
	  { name: "verdana blue", className: "headline4", classStyle: "font-family: verdana; font-size: 18px; letter-spacing: -2px; color:blue" }

	// leave classStyle blank if it's defined in config.stylesheet (above), like this:
	//  { name: "verdana blue", className: "headline4", classStyle: "" }
	];

	editor_generate(formName, config);
}

function NUonlyNo() {
	var keycode = event.keyCode;

	if( (keycode>=48&&keycode<=57) ||
			(keycode==8||keycode==9||keycode==46) ||
			(keycode>=96&&keycode<=105) ||
			(keycode>=35&&keycode<=40) ||
			(event.ctrlKey)||(keycode==67||keycode==86) ) {
		if(!(event.ctrlKey) && (keycode==67||keycode==86))	//ctrlÅ°¸¦ ´©¸£Áö ¾ÊÀº »óÅÂ¿¡¼­ c¶Ç´Â vÅ°¸¦ ´©¸£´Â °æ¿ì
			event.returnValue=false;
		else
			event.returnValue=true;	//±×¿ÜÀÇ Á¤»óÀûÀÎ ÀÔ·Â»óÈ²
	} else {
		event.returnValue=false;
	}
}

function openGLS() {

   //if(document.login_ck.gls.checked == true){
	// window.open('http://www.skku.edu/e-home-s/login/popup_login_ini.jsp?f_dval=gls','','scrollbars=no, width=358, height=131, left=300, top=250');
   //}else{
	 window.open('http://www.skku.edu/e-home-s/login/popup_login.jsp?f_dval=gls','','scrollbars=no, width=358, height=131, left=300, top=250');
   //}
}
