    var domainName = "http://ee.ulsan.ac.kr/";


	function goHome() {
		location.href = domainName+'eeMain.php';
	}

function namosw_goto_byselect(sel, targetstr) {


 var index = sel.selectedIndex;

  if (sel.options[index].value != '') {

  if (targetstr == 'blank') {

   window.open(sel.options[index].value, 'win1');

  } else {

   var frameobj;

  if (targetstr == '') targetstr = 'self';

  if ((frameobj = eval(targetstr)) != null)

   frameobj.location = sel.options[index].value;

  }

  }

}

	function locationGo(category,select) {
				
		if(category == 1) {				// °øÁö»çÇ×
			if (select == 1)			location.href = domainName+"board/list.php?kind=notice&select="+select+"&tableCode=hakbuNotice";
			else	if(select == 2)		location.href = domainName+"board/list.php?kind=notice&select="+select+"&tableCode=studentNotice";
			else	if(select == 3)		location.href = domainName+"eeCalendar.php?kind=notice";
			else	if(select == 4)		location.href = domainName+"board/list.php?kind=notice&select="+select+"&tableCode=abeekNotice";
			else	if(select == 5)		location.href = domainName+"board/list.php?kind=notice&select="+select+"&tableCode=formpds";
			else	if(select == 6)		location.href = domainName+"board/list.php?kind=notice&select="+select+"&tableCode=graduatedNotice";

		} else if(category == 2) {	// ÇÐºÎ¾È³»
			if (select == 1)		location.href = domainName+"eeAbout.php?kind=about&select="+select;
			else if(select == 2)		location.href = domainName+"eeAbout.php?kind=about&select="+select;
			else if(select == 3)		location.href = domainName+"eeAbout.php?kind=about&select="+select;
			else if(select == 4)		location.href = domainName+"eeAbout.php?kind=about&select="+select;
			else if(select == 5)		location.href = domainName+"eeAbout.php?kind=about&select="+select;
			else if(select == 6)		location.href = domainName+"eeAbout.php?kind=about&select="+select;
				
		} else if(category == 3) {	//±¸¼º¿ø
			if (select == 1)		location.href = domainName+"eeMember.php?kind=member&select="+select;
			else	if(select == 2)	location.href = domainName+"eeMember.php?kind=member&select="+select;
			else if(select == 3)		location.href = domainName+"eeMember.php?kind=member&select="+select;
			else if(select == 4)		location.href = domainName+"eeMember.php?kind=member&select="+select;
			else if(select == 5)		location.href = domainName+"eeMember.php?kind=member&select="+select;

		} else if(category == 4) {	//ÇÐºÎ°úÁ¤
			if (select == 1)		location.href = domainName+"eeFaculty.php?kind=faculty&select="+select;
			else if(select == 2)		location.href = domainName+"eeFaculty.php?kind=faculty&select="+select;
			else if(select == 3)		location.href = domainName+"eeFaculty.php?kind=faculty&select="+select;

		} else if(category == 5) {	//´ëÇÐ¿ø°úÁ¤
			if (select == 1)		location.href = domainName+"eePostgraduate.php?kind=postgraduate&select="+select;
			else if(select == 2)		location.href = domainName+"eePostgraduate.php?kind=postgraduate&select="+select;
			else if(select == 3)		location.href = domainName+"eePostgraduate.php?kind=postgraduate&select="+select;
			else if(select == 4)		location.href = domainName+"eePostgraduate.php?kind=postgraduate&select="+select;
			else if(select == 5)		location.href = domainName+"eePostgraduate.php?kind=postgraduate&select="+select;
		
		} else if(category == 6) {	//ÇÐ»ý¸¶´ç
			if (select == 1)		location.href = domainName+"eeStudent.php?kind=student&select="+select;
			else if(select == 2)		location.href = domainName+"eeStudent.php?kind=student&select="+select;
			else if(select == 3)		location.href = domainName+"eeStudent.php?kind=student&select="+select;
			else if(select == 4)		location.href = domainName+"board/list.php?kind=student&select="+select+"&tableCode=photoboard";
			else if(select == 5)		location.href = domainName+"board/list.php?kind=student&select="+select+"&tableCode=intrapds";
			else if(select == 6)		location.href = domainName+"board/list.php?kind=student&select="+select+"&tableCode=openlab";
				
			
		} else if(category == 7) {	//Ä¿¹Â´ÏÆ¼
			if (select == 1)		location.href = domainName+"board/list.php?kind=community&select="+select+"&tableCode=faq";
			else if(select == 3)		location.href = domainName+"board/list.php?kind=community&select="+select+"&tableCode=freeboard";
			else if(select == 4)		location.href = domainName+"board/list.php?kind=community&select="+select+"&tableCode=facultyboard";
			else if(select == 5)		location.href = domainName+"board/list.php?kind=community&select="+select+"&tableCode=postgraduateboard";
			else if(select == 6)		location.href = domainName+"board/list.php?kind=community&select="+select+"&tableCode=alumniboard";
			else if(select == 7)		location.href = domainName+"board/list.php?kind=community&select="+select+"&tableCode=intraboard";
			else if(select == 8)		location.href = domainName+"board/lecture.php?kind=lecture&select=&tableCode=lectureBoard";
			else if(select == 9)		location.href = domainName+"board/list.php?kind=community&select="+select+"&tableCode=ecounsel";

		} else if(category == 8) {	//abeek
			if (select == 1)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;  //2007³â Á¹¾÷¿©°Ç
			else if(select == 2)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;
			else if(select == 3)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;
			else if(select == 4)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;
			else if(select == 5)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;
			else if(select == 6)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;
			else if(select == 7)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;
			else if(select == 8)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;
			else if(select == 9)		location.href = domainName+"eeAbeek.php?kind=abeek&select="+select;
			else if(select == 10)	location.href = domainName+"eeAbeek.php?kind=abeek&select="+select; //2008³â Á¹¾÷¿©°Ç
			else if(select == 11)	location.href = domainName+"eeAbeek.php?kind=abeek&select="+select; //2008³â Æ®·¢°úÁ¤
			else if(select == 12)	location.href = domainName+"eeAbeek.php?kind=abeek&select="+select; //ÀÓ½ÃÆäÀÌÁö(ÁØºñÁß)

			
		} else if(category == 9) {	//Ãë¾÷
			if (select == 1)		location.href = domainName+"board/list.php?kind=job&select="+select+"&tableCode=job"; //Ãë¾÷Á¤º¸
			else if (select == 2)	location.href = domainName+"board/list.php?kind=jobinfo&select=&tableCode=lectureBoard&lid=133"; //Ãë¾÷Á¤º¸°øÀ¯
			else if (select == 3)	window.open("http://job.ulsan.ac.kr/"); //Ãë¾÷Á¤º¸½Ç
			else if (select == 4)	location.href = domainName+"board/list.php?kind=job&select="+select+"&tableCode=job"; //Ãë¾÷Á¤º¸
		}
	}

	function goAbeek(key) {
		location.href = domainName+"eeFaculty.php?kind=faculty&select=4&key="+key;
	}
	
	function goMind(key) {
		location.href = domainName+"eeAbout.php?kind=about&select=3&key="+key;
	}


	// lecID ´Â mode°¡ 1ÀÏ¶§´Â lid °ªÀÌ°í... 2ÀÏ ¶§´Â lecID ¸¦ °¡Áø´Ù.
	function goLectureBoard(lecID, mode) {	
		if(mode == 2) {		// ÀÚ¼¼È÷ º¸±â
			location.href = domainName+"board/lecture.php?kind=lecture&select=&tableCode=lectureBoard&lecMode=viewDetail&lecID="+lecID;
		} else {
			location.href = domainName+"board/list.php?kind=lecture&select=&tableCode=lectureBoard&lid="+lecID;
		}
	}
function Show(val,elem){
	if(!val){
		document.getElementById('tooltip').style.display = "none";
	}else{
		var detail = "<table border=0 cellspacing=1 cellpadding=3 bgcolor=#F0F0F0>" + val + "</table>";
		document.getElementById('tooltip').innerHTML = detail;
		if(!elem){
			document.getElementById('tooltip').style.pixelLeft = event.clientX + document.body.scrollLeft - 40;
			document.getElementById('tooltip').style.pixelTop = event.clientY + document.body.scrollTop + 10;
		}else{
			var layerX = 0;
			var layerY = 0;
			while(elem){
				layerX += elem.offsetLeft;
				layerY += elem.offsetTop;
				elem = elem.offsetParent;
			}
			document.getElementById('tooltip').style.pixelLeft = layerX - 3;
			document.getElementById('tooltip').style.pixelTop = layerY + 22;
		}
		document.getElementById('tooltip').style.display = "block";
	}
}
function Hide(){
	document.getElementById('tooltip').style.display = "none";
}


	function checkFrame() {

		if(parent.frames.length == 0) {
//			top.location.href = domainName;

		}
	}

	function userLogin() {
		var f = document.loginForm;
				
		if(f.userid.value.length < 4) {
			alert("¾ÆÀÌµð°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù");
			f.userid.focus();
			return false;
		} else if(f.passwd.value.length < 4) {
			alert("ºñ¹Ð¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù");
			f.passwd.focus();
			return false;
		} else {
			f.action = domainName+"member/loginCheck.php";
			f.submit();
		}
	
	}	

	function abeekPrint(select) {
		window.open(domainName+"eeFacultyPrint.php?select="+select, "aa","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes, resizable=0,width=705,height=700");
	}
	
	function userLoginPopup() {
		window.open(domainName+"board/eeLoginPopup.php", "pswdWindow","WidTH=220, HEIGHT=135, TOP=150, LEFT=150");
	}

	function userLoginPopup2(flag) {
		window.open(domainName+"board/eeLoginPopup.php?boardFlag="+flag, "pswdWindow","WidTH=220, HEIGHT=135, TOP=150, LEFT=150");
	}

	function userLogout() {
		location.href = domainName+"member/logout.php";
	}

	function goRegister() {
		location.href = domainName+"member/member.php?kind=register";
	}
	
	function goModify() {
		location.replace(domainName+"member/member.php?memberMode=modifyForm&kind=register");
	}
	
	function noticeView(id, mode) {
		window.open(domainName+"noticePopup.php?id="+id+"&mode="+mode, "", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes, resizable=0,width=750,height=450');
	}
	
	function contactUs() {
		window.open(domainName+"webMail.php?sendMode=form", "", "width=387,height=330, TOP=150, LEFT=150");
	}

	function memView(id) {
		window.open(domainName+"eeMemberView.php?id="+id, "memView", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=502,height=420');
	}

	function chg(name,img) {
		name.src = img;
	}
	
	function searchIDPW(mode) {
		window.open(domainName+"searchIDPW.php?sMode="+mode, "findIDPW", "width=402, height=200, TOP=150, LEFT=150");
	}

	//ÁÖ¹Îµî·ÏÀ» Ã¼Å©ÇÏ¿© À¯È¿ÇÏ¸é true,		À¯È¿ÇÏÁö ¾ÊÀ¸¸é false
	function checkmanid(manid1, manid2) {
		//ÁÖ¹Î µî·Ï Ã¼Å© ·çÆ¾À» ¸¸µé¾î º¸¼¼¿ä
		var manid  = manid1 + manid2; 
		var index  = '234567892345';  // ÀÚ¸®¼ö index ÁöÁ¤ 
		var result = 0; 
	 
		if (isNaN(manid))	return false; 

		for (i = 0; i < 12; i++) 
			result = result + manid.charAt(i)*index.charAt(i);

		result = result % 11; 
		result = 11 - result; 

		if (result >= 10) 	result =  result - 10; 
		
		if (result == manid.charAt(12) && (manid.charAt(2) < 2  && manid.charAt(4) < 4) && (manid.charAt(6) > 0  && manid.charAt(6) < 5)) 
			return true; 
		else
			return false;
	}

	function findID() {
		var f = document.loginForm;
				
		if(f.name.value.length < 1) {
			alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿©~!!");
			f.name.focus();
			return false;
		} else if(f.manid1.value.length < 6) {
			alert('ÁÖ¹Î¹øÈ£ ¾ÕºÎºÐÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä');
			f.manid1.focus();
			return false;
		} else if (f.manid2.value.length < 7) {
			alert('ÁÖ¹Î¹øÈ£ µÞºÎºÐÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä');
			f.manid2.focus();
			return false;
		} else if (!checkmanid(f.manid1.value, f.manid2.value)) {
			alert('¿Ã¹Ù¸¥ ÁÖ¹Î¹øÈ£°¡ ¾Æ´Õ´Ï´Ù');
			f.manid1.focus();
			return false;
		} else {
			f.action = domainName+"searchIDPW.php";
			f.submit();
		}	
	}	

	function findPW() {
		var f = document.loginForm;
				
		if(f.userid.value.length < 4) {
			alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿©~!!");
			f.userid.focus();
			return false;
		} else if(f.name.value.length < 1) {
			alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿©~!!");
			f.name.focus();
			return false;
		} else if(f.manid1.value.length < 6) {
			alert('ÁÖ¹Î¹øÈ£ ¾ÕºÎºÐÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä');
			f.manid1.focus();
			return false;
		} else if (f.manid2.value.length < 7) {
			alert('ÁÖ¹Î¹øÈ£ µÞºÎºÐÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä');
			f.manid2.focus();
			return false;
		} else if (!checkmanid(f.manid1.value, f.manid2.value)) {
			alert('¿Ã¹Ù¸¥ ÁÖ¹Î¹øÈ£°¡ ¾Æ´Õ´Ï´Ù');
			f.manid1.focus();
			return false;
		} else {
			f.action = domainName+"searchIDPW.php";
			f.submit();
		}	
	}	


	function view(id){
		if (document.all){
			document.all["a"].style.visibility="hidden";
			document.all["b"].style.visibility="hidden";
			document.all["c"].style.visibility="hidden";		
			document.all["d"].style.visibility="hidden";		
			document.all["e"].style.visibility="hidden";
			document.all["f"].style.visibility="hidden";
			document.all["g"].style.visibility="hidden";
			document.all["h"].style.visibility="hidden";
			document.all["i"].style.visibility="hidden";
			document.all[id].style.visibility="visible";
		}else if(document.layers){
			document.layers["a"].visibility="hidden";
			document.layers["b"].visibility="hidden";
			document.layers["c"].visibility="hidden";
			document.layers["d"].visibility="hidden";
			document.layers["e"].visibility="hidden";
			document.layers["f"].visibility="hidden";
			document.layers["g"].visibility="hidden";
			document.layers["h"].visibility="hidden";
			document.layers["i"].visibility="hidden";
			document.layers[id].visibility="visible";
		}
	}
	
	function LayerSH(LayerName,Status) {
		
		var ns4 = (document.layers)? true:false
		var ie4 = (document.all)? true:false
		var MenuTimeout

		if (ns4) {
			LayerN = document.layers[LayerName]
			if (Status == 'show') LayerN.visibility = 'show';
			if (Status == 'hide') LayerN.visibility = 'hidden';
		}
		if (ie4) {
			LayerN = document.all[LayerName].style
			if (Status == 'show') LayerN.visibility = 'visible';
			if (Status == 'hide') LayerN.visibility = 'hidden';
		}
	}
