	document.domain = "joins.com"
	
	function getCookie(varname) {
		varname += "=";
		startpos = document.cookie.indexOf(varname);

		if (startpos >= 0) {
			startpos += varname.length;
			endpos = document.cookie.indexOf(";", startpos);
			if (endpos == -1) endpos = document.cookie.length;
			return unescape(document.cookie.substring(startpos, endpos));
		}
	}

	function getCookie2(uName,uName2)		//ÄíÅ°¿­ Áß¿¡ uName2ÀÇ °ªÀ» ±¸ÇÑ´Ù 
	{
		var string = getCookie(uName);
		
		var flag = string.indexOf(uName2+'=');
		if (flag != -1) 
		{ 
			flag += uName2.length + 1
			end = string.indexOf('&', flag) 

			if (end == -1) end = string.length
			return unescape(string.substring(flag, end))
		}
		else
		{
			return ""
		}
	}	
	
	function login_send() {
        if (document.frm_login.txtId.value == "")  {
               alert("È¸¿ø ID¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
               document.frm_login.txtId.focus();
               return;
        }
        if (document.frm_login.txtPasswd.value == "")  {
               alert("È¸¿ø ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
               document.frm_login.txtPasswd.focus();
               return;
        }
		document.frm_login.referer.value=window.location;
		document.frm_login.submit();
	}
	
	function goalist(code) {
		//var maincode = codeform.maincode.value;
		location.href="http://isplussvc.joins.com/asp/articlelist3.asp?contcode="+ code;
	}

	function getarticletime() {
		var todayDate = new Date();
		var atime = document.codes.atime.value;
		year = atime.substr(0,4);
		month = atime.substr(4,2);
		day = atime.substr(6,2);
		hour = atime.substr(8,2);
		min = atime.substr(10,2);

		var date = new Date(year, month - 1, day, hour, min);
		var intervalmin = Math.floor((todayDate - date) / (1000 * 60) + 1);
		if ((intervalmin > 60) && (intervalmin < 720))	{
			var tmp = (intervalmin / 60);
			var atimeh = parseInt( tmp, 10);
			var atimem = parseInt((tmp - atimeh) * 60, 10);
			intervalmin = atimeh + "½Ã°£ " + atimem + "ºÐÀü ¾÷µ¥ÀÌÆ®";
		}else if(intervalmin > 720){
			intervalmin = "["+year+"-"+month+"-"+day+" "+hour+":"+min+" ÀÔ·Â]";
		}else{
			intervalmin = intervalmin + "ºÐÀü ¾÷µ¥ÀÌÆ®";
		}
		document.write(intervalmin);
	}

	function gophotolist() {
		var maincode = document.codes.maincode.value;
		if (maincode=="01000000") {
			location.href="http://isplussvc.joins.com/photo/photo_list2.asp?maincode=sports";
		}else if (maincode=="02000000") {
			location.href="http://isplussvc.joins.com/photo/photo_list2.asp?maincode=enter";
		}else if (maincode=="03000000") {
			location.href="http://isplussvc.joins.com/photo/photolist.asp?idx=85";
		}else{
			location.href="http://isplussvc.joins.com/photo/photo_list2.asp";
		}
	}



	

	function cmtlist_toggle() {
		
		if (a_cmt_list.style.display=="none") {							//³ªµµÇÑ¸¶µð ¸®½ºÆ® ¿¬´Ù
			
			tbopen.style.display = "none";
			tbclose.style.display = "block";
			a_cmt_list.style.display = "block";
			cmtconlist.style.display = "block";

		}else if (a_cmt_list.style.display=="block") {					//³ªµµÇÑ¸¶µð ¸®½ºÆ® ´Ý´Â´Ù
			tbopen.style.display = "block";
			tbclose.style.display = "none";
			a_cmt_list.style.display = "none";
			cmtconlist.style.display = "none";
		}
	}
	
	function onelineview(row,total) {				
		//for (var j=1; j <= 5; j++) {
		for (var j=1; j <= total; j++) {
			if (eval(row)==eval(j)) {
				if (document.getElementById('onelinecmt'+row).style.display=="none") {							//ÇÑÁÙ ÀÔ·ÂÃ¢ ¿¬´Ù
					document.getElementById('onelinecmt'+row).style.display="block";
				} else {																											//³ªµµÇÑ¸¶µð ¸®½ºÆ® ´Ý´Â´Ù
					document.getElementById('onelinecmt'+row).style.display="none";
				}
			}else{
				//document.getElementById('onelinecmt'+row).style.display="none";
			}
		}
	}
	
	function gocmtlist(aid,contcode,ctype) {
		document.location.href="http://isplussvc.joins.com/comment/list.asp?aid="+aid+"&contcode="+contcode+"&ctype="+ctype;	
	}
	
	function gomycmtlist() {
		var codeform = parent.document.forms.codes;
		document.location.href="http://isplussvc.joins.com/comment/mylist.asp?aid="+codeform.aid.value+"&contcode="+codeform.contcode.value+"&ctype="+codeform.atype.value;	
	}
	
	function onelineinput(row) {		
		
		if (getCookie('Joins_ValidLogin') == 'True') {
			var content = document.forms('onelinecmt'+row).mm.value;
			content = content.toLowerCase();
			var cnt_chk= document.forms('onelinecmt'+row).mm.value;
			var chk_cnt = cnt_chk.length;
			var userName = getCookie2('MemArray','MemName');
			var userId = getCookie2('MemArray','MemID');
			var userMail = getCookie2('MemArray','Joins_mememail');
			var chk_script; 
			chk_script = content.indexOf ("<s");
			if (getCookie('Joins_ValidLogin') == 'True') {
			}else{
				alert ("·Î±×ÀÎÈÄ »ç¿ë°¡´ÉÇÕ´Ï´Ù.");
				return;
			}
			if (content == "" ) {
				alert ("³»¿ëÀÌ ¾ø½À´Ï´Ù. ³»¿ëÀ» ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
				document.forms('onelinecmt'+row).mm.focus();
				return;
			}else{
					if(chk_cnt>250){
						alert("250ÀÚ°¡ ³Ñ¾ú½À´Ï´Ù. Á¤¸®ÇØ ÁÖ¼¼¿ä");
						return;
					}else{
						if (chk_script == -1){
							var codeform = parent.document.forms.codes;
							document.frmreply.parentid.value = document.forms('onelinecmt'+row).parentid.value;
							document.frmreply.aid.value = codeform.aid.value;
							document.frmreply.maincode.value = codeform.maincode.value;
							document.frmreply.servcode.value = codeform.servcode.value;
							document.frmreply.sectcode.value = codeform.sectcode.value;
							document.frmreply.contcode.value = codeform.contcode.value;						
							document.frmreply.mm.value = content;
							document.frmreply.mem_id.value = userId;
							document.frmreply.name.value = userName;
							document.frmreply.email.value = userMail;

							if (codeform.c_type) {																						//form¿¡ c_typeÀÌ ÀÖÀ»¶§..¸¸È­ ³ªµµÇÑ¸¶µðÀÏ°æ¿ì ´Ù¸¥ °ªÀ» Áà¾ßÇØ¼­...
								document.frmreply.c_type.value = codeform.c_type.value;
							}

							document.frmreply.target="hiddenfrmcmt";
							document.frmreply.submit();
						}else{
							alert("½ºÅ©¸³Æ® ÄÚµå´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
							return;
						}							
					}
			}
			
		} else {
			alert ("·Î±×ÀÎÈÄ »ç¿ë°¡´ÉÇÕ´Ï´Ù.");
			return;		
		}
		
	}

	function onClick(){
		
		if (getCookie('Joins_ValidLogin') == 'True') {
		
		}else{
			alert ("·Î±×ÀÎÈÄ »ç¿ë°¡´ÉÇÕ´Ï´Ù.");
			return;
		}
		var content = document.comment.mm.value;
		content = content.toLowerCase();
		var cnt_chk= document.comment.mm.value;
		var chk_cnt = cnt_chk.length;
		var chk_script; 
		chk_script = content.indexOf ("<s");
		if (content == "" ) {
			alert ("³»¿ëÀÌ ¾ø½À´Ï´Ù. ³»¿ëÀ» ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
			document.comment.mm.focus();
			return;
		}else{

				if(chk_cnt>250){
					alert("250ÀÚ°¡ ³Ñ¾ú½À´Ï´Ù. Á¤¸®ÇØ ÁÖ¼¼¿ä");
					return;
				}else{
					if (chk_script == -1){
						var codeform = document.forms.codes;
						document.comment.aid.value = codeform.aid.value;
						document.comment.maincode.value = codeform.maincode.value;
						document.comment.servcode.value = codeform.servcode.value;
						document.comment.sectcode.value = codeform.sectcode.value;
						document.comment.contcode.value = codeform.contcode.value;						

						if (codeform.c_type) {																						//form¿¡ c_typeÀÌ ÀÖÀ»¶§..¸¸È­ ³ªµµÇÑ¸¶µðÀÏ°æ¿ì ´Ù¸¥ °ªÀ» Áà¾ßÇØ¼­...
							document.comment.c_type.value = codeform.c_type.value;
						}

						//document.comment.target="hiddenfrmcmt";
						document.comment.target="hiddenfrm2";
						document.comment.submit();
					}else{
						alert("½ºÅ©¸³Æ® ÄÚµå´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
						return;
					}							
				}
		}	
	}
	
	function recommend(idx) {
		hiddenfrmcmt.location.href="http://isplussvc.joins.com/comment/recommend.asp?idx="+idx;
	}
	function cmtdel(idx) {
		hiddenfrmcmt.location.href="http://isplussvc.joins.com/comment/delete.asp?idx="+idx;
		//location.href="http://isplussvc.joins.com/comment/delete.asp?idx="+idx;
	}
	function cmtdel2(idx) {
		hiddenfrmcmt.location.href="http://isplussvc.joins.com/comment/delete.asp?mode=top&idx="+idx;
		//location.href="http://isplussvc.joins.com/comment/delete.asp?idx="+idx;
	}
	
	
	function displaycmtdel(cmtid, cmtmemid) {

		if (getCookie("Joins_LoginStatus") == "True" && getCookie("Joins_ValidLogin") == "True" ) {
			var userId = getCookie2('MemArray','MemID');

			if (cmtmemid == userId) {
				document.write("<a href=\"javascript:cmtdel('"+ cmtid +"')\"><img src=\"http://enportsimg.joins.com/common/btn_comment_del.gif\" style=\"position:absolute\"></a>");	
			}
		}
	}
	function displayrecommend(cmtid, cmtmemid) {

		if (getCookie("Joins_LoginStatus") == "True" && getCookie("Joins_ValidLogin") == "True" ) {
			var userId = getCookie2('MemArray','MemID');

			if (cmtmemid == userId) {
				document.write("<a href=\"javascript:alert('ÀÚ½ÅÀÇ ±ÛÀº ÃßÃµÇÒ ¼ö ¾ø½À´Ï´Ù.');\">");	
			}else{
				document.write("<a href=\"javascript:recommend('" +cmtid+ "');\">");
			}
		}
	}	

	function sendemail(aid,esectcode,title){
		var sWinName = "emailarticle";
		var cScroll = 0;
		var cResize = 0;
		var cTool = 0;
		var sWinopts = 'left='+0+', top='+0+', width='+400+',height='+560+', scrollbars='+cScroll+', resizable='+cResize;
		//var aid = document.codes.aid.value;
		//var title = document.codes.title.value;
		//var sectcode =document.codes.sectcode.value;
		window.open('http://ispgm.joins.com/asp/email_article.asp?aid='+aid+'&esectcode='+esectcode+'&title='+title ,sWinName,sWinopts);
	}
	
	
	function sendwrong(aid,esectcode,title){
		var sWinName = "wrongarticle";
		var cScroll = 0;
		var cResize = 0;
		var cTool = 0;
		var sWinopts = 'left='+0+', top='+0+', width='+400+',height='+585+', scrollbars='+cScroll+', resizable='+cResize;
		//var aid = document.codes.aid.value;
		//var title = document.codes.title.value;
		//var sectcode =document.codes.sectcode.value;
		window.open('http://ispgm.joins.com/asp/wrong_article.asp?aid='+aid+'&esectcode='+esectcode+'&title='+title ,sWinName,sWinopts);
	}
	
	function sendprint(aid,esectcode,title){
		var sWinName = "printarticle";
		var cScroll = 1;
		var cResize = 1;
		var cTool = 1;
		var sWinopts = 'left='+0+', top='+0+', width='+666+', scrollbars='+cScroll+', resizable='+cResize;
		//var aid = document.codes.aid.value;
		//var title = document.codes.title.value;
		//var sectcode =document.codes.sectcode.value;
		window.open('http://ispgm.joins.com/asp/print_article.asp?aid='+aid+'&esectcode='+esectcode+'&title='+title,sWinName,sWinopts);	
	}

	function savemyjoins(aid,esectcode,title){	

		//var aid = document.codes.aid.value;
		//var title = document.codes.title.value;
		//var sectcode =document.codes.sectcode.value;

		//document.joins_search_form.method = "post"
		document.location.href = 'http://myjoins.joins.com/newsclipping/login_check.asp?gubun=ilgan&aid='+aid+'&esectcode='+esectcode+'&title='+title;
		//document.joins_search_form.submit();
	}	

	function sendmobile(aid){
        
       //var aid = document.codes.aid.value;
	    
       if (getCookie("Joins_LoginStatus") == "True" && getCookie("Joins_ValidLogin") == "True" ) {			
	   	    var sWinName = "mobilearticle";
			var cScroll = 0;
			var cResize = 0;
			var cTool = 0;
	        var sWinopts = 'left='+0+', top='+0+', width='+380+',height='+585+', scrollbars='+cScroll+', resizable='+cResize;
	        window.open('http://ispgm.joins.com/asp/mobile_article.asp?aid='+aid ,sWinName,sWinopts);	   	 
	        
       }else{
	        document.frmBasic.method = "post"
			document.frmBasic.action = "http://pgm.joins.com/asp/login_check.asp?aid="+aid;
			document.frmBasic.submit();

	   } 
	}	

	//·£´ý ¼ýÀÚ »ý¼ºÇÏ±â
	function get_random_num(max_num) {
		var rnd_no = Math.round(Math.random()*(max_num-1))+1;				//½ÇÁ¦ id°¡ 1ºÎÅÍ ½ÃÀÛÇÏ¹Ç·Î 1À» ´õÇß´Ù.(2°³¸é 1,2)
		return rnd_no;
	}
	
	function articlelayout(atype) {
		
		if (atype=="ab") {
			var rndnum = get_random_num(2);
			if (rndnum=="1") {
				document.all.midarticlephoto.style.display = "block";
				document.all.midad2.style.display = "block";
			}else if (rndnum=="2") {
				document.all.componentbody2.innerHTML = document.all.componentbody1.innerHTML;	
				document.all.componentbody1.style.display = "none";
				document.all.photoarea.style.display = "block";		
				document.all.galleryarea.style.display = "none";
				document.all.rightad.style.display = "none";
				document.all.sponser.style.display = "none";
				document.all.community.style.display = "none";
				document.all.midad.style.display = "block";
				document.all.toplongad.style.display = "block";
			}
		} else if (atype="c") {
				document.all.componentbody1.style.display = "none";
				document.all.toplongad.style.display = "block";
				document.all.photoarea.style.display = "block";
				document.all.sponser.style.display = "block";
				document.all.community.style.display = "none";
				document.all.business.style.display = "none";
				document.all.joinszone.style.display = "none";				
		}
	}
		
	


	function articleprint() {
		var aid = document.codes.aid.value ;
		window.open('http://isplussvc.joins.com/asp/articleprint.asp?aid='+aid, "articleprint", "left=0, top=0, width=602, height=680, scrollbars=yes, resizable=no");
	}
	
	function articleemail() {
		var aid = document.codes.aid.value ;
		window.open('http://isplussvc.joins.com/asp/articleemail.asp?aid='+aid, "articlemail", "left=0, top=0, width=400, height=450, scrollbars=no, resizable=no");
	}

	function clickrate_article() {
		var aid = document.codes.aid.value ;
		//var servcode = document.codes.servcode.value;
		var maincode = document.codes.maincode.value;
		var go_url ="http://isplussvc.joins.com/asp/clickrate_article.asp?aid=" + aid + "&maincode=" + maincode;
		var strContent;		
		document.frames("hiddenclickrate").location=go_url;		
	}
	function bodyonload() {
		//initFont();
		clickrate_article();
	}
	document.write ("<IFRAME WIDTH=0 HEIGHT=0 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 width=0 height=0 SRC='about:blank' name='hiddenclickrate' id='hiddenclickrate'></IFRAME>");

	




























	var bV=parseInt(navigator.appVersion);
	NS4=(document.layers) ? true : false;
	IE4=((document.all)&&(bV>=4))?true:false;
	ver4 = (NS4 || IE4) ? true : false;

	if (ver4) {
	document.write("<div ID='searchLayDiv' STYLE='position:absolute;top=200;left=227; visibility:hidden;  z-index:10; filter:revealTrans(transition=0,duration=0.5) blendTrans(duration=0.5);background:White'></div>");
	}

	var x = 0;
	var y = 0;
	var snow = 0;
	var sw = 0;
	var cnt = 0;
	var dir = 1;
	if ( (NS4) || (IE4) ) {
		if (NS4) searchLay = document.searchLayDiv
		if (IE4) searchLay = searchLayDiv.style
	}




	function setEls() { return };

	currentX = currentY = 0;
	whichEl = null;

	function grabEl(e) {
		if (IE4) 
		{
			whichEl = event.srcElement;

			while (whichEl.id.indexOf("searchLayDiv") == -1) {
				whichEl = whichEl.parentElement;
				if (whichEl == null) { return }
			  if (whichEl.id.indexOf("searchLayDiv") != -1) { break }
			}
		}
		else {
			mouseX = e.pageX;
			mouseY = e.pageY;

			for ( i=0; i<document.layers.length; i++ ) 
				{
					tempLayer = document.layers[i];
					if ( tempLayer.id.indexOf("searchLayDiv") == -1 ) { continue }
					if ( (mouseX > tempLayer.left) && (mouseX < (tempLayer.left + tempLayer.clip.width)) && (mouseY > tempLayer.top) && (mouseY < (tempLayer.top + tempLayer.clip.height)) ) {
					whichEl = tempLayer;
				}
			} 

			if (whichEl == null) { return}
		}
		
		if (whichEl != activeEl) {
			if (IE4) { whichEl.style.zIndex = activeEl.style.zIndex+1 }
			else { whichEl.moveAbove(activeEl) };
				   activeEl = whichEl;
				}

		if (IE4) {
					whichEl.style.pixelLeft = whichEl.offsetLeft;
					whichEl.style.pixelTop = whichEl.offsetTop;

					currentX = (event.clientX + document.body.scrollLeft);
					currentY = (event.clientY + document.body.scrollTop); 

				}
		else	{
					currentX = e.pageX;
					currentY = e.pageY;

					document.captureEvents(Event.MOUSEMOVE);
					document.onmousemove = moveEl;
				}

	}
	function moveEl(e) {
		
		if (whichEl == null) { return };

		if (IE4) {
			newX = (event.clientX + document.body.scrollLeft);
			newY = (event.clientY + document.body.scrollTop);
		}
		else {
			newX = e.pageX;
			newY = e.pageY;
		}
		distanceX = (newX - currentX);
		distanceY = (newY - currentY);
		currentX = newX;
		currentY = newY;

		if (IE4) {
			whichEl.style.pixelLeft += distanceX;
			whichEl.style.pixelTop += distanceY;
			event.returnValue = false;
		}
		else { whichEl.moveBy(distanceX,distanceY) }
	}


	function checkEl() {
		if (whichEl!=null) { return false }
	}

	function dropEl(e) {
		if (NS4) { document.releaseEvents(Event.MOUSEMOVE) }
		whichEl = null;
	}


	function cursEl() {
	if (IE4) {
			if (event.srcElement.id.indexOf("searchLayDiv") != -1){event.srcElement.style.cursor = "move"; }
			}

	}

	function search_windows(akeyword,asource,e)
	{

		if (NS4) {x=e.pageX; y=e.pageY;}	
		if (IE4) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
		
		close_search_win();
		view(akeyword,asource,x,y);

	}


	function close_search_win() {
		if ( cnt >= 1 ) { sw = 0 };
		if ( (NS4) || (IE4) ) {
			if ( sw == 0 ) {
				snow = 0;
				hideObject(searchLay);
			} else {
				cnt++;
			}
		}
	}

	function view(query,asource,x,y) {
		try	{
					var varForm;
					varForm="<table width='380' border='0' cellpadding='0' cellspacing='1' bgcolor='#83A6C8'>"
					varForm=varForm +"<tr height='385'>"
					varForm=varForm +"<td valign='top' bgcolor='#EFF4F8'>"

					varForm=varForm +"<table width='378' border='0' cellpadding='0' cellspacing='0'>"
					varForm=varForm +"<tr height='53'>"
					varForm=varForm +"<td background='http://enportsimg.joins.com/search/sch_speed_top.gif' valign='top'>"

					varForm=varForm +"<table width='378' border='0' cellpadding='0' cellspacing='0'>"
					varForm=varForm +"<tr height='29'>"
					varForm=varForm +"<td style='padding:0 0 0 9' class='font_w13'>°ü·Ã °Ë»ö °á°ú</td>"
					varForm=varForm +"<td style='padding:0 6 0 0' align='right'><a href='javascript:close_search_win();'><img src='http://enportsimg.joins.com/search/search_close.gif'></a></td>"
					varForm=varForm +"</tr>"
					varForm=varForm +"<tr height='25'>"
					varForm=varForm +"<td colspan='2' background='http://enportsimg.joins.com/search/search_s_tap_bg.gif' style='padding:0 0 0 9'>"
					varForm=varForm +"<!--// s : top button //-->"
					varForm=varForm +"<table border='0' cellpadding='0' cellspacing='0'>"
					varForm=varForm +"<tr>"
					varForm=varForm +"<td width='89'><a href='http://find.joins.com/enports/search_list01.asp?query="+query+"' onfocus='blur()' target='_blank'><img src='http://enportsimg.joins.com/search/search_s_tap01.gif' width='85' height='25'></a></td>"
					varForm=varForm +"<td width='89'><img src='http://enportsimg.joins.com/search/search_s_tap02_on.gif' width='85' height='25'></td>"
					varForm=varForm +"<td width='89'><a href='http://find.joins.com/enports/search_list_bbs01.asp?query="+query+"' onfocus='blur()' target='_blank'><img src='http://enportsimg.joins.com/search/search_s_tap03.gif' width='85' height='25'></a></td>"
					varForm=varForm +"<td width='89'><a href='http://find.joins.com/enports/search_list_foto01.asp?query="+query+"' onfocus='blur()' target='_blank'><img src='http://enportsimg.joins.com/search/search_s_tap04.gif' width='85' height='25'></a></td>"
					varForm=varForm +"</tr>"
					varForm=varForm +"</table>"
					varForm=varForm +"<!--// e : top button //-->"
					varForm=varForm +"</td>"
					varForm=varForm +"</tr>"
					varForm=varForm +"</table>"
					varForm=varForm +"</td>"
					varForm=varForm +"</tr>"
					varForm=varForm +"</table>"
				
					varForm=varForm + Make_Search_Result(query,asource)					
						
					varForm=varForm +"<table width='364' border='0' cellpadding='0' cellspacing='0' align='center'>"
					varForm=varForm +"<tr style='padding:5 0 0 0'>"
					varForm=varForm +"<td align='right' class='sch_bl12_u'><img src='http://enportsimg.joins.com/search/search_bullet05.gif'><a href='http://find.joins.com/enports/search_list_news01.asp?query="+query+"' target='_blank'>´º½º ´õº¸±â</a></td>"
					varForm=varForm +"</tr>"
					varForm=varForm +"</table>"
					varForm=varForm +"</td>"
					varForm=varForm +"</tr>"
					varForm=varForm +"</table>"				

					layerWrite(varForm);
					disp(x,y);
			}
		catch(e)
			{
				var targetUrl = "http://find.joins.com/enports/asp/search_news_window.asp?query="+query+"&page_size=3&news_source="+asource+"&cleng=100";
				//var feature = "toolbar=no,location=no,directories=no,status=no,menubars=no,scrollbars=no,resizable=no,width=380,height=380,top="+ y +",left=" + x ;
				var feature = "toolbar=no,location=no,directories=no,status=no,menubars=no,scrollbars=no,resizable=no,width=380,height=380,top=100,left=100";
				
				window.open (targetUrl,"blank",feature);
				
				return false;
			}
	}
	function disp(x,y) {
		if ( (NS4) || (IE4) ) {		 
			if (snow == 0) 	{
				moveTo(searchLay,x,y);
				searchLayDiv.filters.blendTrans.apply(); 
				searchLayDiv.style.visibility = "visible"; 
				searchLayDiv.filters.blendTrans.play();
				showObject(searchLay);
				snow = 1;
			}
		}
	}
	function cClick() {
		hideObject(searchLay);
		sw=0;
	}
	function layerWrite(txt) {
		if(NS4) {
			var lyr = document.searchLayDiv.document
				lyr.write(txt)
				lyr.close()
		} else if(IE4) document.all["searchLayDiv"].innerHTML = txt
	}
	function showObject(obj) {
		if (NS4) obj.visibility = "show"
		else if (IE4) obj.visibility = "visible"
	}
	function hideObject(obj) {
		if (NS4) obj.visibility = "hide"
		else if (IE4) obj.visibility = "hidden"
	}
	function moveTo(obj,xL,yL) {
		obj.left = xL
		obj.top = yL
	}

	function redo() { location.reload() }
	if (NS4) {captureEvents(Event.RESIZE); onresize=redo}


	if (ver4) 
	{
		if (NS4) {
			document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);
			activeEl = document.searchLayDiv;
		}
		else {
		
			document.onmousemove = moveEl;
			document.onselectstart = checkEl;
			document.onmousesearchLay = cursEl;
			activeEl= document.all.searchLayDiv;
		}

		document.onmousedown = grabEl;
		document.onmouseup = dropEl;
		setEls(true);
	}


		
	function Make_Search_Result(query,asource)
	{	
		var xhttp ;
		var varForm ="";
		
		if (IE4){
			xhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		else
		{
			xhttp = new XMLHttpRequest();
		}
		
					var targetUrl = "http://find.joins.com/enports/include/enpnews_asp_xml.asp?query="+query+"&page_size=3&news_source="+asource+"&cleng=100";
					xhttp.open("GET",targetUrl, false);
					xhttp.send();
					
					if (xhttp.readyState==4)
					{	if (IE4) 
							{
								var ResultText = xhttp.responseBody;
								var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
								xmlDoc.async="false" ;
								xmlDoc.load(ResultText);
								
								var News_List = xmlDoc.getElementsByTagName("News_List")
								var Total_Cnt =  News_List(0).attributes.getNamedItem("Total_Cnt").nodeValue;
								var Row_Cnt =  News_List(0).attributes.getNamedItem("Row_Cnt").nodeValue;
								
								varForm="<!--// s : title //-->"
								varForm=varForm +"<table width='378' border='0' cellpadding='0' cellspacing='0'>"
								varForm=varForm +"<tr>"
								varForm=varForm +"<td style='padding:5 0 0 10' style='background-image:url(http://enportsimg.joins.com/search/search_quick_bg01.gif);background-repeat:repeat-x'>"
								varForm=varForm +"<table border='0' cellpadding='0' cellspacing='0'>"
								varForm=varForm +"<tr height='35'>"
								varForm=varForm +"<td style='padding-right:11px' class='list_tit_pic'>"+query+"</td>"
								varForm=varForm +"<td style='padding-right:8px' class='sch_12'>ÃÖ½Å´º½º</td>"
								varForm=varForm +"<td class='sch_bro02'>(1-"+Row_Cnt+" / "+Total_Cnt+"°Ç)</td>"
								varForm=varForm +"</tr>"
								varForm=varForm +"</table>"
								varForm=varForm +"</td>"
								varForm=varForm +"</tr>"
								varForm=varForm +"</table>"
								varForm=varForm +"<!--// e : title //-->"
								varForm=varForm +"<!--// s : list //-->"
								varForm=varForm +"<table width='364' border='0' cellpadding='0' cellspacing='1' bgcolor='#B2C9D6' align='center'>"
								varForm=varForm +"<tr>"
								varForm=varForm +"<td bgcolor='#FFFFFF' style='padding:10 0 5 0' align='center'>"
								
								var Articles = xmlDoc.getElementsByTagName("Article")
								
								for (var i=0;i<Articles.length;i++)
								{
										var Aid	= Articles[i].getElementsByTagName("Aid").item(0).text
										var Title	= Articles[i].getElementsByTagName("Title").item(0).text
										var SourceName	= Articles[i].getElementsByTagName("SourceName").item(0).text
										
										var InputTime	= Articles[i].getElementsByTagName("InputTime").item(0).text
										var ThumbNail	= Articles[i].getElementsByTagName("ThumbNail").item(0).text
										var Content	= Articles[i].getElementsByTagName("Content").item(0).text
													
									
										var tUrl="http://find.joins.com/enports/enp_search_link.asp?aid="+ Aid +"&query="+ query +"&type=enpnews"
										varForm=varForm +"<!--// s : ±â»ç //-->"
										varForm=varForm +"<div style='margin-bottom:6px'>"
										varForm=varForm +"<table width='344' border='0' cellpadding='0' cellspacing='0'>"
										varForm=varForm +"<tr>"
										varForm=varForm +"<td class='h18'><span class='sch_bl12_u h22'><a href='"+tUrl+"'  target=_blank>"+Title+"</a></span><br> "
										varForm=varForm +"<span class='sch_12'>... "+Content+" ...</span><br>"
										varForm=varForm +"<span class='gray01'>["+SourceName+"]  "+InputTime+"</span>"
										varForm=varForm +"</td>"
										varForm=varForm +"</tr>"
										varForm=varForm +"</table>"
										varForm=varForm +"</div>"
										varForm=varForm +"<!--// e : ±â»ç //-->"
								}

								varForm=varForm +"</td>"
								varForm=varForm +"</tr>"
								varForm=varForm +"</table>"
								varForm=varForm +"<!--// e : list //-->"
		
							}
							 
					}
					
		return varForm;

	}

	function adswitch() {
		if (eval('document.all.articlebodycomp') == null){		//°ü·Ã±â»ç °íÁ¤»çÁø ÄÄÆ÷³ÍÆ®°¡ ¾øÀ»°æ¿ì¸¸ ±¤°í°¡ ¾ÈÀ¸·Î µé¾î°£´Ù.

			var new_content_top = "<!--// s : ±¤°í //--><div style='margin-bottom:15px;margin-left:15px;'><table width='230' cellspacing='0' cellpadding='0' border='0' align='right'><tr><td align='right' valign='top' style='padding:0 0 5 0'>"
			var new_content_bottom = "</td></tr></table></div><!--// s : ±¤°í //-->"

			var currenturl = window.location.toString();
			var len = currenturl.length;
			//var stat = currenturl.lastIndexOf("/cartoon/47/cartoon_47.html", len)+1;
			var string = "";
			if (currenturl.lastIndexOf("/sports/baseball/", len)+1 >0) {
				var new_content = new_content_top + "<IFRAME WIDTH=220 HEIGHT=240 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='http://isplus.joins.com/ui/ad/2006ad/adimg_baseball_220240.html'  id='midbanner240' ></IFRAME>" + new_content_bottom;	
			} else if (currenturl.lastIndexOf("/sports/soccer/", len)+1 >0) {
				var new_content = new_content_top + "<IFRAME WIDTH=220 HEIGHT=240 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='http://isplus.joins.com/ui/ad/2006ad/adimg_football_220240.html'  id='midbanner240' ></IFRAME>" + new_content_bottom;	
			} else if (currenturl.lastIndexOf("/enter/movie/", len)+1 >0) {
				var new_content = new_content_top + "<IFRAME WIDTH=220 HEIGHT=240 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='http://isplus.joins.com/ui/ad/2006ad/adimg_movie_220240.html'  id='midbanner240' ></IFRAME>" + new_content_bottom;	
			} else if (currenturl.lastIndexOf("/enter/", len)+1 >0) {
				var new_content = new_content_top + "<IFRAME WIDTH=220 HEIGHT=240 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='http://isplus.joins.com/ui/ad/2006ad/adimg_enter_220240.html'  id='midbanner240' ></IFRAME>" + new_content_bottom;	
			} else if (currenturl.lastIndexOf("/leisure/", len)+1 >0) {
				var new_content = new_content_top + "<IFRAME WIDTH=220 HEIGHT=240 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='http://isplus.joins.com/ui/ad/2006ad/adimg_leisure_220240.html'  id='midbanner240' ></IFRAME>" + new_content_bottom;	
			} else if (currenturl.lastIndexOf("/game/", len)+1 >0) {
				var new_content = new_content_top + "<IFRAME WIDTH=220 HEIGHT=240 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='http://isplus.joins.com/ui/ad/2006ad/adimg_game_220240.html'  id='midbanner240' ></IFRAME>" + new_content_bottom;	
			} else if (currenturl.lastIndexOf("/comics/", len)+1 >0) {
				var new_content = new_content_top + "<IFRAME WIDTH=220 HEIGHT=240 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='http://isplus.joins.com/ui/ad/2006ad/adimg_cartoon_220240.html'  id='midbanner240' ></IFRAME>" + new_content_bottom;	
			} else {
				var new_content = new_content_top + "<IFRAME WIDTH=220 HEIGHT=240 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='http://isplus.joins.com/ui/ad/2006ad/adimg_generals_220240.html'  id='midbanner240' ></IFRAME>" + new_content_bottom;
			}
			document.all.articleBody.innerHTML = new_content + document.all.articleBody.innerHTML;
			document.all.right_banner.style.display = "none";

		}
	}

