function add_msg(article_id,msg_id) {
    document.location.href='http://www.<?echo url;?>/articles/add_msg.php?thread='+article_id+'&parent='+msg_id+'&self=<?echo $_SERVER["REQUEST_URI"];?>';
}

function show(id) {
    var curstat=document.getElementById(id).style.display;
    if(curstat=='block'){curstat='none';}
    else if(curstat=='none'){curstat='block';}
    document.getElementById(id).style.display=curstat;
}

function conf(title, id, forumid) {
	if (confirm('Are you sure you want to delete message \'' + title + '\'?')) {
		location.href = '/editor/fr_rc_' + id + '-' + forumid + '/';
	}
}


function validate_msg(author,subject) {
    alert('a');
    if(!author) {
        alert('no name');
        return false;
    }else if(!subject) {
        alert('no subject');
        return false;
    }else {
        return true;
    }
}
