var metablog=new (function(){var host=document.location.hostname;var obj=new Object;var arr=new Array;this.applyBlog=function(){try{$.ajax({type:"POST",dataType:"text",url:"http://"+host+"/meta/blog_apply_proc.nwz",data:{btype:$("input[name='btype']").val(),fval:$("form").serialize()},success:function(data,status){arrResult=data.split("^R");if(arrResult[1]=="OK")location.href="http://"+host+"/meta/blog_apply_step4.nwz";else{alert(arrResult[2]);window.close()}},error:function(request,status){alert("½ÅÃ»¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù2")},
complete:function(request,status,data){}})}catch(e){alert("½ÅÃ»¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù3")}};this.authBlogNumber=function(){try{$.ajax({type:"POST",dataType:"text",url:"http://"+host+"/meta/blog_apply_proc.nwz",data:{btype:$("input[name='btype']").val(),authnum:$("input[name='authnum']").val(),provider_srl:$("input[name='provider_srl']").val()},success:function(data,status){arrResult=data.split("^R");if(arrResult[1]=="OK"){alert("¼º°øÀûÀ¸·Î ÀÎÁõµÇ¾ú½À´Ï´Ù.");opener.top.location.reload();window.close()}else alert(arrResult[2])},
error:function(request,status){alert("ÀÎÁõ¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù1.")},complete:function(request,status,data){}})}catch(e){alert("ÀÎÁõ¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù2.")}};this.changeMyBlog=function(psrl){location.href="http://"+host+"/meta/myblog.nwz?provider_srl="+psrl};this.delMyBlog=function(usn,provider_srl){try{$.ajax({type:"POST",dataType:"text",url:"http://"+host+"/meta/blog_apply_proc.nwz",data:{btype:300,usn:usn,provider_srl:provider_srl},success:function(data,status){arrResult=data.split("^R");if(arrResult[1]=="OK"){alert("¼º°øÀûÀ¸·Î »èÁ¦µÇ¾ú½À´Ï´Ù.");
location.href=location.href}else alert("»èÁ¦¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù")},error:function(request,status){alert("»èÁ¦¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù")},complete:function(request,status,data){}})}catch(e){alert("»èÁ¦¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù")}};this.delMyBlogContents=function(usn,provider_srl,contents_srl){try{$.ajax({type:"POST",dataType:"text",url:"http://"+host+"/meta/blog_apply_proc.nwz",data:{btype:400,usn:usn,provider_srl:provider_srl,contents_srl:contents_srl},success:function(data,status){arrResult=data.split("^R");if(arrResult[1]=="OK"){alert("¼º°øÀûÀ¸·Î »èÁ¦µÇ¾ú½À´Ï´Ù.");
location.href=location.href}else alert("»èÁ¦¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù")},error:function(request,status){alert("»èÁ¦¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù")},complete:function(request,status,data){}})}catch(e){alert("»èÁ¦¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù")}};this.goSearch=function(ymd,rtype){if(trim(document.f.searchstr.value)==""){alert("°Ë»öÇÒ ´Ü¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");document.f.searchstr.focus();return}else if(document.f.searchstr.value.length<2){alert("°Ë»ö¾î´Â µÎÀÚ ÀÌ»óÀÌ¾î¾ß ÇÕ´Ï´Ù.");document.f.searchstr.focus();return}else this.goChange(ymd,rtype)};this.goChange=function(ymd,rtype){if(document.f.searchstr.value)location.href=
"/meta/blog.nwz?ymd="+ymd+"&rtype="+rtype+"&searchstr="+document.f.searchstr.value;else location.href="/meta/blog.nwz?ymd="+ymd+"&rtype="+rtype};this.goNextStep=function(){if(document.agreeform.agree.checked==false){alert("ÆÄ¿öºí·Î±× ÀÌ¿ë¿¡ ´ëÇÑ µ¿ÀÇ¸¦ ÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");return}else location.href="/meta/blog_apply_step2.nwz"};this.goBlogStep=function(){var f=document.fo;if(trim(f.blog_id.value)==""){alert("ºí·Î±×¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");return}f.action="/meta/blog_apply_step3.nwz";f.submit()}});
