function validateFullName(id) { str=document.getElementById(id).value; if(str=='' || str=='Navn') { //document.getElementById(id).className="red-error-field"; document.getElementById('valid_'+id).innerHTML='
');
},
url:'/blog_ajax_comment.php?blog_article_id='+document.getElementById('blog_article_id').value+'&blog_comments_email='+document.getElementById('blog_comments_email').value+'&blog_comments='+document.getElementById('blog_comments').value+'&blog_comments_name='+document.getElementById('blog_comments_name').value,
success:function(response)
{
$(':input','#frmfrnd').not(':button, :submit, :reset, :hidden').val('');
$('#msg').html(response);
}
});
/*htmlData('/blog_ajax_comment.php?blog_article_id='+document.getElementById('blog_article_id').value+'&blog_comments='+document.getElementById('blog_comments').value+'&blog_comments_name='+document.getElementById('blog_comments_name').value+email_param,'','msg');*/
}
}
function validateCommentReplyForm(id)
{
var flag = 0;
var foc = ''
if(!validateFullName('reply_name_'+id))
{
flag=1;
if(foc == '')
{
foc = 'reply_name_'+id;
}
}
if(!validateNewsEmail('reply_email_'+id))
{
flag=1;
if(foc == '')
{
foc = 'reply_email_'+id;
}
}
if(!validateComment('reply_txt_'+id))
{
flag=1;
if(foc == '')
{
foc = 'reply_txt_'+id;
}
}
if(flag==1)
{
document.getElementById(foc).focus();
return false;
}
else
{
document.getElementById('frmreply_'+id).style.display='';
document.getElementById('reply_msg_'+id).style.display='';
$.ajax({
beforeSend: function()
{
$('#reply_msg_'+id).html('
');
},
url:'/blog_ajax_comment.php?type=reply&blog_comment_id='+id+'&blog_comments_email='+document.getElementById('reply_email_'+id).value+'&blog_comments='+document.getElementById('reply_txt_'+id).value+'&blog_comments_name='+document.getElementById('reply_name_'+id).value,
success:function(response)
{
$(':input','#frmreply_'+id).not(':button, :submit, :reset, :hidden').val('');
$('#reply_msg_'+id).html(response);
}
});
/*htmlData('/blog_ajax_comment.php?blog_article_id='+document.getElementById('blog_article_id').value+'&blog_comments='+document.getElementById('blog_comments').value+'&blog_comments_name='+document.getElementById('blog_comments_name').value+email_param,'','msg');*/
}
}