function ChangeArticleType(obj){
if(obj.value=="1"){
$("contentcontainer").style.display="";
$("url").style.display="none";
$("wapurl").style.display="none";
}
else if(obj.value=="2"){
$("contentcontainer").style.display="none";
$("url").style.display="";
$("wapurl").style.display="";
}
}

function CheckArticle(){
document.article.title.value=document.article.title.value.trim();
if(document.article.title.value==""){
ShowMessageDialog("提示","标题不能为空");
return false;
}
document.article.url.value=document.article.url.value.trim();
document.article.wapurl.value=document.article.wapurl.value.trim();
if(document.article.type.value=="2"){
if(document.article.url.value==""){
ShowMessageDialog("提示","跳转网址不能为空");
return false;
}
if(document.article.wapurl.value==""){
ShowMessageDialog("提示","WAP跳转网址不能为空");
return false;
}
}
if(document.article.summary.length>255){
ShowMessageDialog("提示","摘要不能超过255个字符");
return false;
}
if(document.article.isimage.checked&&document.article.imageurl.value==""){
ShowMessageDialog("提示","设置成图片文章时,封面图片不能为空");
return false;
}
}

function CheckQuote(){
document.quote.title.value=document.quote.title.value.trim();
if(document.quote.title.value==""){
ShowMessageDialog("提示","标题不能为空");
return false;
}
document.quote.url.value=document.quote.url.value.trim();
if(document.quote.url.value==""){
ShowMessageDialog("提示","引用地址不能为空");
return false;
}
document.quote.wapurl.value=document.quote.wapurl.value.trim();
if(document.quote.wapurl.value==""){
ShowMessageDialog("提示","WAP引用地址不能为空");
return false;
}
if(document.quote.summary.length>255){
ShowMessageDialog("提示","摘要不能超过255个字符");
return false;
}
if(document.quote.isimage.checked&&document.quote.imageurl.value==""){
ShowMessageDialog("提示","设置成图片引用时,封面图片不能为空");
return false;
}
}