﻿var imgsrc; // 변수 선언안해서 자꾸 오류났었던 듯.. by bshell
$(document).ready(function() {

/* GNB Rollover Rollout */
	// Preload all rollovers
	$("#gnb li img").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.gif$/ig,"_on.gif");
		$("<img>").attr("src", rollON);
	});
	
	// Navigation rollovers
	$("#gnb li a").mouseover(function(){
		imgsrc = $(this).children("img").attr("src");
		if(imgsrc) {
		    matches = imgsrc.match(/_on/);

		    // don't do the rollover if state is already ON
		    if (!matches) {
		    imgsrcON = imgsrc.replace(/.gif$/ig,"_on.gif"); // strip off extension
		    $(this).children("img").attr("src", imgsrcON);
		    }
		}
    });
	$("#gnb li a").mouseout(function(){
	    if(imgsrc) {
    		$(this).children("img").attr("src", imgsrc); // .replace("_on", "")); // imgsrc값은 mouseover 시 세팅한 _on.gif이 들어있다. 그래서 _on을 없애준다. by bshell
		}
	});

/* Another Rollover Rollout */
	$(".overout li").hover(
		function(){
			var iconName = $(this).find("img").attr("src");
			var origen = iconName.split(".gif")[0];
			$(this).find("img").attr({src: "" + origen + "_on.gif"});
		}, 
		function(){
			var iconName = $(this).find("img").attr("src");
			var origen = iconName.split("_on.gif")[0];
			$(this).find("img").attr({src: "" + origen + ".gif"});
	});

/* Submenu Rollover Rollout */
	$("#submenu ul li img").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.gif$/ig,"_on.gif");
		$("<img>").attr("src", rollON);
	});
	
	// Navigation rollovers
	$("#submenu ul li a").mouseover(function(){
		imgsrc = $(this).children("img").attr("src");
		// 블랙박스, 진학몰 에서는 3차메뉴에 이미지가 없는 경우 무시하기..
		if (imgsrc == null || imgsrc == 'undefined') return;
		//alert(imgsrc);
		matches = imgsrc.match(/_on/);

		// don't do the rollover if state is already ON
		if (!matches) {
		    imgsrcON = imgsrc.replace(/.gif$/ig,"_on.gif"); // strip off extension
		    $(this).children("img").attr("src", imgsrcON);
		}
	});
	$("#submenu ul li a").mouseout(function(){
	    if(imgsrc) {
		    $(this).children("img").attr("src", imgsrc); // .replace("_on",""));
		}
	});
});

/*
$(document).ready(function() {
	$(".comment_showhide span").each(function() {
		$(this).addClass("hide");
	});
});
*/

// 오버추어 유니버설태그
// Overture Korea 태그 삽입
/*
var ysm_accountid  = "15KQUM0S5UARUS89GAGPESQ5DUG";
document.write("<SCR" + "IPT language='JavaScript' type='text/javascript' " 
+ "SRC=//" + "srv1.wa.marketingsolutions.yahoo.com" + "/script/ScriptServlet" + "?aid=" + ysm_accountid 
+ "></SCR" + "IPT>");
*/
/* 스크립트 다운 받는 시간이 오래 걸려서 결과물을 아예 이 곳에 넣어버림 by bshell 2009.08.13 */
/*
function ysm1(){}ysm1.prototype.ysm2=function(s){if(typeof(s)=='string'&&s!=null)return true;else return false;};ysm1.prototype.ysm3=function(o){if(typeof(o)=='object'&&o!=null)return true;else return false;};
function ysm4(bot,eot,pt,vt){this.bot=bot;this.eot=eot;this.pt=pt;this.vt=vt;this.ld=new Object();this.st=new Date();this.ysm5=new ysm1();}ysm4.prototype.ysm6=function(n,v){if(this.ysm5.ysm2(n)&&this.ysm5.ysm2(v)){var cn=this.ld;var a=n.split('.');for(var i=0;i<a.length-1;i++){if(!this.ysm5.ysm3(cn[a[i]])){cn[a[i]]=new Object();}cn=cn[a[i]];}cn[a[a.length-1]]=v;}};ysm4.prototype.ysm7=function(a){if(this.ysm5.ysm3(a)){for(var i=0;i<a.length;i++){if(this.ysm5.ysm2(a[i])){var nv=a[i].split('=');if(nv.length==2){this.ysm6(nv[0],nv[1]);}}}}};ysm4.prototype.ysm9=function(o,f,i,a){if(i > 20)return '';var e='';for(p in o){if(this.ysm5.ysm2(p)){if(this.ysm5.ysm3(o[p])){var a=new Array();a['leaf']='false';var x=(f!=''?f+'.'+p:this.bot+p);var e1=this.ysm9(o[p],x,i+1,a);e+=(a['leaf']=='true'?x :'')+e1+(a['leaf']=='true'?this.eot :'');}else if(this.ysm5.ysm2(o[p])){a['leaf']='true';e+=this.pt+p+this.vt+escape(o[p]);}}}return e;};ysm4.prototype.ysm10=function(){var a=new Array();a['leaf']='false';
return this.ysm9(this.ld,'',0,a);};
function ysm11(u){this.ysm12=u;this.ysm13=2048;this.ysm14='2';this.ysm15='2';this.ysm16=new ysm1();}ysm11.prototype.ysm17=function(m){if(this.ysm16.ysm2(this.ysm12)&&this.ysm16.ysm2(m))return this.ysm12.length+1+m.length;else return 0;};ysm11.prototype.ysm18=function(m){var w=window;var d=document;if(this.ysm16.ysm2(this.ysm12)&&this.ysm16.ysm2(m)){if(this.ysm12.length+1+m.length<this.ysm13){d.ysmBeaconPingImage=new Image();d.ysmBeaconPingImage.src=this.ysm12+'?pv='+this.ysm14+'&cv='+this.ysm15+m;return true;}}return false;};
function ysm19(d,p,e){this.ysm20=d;this.ysm21=p;this.ysm22=e;this.ysm23=new Object();this.ysm24=new ysm1();}ysm19.prototype.ysm25=function(n){var v=this.ysm26(n);if(this.ysm24.ysm2(v)&&v!=''){var l=v.split('&');for(var i=0;i<l.length;i++){var nv=l[i].split(':');if(nv.length==2){this.ysm23[nv[0]]=nv[1];}}}};ysm19.prototype.ysm27=function(n,v){if(this.ysm24.ysm2(n)&&this.ysm24.ysm2(v)){this.ysm23[n]=v;return true;}return false;};ysm19.prototype.ysm8=function(n){if(this.ysm24.ysm2(n)){if(this.ysm24.ysm2(this.ysm23[n]))return this.ysm23[n];}return '';};ysm19.prototype.ysm28=function(n){if(this.ysm24.ysm2(n)){var c=this.ysm23;var v='';for(p in c){if(this.ysm24.ysm2(p)&&this.ysm24.ysm2(c[p])){v+=p+':'+c[p]+'&';}}var l=v.length;if(l > 0){v=v.substr(0,l-1);document.cookie=n+'='+v+this.ysm20+this.ysm21+this.ysm22;}}};ysm19.prototype.ysm26=function(n){if(this.ysm24.ysm2(n)){n+='=';var c=document.cookie;var i=-1;var j=0;while((i=c.indexOf(n,j))!=-1){if(i==0){break;}
else if(i>1&&i<c.length){if(c.charAt(i-1)==' '&&c.charAt(i-2)==';')break;}j=i+1;}if(i==-1)return '';var s=i+n.length;var e=c.indexOf(';',s);if(e==-1)e=c.length;return c.substring(s,e);}return '';};
function ysm29(c){this.l=document.location;this.r=document.referrer;this.ysm30=false;this.ysm31=new ysm1();this.ysm32=this.ysm33();this.ysm34=this.ysm35(c);}ysm29.prototype.ysm33=function(){var l=this.l;var r=this.r;if(r&&l&&l.host){var ll=l.toString();ll=ll.toLowerCase();var lr=r.toLowerCase();var lh=':'+'/'+'/'+l.host.toLowerCase();var i=lr.indexOf(lh);if(i >0&&i<10){this.ysm30=(ll.indexOf('https:')==0&&lr.indexOf('http:')==0);return false;}}return true;};ysm29.prototype.ysm35=function(c){if(this.ysm31.ysm2(c)){var q=this.l.search;var a=c.split(',');if(this.ysm31.ysm2(q)){for(var i=0;i<a.length;i++){if(q.indexOf(a[i])!=-1){return true;}}}}return false;};ysm29.prototype.ysm36=function(){var l=this.l;var r=this.r;var p='';var u='';if(r){var rf=r.toString();var i=rf.indexOf(':');
if(i > 0)p=rf.substr(0,i)+':';}if(l){if(p)u=p;else if(l.protocol)u=l.protocol;if(l.host)u+='/'+'/'+l.host+'/';}return u;};ysm29.prototype.ysm37=function(){var r=this.r;var u='';if(r){u=r.substr(0,300);}return u;};ysm29.prototype.ysm38=function(){var l=this.l;var u='';if(l){u=l.toString().substr(0,300);}return u;};
function ysm39(o){this.co=o;this.ysm15='1';this.ysm40=new ysm1();}ysm39.prototype.ysm41=function(){return this.ysm40.ysm3(this.co);};ysm39.prototype.ysm42=function(o,f,i){if(i > 20)return '';var e='';for(p in o){if(this.ysm40.ysm2(p)){var x=(i==1?f+'.'+p:p);if(this.ysm40.ysm3(o[p])){e+=this.ysm42(o[p],x,i+1);}else if(this.ysm40.ysm2(o[p])){var a=o[p].split(',');for(var j=0;j<a.length;j++){e+='CUSTOM.'+x+'.'+a[j]+':';}}}}return e;};ysm39.prototype.ysm43=function(){if(this.ysm41()){var s=this.ysm42(this.co,'',0);s=s.substr(0,s.length-1);return s.split(':');}return new Array();};
function ysm44(){this.ysm45=new Date();this.ysm46='ysmlc.js';this.ysm47='1.11';this.ysm48='data.wa.marketingsolutions.yahoo.com';this.ysm49='/image/ysmlc.gif';this.ysm50='ysmwa=,ysmtac=,ovtac=';this.ysm51='';this.ysm52='; path=/';this.ysm53='/'+'/'+this.ysm48+this.ysm49;this.ysm54='';if(typeof(ysm_accountid)!='undefined')this.ysm54=ysm_accountid;else if(typeof(pm_accountid)!='undefined')this.ysm54=pm_accountid;}ysm44.prototype.ysm55=function(){this.ysm56=new ysm4('&b=','&e=','&','=');this.ysm57=new ysm11(this.ysm53);this.ysm58=new ysm19('','; path=/','');this.ysm59=new ysm29(this.ysm50);};ysm44.prototype.ysm60=function(){this.ysm61();};ysm44.prototype.ysm61=function(){var w=window;var d=document;var sw=0;var sh=0;var sd=0;if((typeof(w.screen)!="undefined")&&(w.screen!=null)){sw=w.screen.width;sh=w.screen.height;sd=w.screen.colorDepth;}var tz=(this.ysm45.getTimezoneOffset()*-1);this.ysm56.ysm6('SYSTEM.tz',tz.toString());this.ysm56.ysm6('SYSTEM.sw',sw.toString());
this.ysm56.ysm6('SYSTEM.sh',sh.toString());this.ysm56.ysm6('SYSTEM.sd',sd.toString());this.ysm56.ysm6('FRAME.sn',this.ysm46);this.ysm56.ysm6('FRAME.sv',this.ysm47);this.ysm56.ysm6('FRAME.st',this.ysm45.getTime().toString());this.ysm56.ysm6('FRAME.ad',this.ysm54);if(d.location)this.ysm56.ysm6('PAGE.lc',d.location.toString());if(d.referrer)this.ysm56.ysm6('PAGE.rf',d.referrer.toString());this.ysm56.ysm6('PAGE.mf','0');};ysm44.prototype.ysm62=function(){var p=this.ysm56.ysm10();var pl=this.ysm57.ysm17(p);if(pl > 2048){var mf=0;if(this.ysm59.ysm32){var rf=this.ysm59.ysm37();this.ysm56.ysm6('PAGE.rf',rf);mf+=1;}else {var rf=this.ysm59.ysm36();this.ysm56.ysm6('PAGE.rf',rf);mf+=2;}if(mf > 0){this.ysm56.ysm6('PAGE.mf',mf);p=this.ysm56.ysm10();pl=this.ysm57.ysm17(p);}if(pl > 2048){var lc=this.ysm59.ysm38();this.ysm56.ysm6('PAGE.lc',lc);mf+=4;}if(mf>=4){this.ysm56.ysm6('PAGE.mf',mf);p=this.ysm56.ysm10();}}this.ysm57.ysm18(p);};
function ysm63(){this.ysm64=0;this.ysm65=1;this.ysm66=2;
this.ysm67=this.ysm64;this.ysm68='ysm_LD'+this.ysm54;}ysm63.prototype=new ysm44();ysm63.prototype.constructor=ysm63;ysm63.prototype.ysm69=function(t){this.ysm67=t;this.ysm55();};ysm63.prototype.ysm70=function(){this.ysm71=this.ysm72();if(this.ysm73()){return true;}else return false;};ysm63.prototype.ysm72=function(){var v=this.ysm58.ysm8(this.ysm68);var f=0;if(v!=''){f=parseInt(v);}else {if(this.ysm73()){f=1;this.ysm58.ysm27(this.ysm68,'1');}else {f=0;this.ysm58.ysm27(this.ysm68,'0');}}return f;};ysm63.prototype.ysm73=function(){return(this.ysm67==this.ysm65&&this.ysm59.ysm32||this.ysm67==this.ysm66&&this.ysm59.ysm34);};
function ysm74(t,b){this.ysm75=b;this.ysm76='ysm_CK'+this.ysm54;this.ysm77='ysm_PV'+this.ysm54;this.ysm78='ysm_SN'+this.ysm54;this.ysm79(t);}ysm74.prototype=new ysm63();ysm74.prototype.constructor=ysm74;ysm74.prototype.ysm79=function(t){this.ysm69(t);this.ysm80=new ysm39(window.ysm_customData);if(this.ysm80.ysm41()==false)this.ysm80=new ysm39(window.pm_customData);};
ysm74.prototype.ysm81=function(){this.ysm58.ysm25(this.ysm76);this.ysm82=this.ysm83();this.ysm84=this.ysm85();this.ysm86=(this.ysm82==this.ysm75);this.ysm87=this.ysm70();this.ysm58.ysm28(this.ysm76);this.ysm88=0;if(this.ysm58.ysm26(this.ysm76)!='')this.ysm88=1;if(this.ysm87||(this.ysm71&&this.ysm86)||this.ysm59.ysm30||this.ysm80.ysm41()){this.ysm60();this.ysm56.ysm6('SYSTEM.si',this.ysm84);this.ysm56.ysm6('SYSTEM.sf',this.ysm88.toString());if(this.ysm86)this.ysm56.ysm6('PAGE.bf','1');else this.ysm56.ysm6('PAGE.bf','0');var nl=this.ysm80.ysm43();this.ysm56.ysm7(nl);this.ysm62();}};ysm74.prototype.ysm83=function(){var pv=this.ysm58.ysm8(this.ysm77);if(pv=='')pv=0;pv=parseInt(pv)+1;if(pv<=this.ysm75)this.ysm58.ysm27(this.ysm77,pv.toString());return pv;};ysm74.prototype.ysm85=function(){var sn=this.ysm58.ysm8(this.ysm78);if(sn==''){sn=this.ysm45.getTime().toString();this.ysm58.ysm27(this.ysm78,sn);}return sn;};if(typeof(pm_hasScriptRun)=="undefined"){var pm_hasScriptRun=true;
var ysm89=new ysm74(2,2);ysm89.ysm81();}
*/

/*ActiveX 플래쉬*/
// id: flash id
// url: source url
// w: source width
// h: source height
// t: wmode (none/transparent/opaque)
// vars : 전달변수
function Flash(id,url,w,h,bg,t,vars){
document.write("\
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0' width="+w+" height="+h+" id="+id+">\
<param name='movie' value="+url+" />\
<param name='wmode' value="+t+" />\
<param name='bgcolor' value="+bg+" />\
<param name='flashvars' value='"+vars+"' />\
<param name='allowScriptAccess' value='always' />\
<param name='quality' value='high' />\
<param name='menu' value='false' />\
<embed src="+url+" flashvars="+vars+" width="+w+" height="+h+" name="+id+" bgcolor="+bg+" wmode="+t+" allowScriptAccess='always' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
</object>\
");
}

function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no,status=1') } //Popup(스크롤바없음)
function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(스크롤바있음)
function popresize(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=0,status=1,resizable=1') } //Popup(팝업 리사이징)

/* 좌측 메뉴 */
function memberInfo(n) {
	if(n==1) {
		document.getElementById('some').style.display='none';
		document.getElementById('more').style.display='block';
	} else {
		document.getElementById('more').style.display='none';
		document.getElementById('some').style.display='block';
	}
}

// onloadEvent
function addLoadEvent(func) {
	var oldonload = window.onload;
	if(typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

// 인기검색어 스크롤링 start
addLoadEvent(rolling);
var scrolling;
var timeout;
var ranklist;

function rolling(){
	ranklist = document.getElementById("ranklist");
	if(ranklist) {
		timeout = window.setTimeout("doScrolling(ranklist)",2000);

		ranklist.onmouseover = function(){
			clearTimeout(timeout);
		}

		ranklist.onmouseout = function(){
			timeout = window.setTimeout("doScrolling(ranklist)",1000);
		}
	}
}

function doScrolling(obj) {
	scrollheight = -(obj.scrollHeight);
	ypos = obj.style.top;
	if(!ypos) ypos = 0; 
	else ypos = parseInt(ypos);

	if(ypos > scrollheight + 5) {
		ypos = ypos-5;
		obj.style.top = ypos + "px";
		if(ypos % 20 == 0 ){			
			window.clearInterval(scrolling);
			timeout = window.setTimeout("doScrolling(ranklist)",2500);
		}else{
			timeout = window.setTimeout("doScrolling(ranklist)",50);
		}
	} else {
		window.clearInterval(scrolling);
		obj.style.top = "0";
		timeout = window.setTimeout("doScrolling(ranklist)",2500);
	}
}
// 인기검색어 스크롤링 end

// 검색레이어 영역 blur check start
var overcheck = 0;
var clickcheck = 0;
function selectView(obj,linker) {
	var obj = document.getElementById(obj);
	if(obj) {
		if(obj.style.display=='none' || obj.style.display=='') {
			obj.style.display='block';
		} else {
			obj.style.display='none';
		}
	}
	obj.onblur = function() {
		obj.style.display='none';
		overcheck = 0;
		clickcheck = 0;
	}
	obj.onmouseover = function() {
		overcheck = 1;
		obj.onfocusin = function() {
			clickcheck = 1;
		}
	}

	linker.onblur = function() {
		if(overcheck != 0) {
			if(clickcheck == 0) obj.style.display='none';
			else { obj.style.display='block'; }
		}
	}
}

var sovercheck = 0;
var sclickcheck = 0;
function totalSearch(obj,linker) {
	var obj = document.getElementById(obj);
	if(obj) {
		if(obj.style.display=='none' || obj.style.display=='') {
			obj.style.display='block';
			sovercheck = 1;
			sclickcheck = 0;			
		} else {
			obj.style.display='none';
			sovercheck = 0;
			sclickcheck = 0;
		}
	}
	obj.onblur = function() {
		obj.style.display='none';
		sovercheck = 0;
		sclickcheck = 0;
	}
	obj.onmouseover = function() {
		sovercheck = 1;
		obj.onfocusin = function() {
			sclickcheck = 1;
		}
	}
	obj.onmouseout = function() {
		sovercheck = 1;
		sclickcheck = 0;
	}

	linker.onblur = function() {
		if(sovercheck != 0) {
			if(sclickcheck == 0) obj.style.display='none';
			else { obj.style.display='block'; }
		}
	}
}
// 검색레이어 영역 blur check end

//##### XML링크
	var xmlDoc , lineMapStr = "", currentPath="", index = 0;
	var moz = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined'); 
	var ie = (typeof window.ActiveXObject != 'undefined');
	
	// Default.js 안에서 사용할 현재도메인 다음의 폴더 ... 원접,멤버에서만 사용
	// || location.href.toLowerCase().indexOf('.jinhak.com/memberv3') > -1 멤버에서는 가능..
	if (location.href.toLowerCase().indexOf('.jinhak.com/applyv8') > -1)
	{	//importXML(DomainPolder + "/JinhakCommon/inc/js/menu.xml");
	}
	else if (location.href.toLowerCase().indexOf('.jinhak.com/memberv3') > -1) {
		importXML(DomainPolder + "/JinhakCommon/inc/js/menu.xml");
	}
	else importXML("/JinhakCommon/inc/js/menu.xml");
	
	function importXML(file) { 
		if (moz) { 
			xmlDoc = document.implementation.createDocument("", "", null);
			xmlDoc.async = false;
		} else if (ie) { 
			xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); 
			xmlDoc.async = false;
		}
		xmlDoc.load(file);
	}

	function getLineMapNode(id){
		var menuXpath , node;
		menuXpath = "//menu[@id='" + id + "']";				
		if (moz) { 					
			node = xmlDoc.evaluate(menuXpath, xmlDoc, null, 9,null).singleNodeValue;
		} else if (ie) { 			
			node = xmlDoc.selectSingleNode(menuXpath);	
		}		
		return node;
	}

	function setString(node){
		var spStr = "" , last="";
		var name = node.getAttribute("name");
		var url  = node.getAttribute("url").cnvurl();
		var nodeId  = node.getAttribute("id");
		if(node != xmlDoc.documentElement) 	setString(node.parentNode);
		if(currentPath != nodeId) {
			if(nodeId != 0) lineMapStr += "<span>"+ name+"</span> ";
		}
		else {
			lineMapStr += "<span class='pwd'>"+name+"</span>";
		}
	}

function path(id){
	try{
		var node = getLineMapNode(id);
		lineMapStr = "";
		index = 0;
		currentPath=id;
		setString(node);
		document.write(lineMapStr);
	}catch(e){
		if(node == null){
			document.write("아이디가 존재 하지 않습니다 : " + id);
		}else{
			document.write("예외처리 발생 : " +  e);
		}
	}
}

function Mname(id){
	var node = getLineMapNode(id);
	var name  = node.getAttribute("name");
	document.write(name);
}

/* Modified By Sangini */
function link(){
	var id = "";
	var depth = arguments.length;
	try {
		if(depth==0) return;
		else if(depth==1) id = eval("'"+arguments[0]+"'");
		else if(depth==2) id = eval("'"+arguments[0]+"_"+arguments[1]+"'");
		else if(depth==3) id = eval("'"+arguments[0]+"_"+arguments[1]+"_"+arguments[2]+"'");
		else if(depth==4) id = eval("'"+arguments[0]+"_"+arguments[1]+"_"+arguments[2]+"_"+arguments[3]+"'");

		if(id=="") { alert("서비스 준비중입니다."); }
		//else if(id=="3_4") { alert("전문대 온라인배치표는 결과를 재분석하여 12월 28일부터 제공될 예정입니다."); }
		else {
			var node = getLineMapNode(id); //alert(node);
			var url  = node.getAttribute("url").cnvurl(); //alert(url);
			
			
			// (고입제외) 미니홈피 왼쪽메뉴에 대학코드 추가
			if (url.indexOf("/Middle/MiniHome/") == -1 && url.indexOf("/MiniHome/") > -1) {
				// 미니홈 왼쪽메뉴 경쟁률 클릭시
				if (id=="2_3_1_3" || id=="2_3_3_3") url += "?UnivCode=" + document.all.LeftMiniHome_UnivCode.value+"&Group="+document.all.LeftMiniGroup.value+"&EnterYear=2010&TabIndex=00";
				else{
					if (url.indexOf("?") > -1) url += "&UnivCode=" + document.all.LeftMiniHome_UnivCode.value+"&Group="+document.all.LeftMiniGroup.value;
					else url += "?UnivCode=" + document.all.LeftMiniHome_UnivCode.value+"&Group="+document.all.LeftMiniGroup.value;
				}
			}
			else if (url.indexOf("Middle/MiniHome/MiniHomeSearch") == -1 && url.indexOf("/Middle/MiniHome/") > -1) {
			  
			    if (url.indexOf("?") > -1) url += "&HighCode=" + document.all.LeftHighMiniHome_UnivCode.value+"&HighList="+document.all.LeftHighMiniHome_UnivCode.value;
					else url += "?HighCode=" + document.all.LeftHighMiniHome_UnivCode.value+"&HighList="+document.all.LeftHighMiniHome_UnivCode.value;
			}

			// 2. 상단 GNB 메뉴에서 합격예측을 누르면 “준비중입니다.” 경고창이 보여지는데, “8월 26일 서비스 오픈예정입니다.”로 문구변경해주시고,
			// 경고창의 확인 버튼 누르면 풀 서비스쪽(http://hijinhak.jinhak.com/event/mo_200908_4.aspx)으로 이동하도록 해주세요.
			
			/*
			if (id=='3_2' || id=='3_3' || id=='3_4' || id=='3_5' || id=='3_6') {
				alert('서비스 준비중입니다.');
				//location.href = 'http://hijinhak.jinhak.com/event/mo_200908_4.aspx';
				return;
			}
			*/
			
			
			location.href = url;
		}
	}catch(e) { alert('준비중 입니다.'); }
}
//#####


/** 이인재
* manu.xml 의 리얼경로를 로컬경로보 변환하여 주는 함수
* 사용법 : node.getAttribute("url").cnvurl();
*/
String.prototype.cnvurl = function() 
{
	var s = this;
	if (s != null)
	{
		//var loc_url = location.href.toLowerCase();
		//var hostName = '';
		if (wwwRoot.indexOf('.jinhak.com:') > -1 || wwwRoot.indexOf('localhost:') > -1)
		{
			if (s.toLowerCase().indexOf('www.jinhak.com') > -1)
				s = s.replace('http://www.jinhak.com',wwwRoot);
			else if (s.toLowerCase().indexOf('info.jinhak.com') > -1)
				s = s.replace('http://info.jinhak.com',infoRoot);
			else if (s.toLowerCase().indexOf('hijinhak.jinhak.com') > -1)
				s = s.replace('http://hijinhak.jinhak.com',hijinhakRoot);
			else if (s.toLowerCase().indexOf('blackbox.jinhak.com') > -1)
				s = s.replace('http://blackbox.jinhak.com',blackboxRoot);
			else if (s.toLowerCase().indexOf('mall.jinhak.com') > -1)
				s = s.replace('http://mall.jinhak.com',mallRoot);
		}
		return s;
	}
	else
		return "";
}


/** 이인재
* string String::trim(void)
* 해당스트링의 앞뒤공백을 제거하여 리턴합니다.
* 사용법 : if (Form1.txtStuEmail.value.trim() == '') {...} // 이메일공백을 체크하는 경우.
*/
String.prototype.trim = function() 
{
	var s = this;
	if (s != null)
	{
		var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
		return (m == null) ? "" : m[1];
	}
	else
		return "";
}

// 2007.05.24 이인재
// 라디오버튼에 String Value 를 이용해서 라디오 버튼을 선택한다.
//		라디오버튼 Name (ID 아님) // 선택시킬 Value 스트링.
//		setRadioValue(document.forms[0].rdo_added_yn, document.forms[0].firstName.value );
function setRadioValue(rdoButton, strValue) 
{
    //alert(strValue);
    strValue = trim(strValue);
    for (var i = 0 ; i <= rdoButton.length - 1 ; i++) 
    {      
        if (rdoButton[i].value == strValue ) 
        {         
                rdoButton[i].checked = true; 
        }   
    }
}

// 2007.05.24 이인재
// 라디오버튼에 선택된  Value 를 불러온다.
//		라디오버튼 Name (ID 아님) 
//		document.forms[0].lastName.value = getRadioValue(document.forms[0].rdo_added_yn)
function getRadioValue(rdoButton) 
{   
    var strValue = "";
    for (var i = 0 ; i <= rdoButton.length - 1 ; i++) 
    {    
        if (rdoButton[i].checked == true) 
        {         
	        strValue = rdoButton[i].value   
        }  
    }
    return strValue;
}

//쿠키 생성 함수 
function setCookie( name, value, expiredays ){ 

	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" ;
}

//쿠키 생성 함수 
function setCookie( name, value, expiredays, domainNmae ){ 

	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";domain=" + domainNmae ;
}

//팝업 쿠키관리
function notice_getCookie( name ) 
{
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) 
		{
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length;
				return unescape( document.cookie.substring( y, endOfCookie ) );
			}
			x = document.cookie.indexOf( " ", x ) + 1;
			if ( x == 0 )
				break;
		}
		return "";
}

// 아이프레임 안에서 사용되는 리사이즈
function IframeResizeSelf(ifrmID)
{
	var iframe = parent.document.getElementById(ifrmID);
	var this_h = document.documentElement.scrollHeight;
	if(iframe) iframe.height = this_h + "px";
}
