
//document.domain = "uway.com";
document.domain = "knou.ac.kr";
document.title="Korea National Open University";	// Å¸ÀÌÆ²
document.write('<script type="text/javascript" src="/engknou2/js/menu.js"></script>');
document.write('<script type="text/javascript" src="/engknou2/js/ui.js"></script>');

var IE = (navigator.appName.indexOf("Microsoft")>-1);
var IE6 = (navigator.appName.indexOf("Microsoft")>-1)&&(navigator.userAgent.indexOf("MSIE 6")>-1);
var IE7 = (navigator.appName.indexOf("Microsoft")>-1)&&(navigator.userAgent.indexOf("MSIE 7")>-1);

var depth1="",depth2="",depth3="";	// °¢ ÆäÀÌÁö¿¡ ¸Â°Ô Å¾¸Þ´º,ÁÂÃø¸Þ´º°¡ ÀÚµ¿À¸·Î È°¼ºÈ­µÇ°Ô ÇÏ±âÀ§ÇÑ ¸Þ´ºÀÇ depth ÀÇ °ªÀúÀå
var topMenuCount = 4;	// Å¾¸Þ´º°¹¼ö (´ëÇÐ¼Ò°³, ´ëÇÐ/´ëÇÐ¿ø, ÀÔÇÐ¾È³», ´ëÇÐ»ýÈ°) ÃÑ 4°³
var global_topFocusId = "";	// Å¾¸Þ´º¿¡¼­ ÇöÀç Æ÷Ä¿½º°¡ µÈ °´Ã¼ ID ÀÓ½ÃÀúÀåº¯¼ö
var global_leftFocusId = "";	// ÁÂÃø¸Þ´º¿¡¼­ ÇöÀç Æ÷Ä¿½º°¡ µÈ °´Ã¼ ID ÀÓ½ÃÀúÀåº¯¼ö
var tmpDepth1 = "";	// ÁÂÃø¸Þ´º¿¡¼­ ÇöÀçÆäÀÌÁöÀÇ depth¹øÈ£¿Í ¸Þ´º¹øÈ£¸¦ ºñ°íÇØ¼­ Æ÷Ä¿½º°¡ ÀÖ´Ù¸é Å¬·¡½º¸í ³¡¿¡ _on ¸¦ ºÙÀÓ

// ÇÃ¸®Ä¿Çö»ó((flicker prevent) Á¦°Å¼Ò½º
try {
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

function mNavi(hNum,mNum,sNum) {
	if(hNum) {
		depth1 = hNum;
		tmpDepth1 = hNum.toString();
	}
	if(mNum) {
		depth2 = mNum;
		tmpDepth1 += "-" + mNum.toString();

	}
	if(sNum) {
		depth3 = sNum;
		tmpDepth1 += "-" + sNum.toString();
	}
}

/*»ó´ÜºñÁÖ¾ó*/

function visual(){
	if(depth1 != ""){
		document.write('<div id="visual">');
		flashWrite('/engknou2/comimg/visual'+depth1+'.swf',965,245,'','#ffffff','transparent')
		document.write('</div>');
		
	}
}
/*»ó´ÜºñÁÖ¾ó*/

// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, À©µµ¿ì¸ðµå)
function flashWrite(url,w,h,id,bg,win){

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr=
	"<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='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";
	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);

}

/* ÀÌ¹ÌÁö ·Ñ¿À¹ö */
function over(obj,type){
	if(type) obj.src = obj.src.replace(".gif","_.gif");
	else  obj.src = obj.src.replace("_.gif",".gif");
}

/* ÀÌ¹ÌÁö ·Ñ¿À¹ö */

/* ³»¿ë¹Ù·Î°¡±â */
function contentAcessibility() {
	document.write('<div id="skipnavi"><a href="#contents">³»¿ëÀ¸·Î ¹Ù·Î°¡±â</a></div>');
}


/* ÁÂÃøÃÖ»ó´Ü¿¡ ¹æ¼ÛÅë½Å´ëÇÐ ·Î°í */
function knouLogo() {
	document.write('<div id="toplogo"><a class="logolink" href="/engknou2/" title="Korea National Open University">Korea National Open University Logo</a></div>');
	                       
}


/* ÁÂÃø »ó´Ü Å©°Ô,ÀÛ°Ô º¸±â */
function textZoomControl() {
	document.write('<div id="zoom_util">');
	document.write('<ul>');
	document.write('<li id="zoom_plus"><a title="zoom in" onkeypress="zoomUtil(\'plus\',event)" onclick="zoomUtil(\'plus\',event)" href="#">zoom in</a></li>');
	document.write('<li id="zoom_default"><a title="standard" onkeypress="zoomUtil(\'default\',event)" onclick="zoomUtil(\'default\',event)" href="#">standard</a></li>');
	document.write('<li id="zoom_minus"><a title="zoom out" onkeypress="zoomUtil(\'minus\',event)" onclick="zoomUtil(\'minus\',event)" href="#">zoom out</a></li>');
	document.write('</ul>');
	document.write('</div>');
}

/* ÁÂÃø »ó´Ü ¹öÆ° ¹«ºñ,ºê·Î½´¾î º¸±â */
function gobtnPr() {
		document.write('<div id="footer_link">');
document.write('<ul>');
document.write('<li><img src="/engknou2/comimg/footerbtn_2_1.gif" alt="brochure/breifing" width="239px" height="25px" border="0" usemap="#Map2">');
document.write('<map name="Map2" id="Map2">');
document.write('  <area shape="rect" coords="70,4,100,21" href="http://portal.knou.ac.kr/portal/common/PCDownloadG.do?admno=93343&admnogb=D&seq=1" title="go brochure" />');
document.write('  <area shape="rect" coords="194,4,222,21" href="http://www.knou.ac.kr/engknou2/files/breifing(eng).pdf" target=_blank title="go breifing" />');
document.write('</map></li>');
document.write('		<li><img src="/engknou2/comimg/footerbtn_1.gif" alt="movie" width="239" height="25" border="0" usemap="#Map">');
document.write('      	<map name="Map">');
document.write('       	<area shape="rect" coords="59,4,113,20" href="mms://knou.ktsystemhosting.com/ounvod/S/knou/knou_eng.wmv" alt="english">');
document.write('       	 <area shape="rect" coords="117,4,171,20" href="mms://knou.ktsystemhosting.com/ounvod/S/knou/knou_chn.wmv" alt="chinese">');
document.write('      	  <area shape="rect" coords="175,4,229,20" href="mms://knou.ktsystemhosting.com/ounvod/S/knou/knou_jpn.wmv" alt="japanese">');
document.write('    	  </map>');
document.write('		</li>');
document.write('  </ul>');
document.write('		</div>');

}

/* ÇÏ´Ü Ä«ÇÇ¶óÀÌÆ® */
function copyRightIncldue() {
	document.write('<div id="footer">');
	document.write('<div id="footerlogo">');
	document.write('<h4>ÇÏ´Ü·Î°í - ÇÑ±¹¹æ¼ÛÅë½Å´ëÇÐ±³</h4>');
	document.write('</div>');
	document.write('<div id="wrappe_copy">');
	document.write('<div id="copyright">');	
	document.write('<dl>');
	document.write('<dt class="copy">Copyright &copy; 2007 Korea national Open University. All rights reserved.</dt>');
	document.write('</dl>');
	document.write('</div>');
	document.write('</div>');
	document.write('</ul>');
	document.write('</div>');
	document.write('</div>');
}


// ¾ÆÀÌÇÁ·¹ÀÓ ¸®»çÀÌÂ¡ //
function adjustIFrameSize(id) {
	var myIframe = document.getElementById(id);

	if (myIframe) {
        if (myIframe.contentDocument && myIframe.contentDocument.body.offsetHeight) {
            // W3C DOM (and Mozilla) syntax
			if(window.opera) {			
				myIframe.height = myIframe.document.body.scrollHeight;    
			} else {
				myIframe.height = myIframe.contentDocument.body.offsetHeight;    
			}
        } else if (myIframe.Document && myIframe.Document.body.scrollHeight) {
            // IE DOM syntax
            myIframe.height = myIframe.Document.body.scrollHeight;
        }

		// bind onload events to iframe
        if (myIframe.addEventListener) {			
            myIframe.addEventListener("load", resizeIframe, false);
        } else {
            myIframe.attachEvent("onload", resizeIframe);
        }
   }
}

function resizeIframe(evt) {
    evt = (evt) ? evt : event;
    var target = (evt.target) ? evt.target : evt.srcElement;

    // take care of W3C event processing from iframe's root document

    if (target.nodeType == 9) {
      if (evt.currentTarget && evt.currentTarget.tagName.toLowerCase() == "iframe") {
            target = evt.currentTarget;    
        }
    }

    if (target) {
        adjustIFrameSize(target.id);
    }
}