function FeedCheck(Url)
{
	if(Url == "")
	{
		alert('RSS ÁÖ¼Ò¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.');
		$('txtFeed').focus();
		return false;
	}
	else
		MHz.V5.MediaMobCanal.Ver1.JoinBloger.AxFeedCheck(Url, AxRetCheck);
}	
	
function CheckRssReset()
{
	$('txtLink').value = "";	
	$('txtTitle').value = "";
	$('txtFeed').value = "";
	$('txtFeed').focus();
	$('divField').style.display = "none";
}

function AxRetCheck(res)
{
	if(res != null && res.value != null && res.error != ""){
		var retVal = res.value;
		if(retVal.UsedFeed == 'E'){$('spCheckFeed').innerHTML = "µî·ÏµÈ FeedÁÖ¼ÒÀÔ´Ï´Ù.";}
		else if(retVal.UsedFeed == 'Y'){
			$('txtLink').value = retVal.BlogLink;
			$('txtTitle').value = retVal.BlogTitle;
			$('spCheckFeed').innerHTML = "";
			$('divField').style.display = "block";
			}
		else
		{
			$('spCheckFeed').innerHTML = "Àß¸øµÈ FeedÁÖ¼ÒÀÔ´Ï´Ù.";
			$('txtLink').value = "";
			$('txtTitle').value = "";
		}
	}
	else{
		$('spCheckFeed').innerHTML = "Àß¸øµÈ FeedÁÖ¼ÒÀÔ´Ï´Ù.";
		$('txtLink').value = "";
		$('txtTitle').value = "";
		
		}}
		
function JoinBlog()
{
	var Title = $('txtTitle').value;
	var Link = $('txtLink').value;
	var Rss = $('txtFeed').value;
	
	if(Link == "" || Title == "" || Rss == "")
	{
		CheckRssReset();
		return false;
	}
	else
		MHz.V5.MediaMobCanal.Ver1.JoinBloger.AxCreateJoinBlogFeed(Title, Link, Rss, AxRetJoinBlog);
}

function AxRetJoinBlog(res)
{
	if(res != null && res.value != null && res.error != ""){
		var retVal = res.value;
		if(retVal){alert('Á¤»óÀûÀ¸·Î ºí·Î±×°¡ µî·ÏµÇ¾ú½À´Ï´Ù.');document.location.href=document.location;}
		else{alert('´Ù½Ã ½ÃµµÇØÁÖ¼¼¿ä.');CheckRssReset();}
	}
	else{
		alert(res.error.Message);
	}
}

