function checkForm()
{

	formErrors = false;

	if (document.post.message.value.length < 2) {
		formErrors = "Sie müssen zu Ihrem Beitrag einen Text eingeben.";
	}

	if (formErrors) {
		alert(formErrors);
		return false;
	} else {
		bbstyle(-1);
		//formObj.preview.disabled = true;
		//formObj.submit.disabled = true;
		return true;
	}
}


function favTopic(id,mode)
{
    if(typeof dojo == 'object') {
		dojo.io.bind({
    		url: '/forum/favtopic/' + id + '/' + mode + '/viewtopic/ajax/',
    		load: function(type, data, evt){
    			dojo.byId('message').innerText = data.message;
    			dojo.byId('message').innerHTML = data.message;
    			dojo.byId('favtopic_link').innerText = data.favtopic_link;
    			dojo.byId('favtopic_link').innerHTML = data.favtopic_link;
    			dojo.byId('notify_topic_link').innerText = data.notify_topic_link;
        	    dojo.byId('notify_topic_link').innerHTML = data.notify_topic_link;
        	    dojo.byId('favtopic_icon').src = data.favtopic_icon;
    			dojo.lfx.html.wipeIn('message', 950).play();
    			window.setTimeout('dojo.lfx.html.wipeOut(\'message\', 950).play()', 3000);
    		},
    		mimetype: "text/json"
		});
    } else {
        return true;
    }
    return false;
}

function notifyFavTopic(topic_id,mode)
{
    if(mode == 'on' || mode == 'off'){
        if(typeof dojo == 'object') {
    		dojo.io.bind({
        		url: '/forum/favtopic/' + topic_id + '/notify/' + mode + '/viewtopic/ajax/',
        		load: function(type, data, evt){
        			dojo.byId('message').innerText = data.message;
        			dojo.byId('message').innerHTML = data.message;
        			dojo.byId('notify_topic_link').innerText = data.notify_topic_link;
        			dojo.byId('notify_topic_link').innerHTML = data.notify_topic_link;
        			dojo.lfx.html.wipeIn('message', 950).play();
        			window.setTimeout('dojo.lfx.html.wipeOut(\'message\', 950).play()', 3000);
        		},
        		mimetype: "text/json"
    		});
        } else {
            return true;
        }
    }
    return false;
}