// EmbeddedForum.js

function CommunityServer_EmbeddedForum(variableName, callbackUrl, scriptUrl, format_header, format_header_anonymous, format_post, format_postAlt, format_footer, format_footer_anonymous, format_registerForm, format_loginForm, format_postForm, format_replyForm, format_reportAbuseForm, loginToPostMessage, postTooLongMessage, css)
{
    this._variableName = variableName;
    this._scriptUrl = scriptUrl;
    this._callbackUrl = callbackUrl;
    if (this._callbackUrl.indexOf('&hosturl=') < 0)
    {
        if (this._callbackUrl.indexOf('?') > 0)
            this._callbackUrl += '&';
        else
            this._callbackUrl += '?';
            
        this._callbackUrl += 'rawhosturl=' + (new String(window.location));
    }
    
    this._format_header = format_header;
    this._format_header_anonymous = format_header_anonymous;
    this._format_post = format_post;
    this._format_postAlt = format_postAlt;
    this._format_footer = format_footer;
    this._format_footer_anonymous = format_footer_anonymous;
    this._format_registerForm = format_registerForm;
    this._format_loginForm = format_loginForm;
    this._format_postForm = format_postForm;
    this._format_replyForm = format_replyForm;
    this._format_reportAbuseForm = format_reportAbuseForm;
    this._css = css;
    
    this._message_loginToPost = loginToPostMessage;
    this._message_posttoolong = postTooLongMessage;

    this._container = null;
    this._currentForm = ""; // post, login, register
    this._currentPost = null;
    
    this._user_isLoggedIn = false;
    this._user_canPost = false;
    this._user_userAvatarUrl = '';
    this._posts = new Array();
    
    this._scriptCount = 0;
    
    window.setTimeout(new Function(this._variableName + '._initialize();'), 99);
}

// Initialize

CommunityServer_EmbeddedForum.prototype._initialize = function()
{
    var scriptUrl = this._scriptUrl.toLowerCase();
	var scripts = document.getElementsByTagName('script');
    var script = null;
    for (var i = 0; i < scripts.length; i++)
    {
        if (scripts[i].src && scripts[i].src.toLowerCase() == scriptUrl)
        {
	        script = scripts[i];
	        break;
        }
    }

    if (script)
    {
        this._container = document.createElement('div');
        
        var style = document.createElement('style');
        style.type = 'text/css';

        if (style.styleSheet)
            style.styleSheet.cssText = this._css;
        else
            style.appendChild(document.createTextNode(this._css));
        
        var heads = document.getElementsByTagName('HEAD');
        if (heads.length > 0)
            heads[0].appendChild(style);
        else
            script.parentNode.insertBefore(style, script);
        
        script.parentNode.insertBefore(this._container, script);
        script.parentNode.removeChild(script);
    
        var postData = new Array();
        
        if (document.title)
        {
            postData[postData.length] = 'hosttitle=';
            postData[postData.length] = encodeURIComponent(document.title);
        }
                
        this._doCallback("data", postData.join(''), new Function('data', this._variableName + '._initializeCallback(data);'), null);
    }
}

CommunityServer_EmbeddedForum.prototype._initializeCallback = function(data)
{
    this._user_isLoggedIn = data.isLoggedIn;
    this._user_canPost = data.canPost;
    this._user_userName = data.userName;
    this._user_userAvatarUrl = data.userAvatarUrl;
    this._posts = data.posts;
    
    if (this._user_canPost || this._user_isLoggedIn)
        this._currentForm = "post";
    else
        this._currentForm = "login";
    
    this.Refresh();
}

// Login

CommunityServer_EmbeddedForum.prototype._openLoginForm = function()
{
    this._currentForm = "login";
    
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._login = function()
{
    var postData = new Array();
    postData[postData.length] = 'userName=';
    postData[postData.length] = encodeURIComponent(document.getElementById(this._getFieldId('username','login')).value);
    postData[postData.length] = '&password=';
    postData[postData.length] = encodeURIComponent(document.getElementById(this._getFieldId('password','login')).value);
    
    var submitButton = document.getElementById(this._getFieldId('submit','login'));
    if (submitButton)
        submitButton.disabled = true;

    this._doCallback('login', postData.join(''), new Function('data', this._variableName + '._loginCallback(data)'), new Function('message', this._variableName + '._loginFailed(message)'));
}

CommunityServer_EmbeddedForum.prototype._loginCallback = function(data)
{
    this._user_isLoggedIn = data.isLoggedIn;
    this._user_userName = data.userName;
    this._user_canPost = data.canPost;
    this._user_userAvatarUrl = data.userAvatarUrl;
    
    if (this._user_isLoggedIn)
        this._currentForm = "post";
    
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._loginFailed = function(message)
{
    var submitButton = document.getElementById(this._getFieldId('submit','login'));
    if (submitButton)
        submitButton.disabled = false;
        
    alert(message);
}

// Register

CommunityServer_EmbeddedForum.prototype._openRegistrationForm = function()
{
    this._currentForm = "register";
    
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._register = function()
{
    var postData = new Array();
    postData[postData.length] = 'userName=';
    postData[postData.length] = encodeURIComponent(document.getElementById(this._getFieldId('username','register')).value);
    postData[postData.length] = '&password=';
    postData[postData.length] = encodeURIComponent(document.getElementById(this._getFieldId('password','register')).value);
    postData[postData.length] = '&email=';
    postData[postData.length] = encodeURIComponent(document.getElementById(this._getFieldId('email','register')).value);
    
    var submitButton = document.getElementById(this._getFieldId('submit','register'));
    if (submitButton)
        submitButton.disabled = true;

    this._doCallback("register", postData.join(''), new Function('data', this._variableName + '._registerCallback(data)'), new Function('message', this._variableName + '._registerFailed(message);'));
}

CommunityServer_EmbeddedForum.prototype._registerCallback = function(data)
{
    this._user_isLoggedIn = data.isLoggedIn;
    this._user_userName = data.userName;
    this._user_canPost = data.canPost;
    this._user_userAvatarUrl = data.userAvatarUrl;
    
    if (this._user_isLoggedIn)
        this._currentForm = "post";
    
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._registerFailed = function(message)
{
    var submitButton = document.getElementById(this._getFieldId('submit','register'));
    if (submitButton)
        submitButton.disabled = false;
        
    alert(message);
}

// Post

CommunityServer_EmbeddedForum.prototype._openPostForm = function()
{
    if (this._user_canPost)
        this._currentForm = "post";
    else
    {
        alert(this._message_loginToPost);
        this._currentForm = "login";
    }
        
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._addPost = function()
{
    var postData = new Array();
    postData[postData.length] = 'body=';
    postData[postData.length] = encodeURIComponent(document.getElementById(this._getFieldId('body','post')).value);

    var submitButton = document.getElementById(this._getFieldId('submit','post'));
    if (submitButton)
        submitButton.disabled = true;

    this._doCallback("addpost", postData.join(''), new Function('data', this._variableName + '._addPostCallback(data)'), new Function('message', this._variableName + '._addPostFailed(message);'));
}

CommunityServer_EmbeddedForum.prototype._addPostCallback = function(data)
{
    if (data.isApproved)
        this._posts[this._posts.length] = data.post;
    else
        alert(data.message);
    
    this._currentForm = "post";
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._addPostFailed = function(message) {
    var submitButton = document.getElementById(this._getFieldId('submit', 'post'));
    if (submitButton)
        submitButton.disabled = false;

    var  my = "#" + message  + "+";
    if (my == '#undefined+') 
        alert('Post zu lang, bitte auf unter 1000 Zeichen kürzen.');
     else 
        alert(message);
        
}

// Reply

CommunityServer_EmbeddedForum.prototype._openReplyForm = function(postID)
{
    if (this._user_canPost)
    {
        this._currentPost = null;
        for (var i = 0; i < this._posts.length; i++)
        {
            if (this._posts[i].id == postID)
            {
                this._currentPost = this._posts[i];
                break;
            }
        }
    
        this._currentForm = "reply";
    }
    else
    {
        alert(this._message_loginToPost);
        this._currentForm = "login";
    }
        
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._addReply = function()
{
    var postData = new Array();
    postData[postData.length] = 'replyToPostID=';
    postData[postData.length] = this._currentPost.id;
    postData[postData.length] = '&body=';
    postData[postData.length] = encodeURIComponent(document.getElementById(this._getFieldId('body','reply')).value);

    var submitButton = document.getElementById(this._getFieldId('submit','reply'));
    if (submitButton)
        submitButton.disabled = true;

    this._doCallback("addpost", postData.join(''), new Function('data', this._variableName + '._addReplyCallback(data)'), new Function('message', this._variableName + '._addReplyFailed(message)'));
}

CommunityServer_EmbeddedForum.prototype._addReplyCallback = function(data)
{
    if (data.isApproved)
        this._posts[this._posts.length] = data.post;
    else
        alert(data.message);
    
    this._currentForm = "post";
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._addReplyFailed = function(message)
{
    var submitButton = document.getElementById(this._getFieldId('submit','reply'));
    if (submitButton)
        submitButton.disabled = false;
        
    alert(message);
}

// Report Abuse

CommunityServer_EmbeddedForum.prototype._openReportAbuseForm = function(postID)
{
    this._currentPost = null;
    for (var i = 0; i < this._posts.length; i++)
    {
        if (this._posts[i].id == postID)
        {
            this._currentPost = this._posts[i];
            break;
        }
    }

    this._currentForm = "reportabuse";
        
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._reportAbuse = function()
{
    var postData = new Array();
     
    postData[postData.length] = 'reportedPostID=';
    postData[postData.length] = this._currentPost.id;
    postData[postData.length] = '&body=';
    postData[postData.length] = encodeURIComponent(document.getElementById(this._getFieldId('body','abuse')).value);
    
    var submitButton = document.getElementById(this._getFieldId('submit','abuse'));
    if (submitButton)
        submitButton.disabled = true;

    this._doCallback("reportpost", postData.join(''), new Function('data', this._variableName + '._reportAbuseCallback(data)'), new Function('message', this._variableName + '._reportAbuseFailed(data)'));
}

CommunityServer_EmbeddedForum.prototype._reportAbuseCallback = function(data)
{
    alert(data.message);
    this._currentForm = "post";
    this.Refresh();
}

CommunityServer_EmbeddedForum.prototype._reportAbuseFailed = function(message)
{
    var submitButton = document.getElementById(this._getFieldId('submit','abuse'));
    if (submitButton)
        submitButton.disabled = false;
        
    alert(message);
}

// Log Out

CommunityServer_EmbeddedForum.prototype._logout = function()
{
    this._doCallback('logout', '', new Function('data', this._variableName + '._logoutCallback(data)'), null);
}

CommunityServer_EmbeddedForum.prototype._logoutCallback = function(data)
{
    this._user_isLoggedIn = data.isLoggedIn;
    this._user_userName = data.userName;
    this._user_canPost = data.canPost;
    this._user_userAvatarUrl = data.userAvatarUrl;
    
    if (this._user_canPost)
        this._currentForm = "post";
    else
        this._currentForm = "login";
    
    this.Refresh();
}

// UI refreshing

CommunityServer_EmbeddedForum.prototype.Reload = function()
{
    this._doCallback('data', '', new Function('data', this._variableName + '._initializeCallback(data);'), null);
}

CommunityServer_EmbeddedForum.prototype.Refresh = function()
{
    var content = new Array();
    
    if (this._user_isLoggedIn)
        content[content.length] = this._processHeaderFooterTemplate(this._format_header);
    else
        content[content.length] = this._processHeaderFooterTemplate(this._format_header_anonymous);
    
    for (var i = 0; i < this._posts.length; i++)
    {
        if (i % 2 == 0)
            content[content.length] = this._processPostTemplate(this._format_post, this._posts[i]);
        else
            content[content.length] = this._processPostTemplate(this._format_postAlt, this._posts[i]);
    }
    
    if (this._user_isLoggedIn)
        content[content.length] = this._processHeaderFooterTemplate(this._format_footer);
    else
        content[content.length] = this._processHeaderFooterTemplate(this._format_footer_anonymous);
    
    this._container.innerHTML = content.join('');
}

CommunityServer_EmbeddedForum.prototype._processPostTemplate = function(template, post)
{
    return this._commonTemplate(template).replace(/\{postbody\}/gi, post.body).replace(/\{postusername\}/gi, post.userName).replace(/\{postuserurl\}/gi, post.userUrl).replace(/\{postuseravatarurl\}/gi, post.userAvatarUrl).replace(/\{postdate\}/gi, post.postDate).replace(/\{replyscript\}/i, this._variableName + '._openReplyForm(' + post.id + '); return false;').replace(/\{reportabusescript\}/i, this._variableName + '._openReportAbuseForm(' + post.id + '); return false;');
}

CommunityServer_EmbeddedForum.prototype._processHeaderFooterTemplate = function(template)
{
    var result = this._commonTemplate(template);
    
    if (this._currentForm == "post" && this._user_canPost)
        result = result.replace(/\{form\}/i, this._getPostForm());
    else if (this._currentForm == "reply" && this._currentPost && this._user_canPost)
        result = result.replace(/\{form\}/i, this._getReplyForm());
    else if (this._currentForm == "reportabuse")
        result = result.replace(/\{form\}/i, this._getReportAbuseForm());
    else if (this._currentForm == "register" && !this._user_isLoggedIn)
        result = result.replace(/\{form\}/i, this._getRegisterForm());
    else if (this._currentForm = "login" && !this._user_isLoggedIn)
        result = result.replace(/\{form\}/i, this._getLoginForm());
    else
        result = result.replace(/\{form\}/i, "");
        
    return result;
}

CommunityServer_EmbeddedForum.prototype._getReportAbuseForm = function()
{
    return this._processPostTemplate(this._format_reportAbuseForm, this._currentPost).replace(/\{submitscript\}/i, this._variableName + '._reportAbuse(); return false;').replace(/\{bodyid\}/i, this._getFieldId('body','abuse')).replace(/\{submitid\}/i, this._getFieldId('submit','abuse'));    
}

CommunityServer_EmbeddedForum.prototype._getReplyForm = function()
{
    return this._processPostTemplate(this._format_replyForm, this._currentPost).replace(/\{submitscript\}/i, this._variableName + '._addReply(); return false;').replace(/\{bodyid\}/i, this._getFieldId('body','reply')).replace(/\{submitid\}/i, this._getFieldId('submit','reply'));    
}

CommunityServer_EmbeddedForum.prototype._getPostForm = function()
{
    return this._commonTemplate(this._format_postForm).replace(/\{submitscript\}/i, this._variableName + '._addPost(); return false;').replace(/\{bodyid\}/i, this._getFieldId('body','post')).replace(/\{submitid\}/i, this._getFieldId('submit','post'));
}

CommunityServer_EmbeddedForum.prototype._getRegisterForm = function()
{
    return this._commonTemplate(this._format_registerForm).replace(/\{submitscript\}/i, this._variableName + '._register(); return false;').replace(/\{usernameid\}/i, this._getFieldId('username','register')).replace(/\{passwordid\}/i, this._getFieldId('password','register')).replace(/\{emailid\}/i, this._getFieldId('email','register')).replace(/\{submitid\}/i, this._getFieldId('submit','register'));
}

CommunityServer_EmbeddedForum.prototype._getLoginForm = function()
{
    return this._commonTemplate(this._format_loginForm).replace(/\{submitscript\}/i, this._variableName + '._login(); return false;').replace(/\{usernameid\}/i, this._getFieldId('username','login')).replace(/\{passwordid\}/i, this._getFieldId('password','login')).replace(/\{submitid\}/i, this._getFieldId('submit','login'));
}

CommunityServer_EmbeddedForum.prototype._getFieldId = function(id, form)
{
    return this._variableName + "__" + form + "__" + id;
}

CommunityServer_EmbeddedForum.prototype._commonTemplate = function(template)
{
    return template.replace(/\{username\}/gi, this._user_userName).replace(/\{useravatarurl\}/gi, this._user_userAvatarUrl).replace(/\{postcount\}/gi, this._posts.length).replace(/\{registerscript\}/gi, this._variableName + "._openRegistrationForm(); return false;").replace(/\{postscript\}/gi, this._variableName + "._openPostForm(); return false;").replace(/\{loginscript\}/gi, this._variableName + "._openLoginForm(); return false;").replace(/\{logoutscript\}/gi, this._variableName + "._logout(); return false;");
}

/* AJAX stuff */

CommunityServer_EmbeddedForum.prototype._doCallback = function(mode, postData, clientCallback, clientErrorCallback)
{
    var url = this._callbackUrl.replace(/\{mode\}/i, mode);
    
    if (postData)
    {
        if (url.indexOf('?') > 0)
            url += "&" + postData;
        else
            url += "?" + postData;
    }
    
    this._scriptCount++;
    var context = this._variableName + "_s" + this._scriptCount;
    
    url = url.replace(/\{context\}/i, encodeURIComponent(context)).replace(/\{parentname\}/i, this._variableName);
    
    if (url.length > 2048)
    {
        if (clientErrorCallback)
            clientErrorCallback(this._mesage_posttoolong);
        else
            alert(this._message_posttoolong);
        return;
    }
    
    var s = document.createElement('script');
    s._clientCallback = clientCallback;
    s._clientErrorCallback = clientErrorCallback;
    s.id = context;
    s.src = url
    document.body.appendChild(s);
    
    s._callbackTimeout = window.setTimeout(new Function(this._variableName + '._callbackTimeout(\'' + s.id + '\');'), 29999);
}

CommunityServer_EmbeddedForum.prototype._callbackResponse = function(context, success, result)
{
    var s = document.getElementById(context);
    if (s)
    {
        window.clearTimeout(s._callbackTimeout);
    
        if (success)
        {
            if (s._clientCallback)
                s._clientCallback(result);
        }
        else
        {
            if (s._clientErrorCallback)
                s._clientErrorCallback(result);
            else if (result)
                alert(result);
        }
                
        s.parentNode.removeChild(s);
    }
}

CommunityServer_EmbeddedForum.prototype._callbackTimeout = function(context)
{
    var s = document.getElementById(context);
    if (s && s._clientErrorCallback)
    {
        s._clientErrorCallback('Callback request timed out.');
        s.parentNode.removeChild(s);
    }
}


var ef_55_753 = new CommunityServer_EmbeddedForum('ef_55_753','http://szene.digitalkamera.de/forums/55/embed.aspx?parentname={parentname}&context={context}&mode={mode}','http://szene.digitalkamera.de/forums/55/embed.aspx','\n    <div class=\"EmbeddedForumHeaderArea\">\n      <h5>{postcount} Anmerkung(en)\n   <!--   <p><a href=\"#embeddedforumform\">Anmerkung hinzufügen</a></p> -->\n    </div>\n    <div class=\"EmbeddedForumPosts\">\n      <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n        <tbody>\n  ','\n    <div class=\"EmbeddedForumHeaderArea\">\n      <h5 >{postcount} Anmerkung(en)</h5>\n	  <p>Hier können Sie ergänzende Informationen und Hinweise zu diesem Artikel veröffentlichen. Die Anmerkung erscheint erst nach Freigabe durch die digitalkamera.de-Redaktion.</p>\n	  <p>Sie müssen sich dafür  <a href=\"http://www.digitalkamera.de/User/Anonym/Login.aspx\">einloggen</a> oder <a href=\"http://www.digitalkamera.de/User/Anonym/NeuerBenutzer.aspx\">registrieren</a>.</p>\n     <!-- <p><a href=\"#embeddedforumform\">Anmerkung hinzufügen</a></p> -->\n    </div>\n   \n   <div class=\"EmbeddedForumPosts\">\n      <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n        <tbody>\n  ','\n    <tr class=\"EmbeddedForumPost\">\n      <td class=\"EmbeddedForumPostAvatar\"><img src=\"{postuseravatarurl}\" alt=\"{postusername}\" /></td>\n      <td class=\"EmbeddedForumPostDetails\">\n        <h5 class=\"EmbeddedForumPostAuthor\">{postusername}</h5>\n        <div class=\"EmbeddedForumPostDate\">{postdate}</div>\n      </td>\n      <td class=\"EmbeddedForumPostContent\">\n        {postbody}\n        <div class=\"EmbeddedForumPostActions\">\n          <a href=\"#\" onclick=\"window.location=\'#embeddedforumform\';{replyscript}\">Antwort</a> <!--| -->\n         <!-- <a href=\"#\" onclick=\"window.location=\'#embeddedforumform\';{reportabusescript}\">Bericht über Missbrauch</a> -->\n        <div>\n      </td>\n    </tr>\n  ','\n    <tr class=\"EmbeddedForumPostAlt\">\n      <td class=\"EmbeddedForumPostAvatar\"><img src=\"{postuseravatarurl}\" alt=\"{postusername}\" /></td>\n      <td class=\"EmbeddedForumPostDetails\">\n        <h5 class=\"EmbeddedForumPostAuthor\">{postusername}</h5>\n        <div class=\"EmbeddedForumPostDate\">{postdate}</div>\n      </td>\n      <td class=\"EmbeddedForumPostContent\">\n        {postbody}\n        <div class=\"EmbeddedForumPostActions\">\n          <a href=\"#\" onclick=\"window.location=\'#embeddedforumform\';{replyscript}\">Antwort</a> <!--| -->\n        <!--  <a href=\"#\" onclick=\"window.location=\'#embeddedforumform\';{reportabusescript}\">Bericht über Missbrauch</a> -->\n        <div>\n      </td>\n    </tr>\n  ','\n        </tbody>\n      </table>\n    </div>\n    {form}\n  <!--  <p>You are currently logged in as {username} (<a href=\"#\" onclick=\"{logoutscript}\">log out</a>).</p>-->\n  ','\n        </tbody>\n      </table>\n    </div>\n   {form}\n  ','\n    <div id=\"embeddedforumform\">\n      <div class=\"EmbeddedForumHeaderArea\">\n        <h5 class=\"EmbeddedForumHeader\">Add a Comment</h5>\n      </div>\n      <p>Please create an account to add a comment. Already have an account? <a href=\"#\" onclick=\"{loginscript}\">Log in</a>.</p>\n      <div class=\"EmbeddedForumFieldName\">User Name:</div>\n      <div class=\"EmbeddedForumField\"><input type=\"text\" id=\"{usernameid}\" /></div>\n      <div class=\"EmbeddedForumFieldName\">Email Address:</div>\n      <div class=\"EmbeddedForumField\"><input type=\"text\" id=\"{emailid}\" /></div>\n      <div class=\"EmbeddedForumFieldName\">Password:</div>\n      <div class=\"EmbeddedForumField\"><input type=\"password\" id=\"{passwordid}\" /></div>\n      <div class=\"EmbeddedForumFieldName\"><input type=\"button\" id=\"{submitid}\" value=\"Register\" onclick=\"{submitscript}\" /></div>\n    </div>\n  ','\n    <!--\n    <div id=\"embeddedforumform\">\n      <div class=\"EmbeddedForumHeaderArea\">\n        <h5 class=\"EmbeddedForumHeader\">Add a Comment</h5>\n      </div>\n      <p>Please log in to add a comment. Don\'t have an account? <a href=\"#\" onclick=\"{registerscript}\">Register now</a>.</p>\n      <div class=\"EmbeddedForumFieldName\">User Name:</div>\n      <div class=\"EmbeddedForumField\"><input type=\"text\" id=\"{usernameid}\" /></div>\n      <div class=\"EmbeddedForumFieldName\">Password:</div>\n      <div class=\"EmbeddedForumField\"><input type=\"password\" id=\"{passwordid}\" /></div>\n      <div class=\"EmbeddedForumFieldName\"><input type=\"button\" id=\"{submitid}\" value=\"Log in\" onclick=\"{submitscript}\" /></div>\n    </div>\n    -->\n  ','\n    <div id=\"embeddedforumform\">\n      <div class=\"EmbeddedForumHeaderArea\">\n        <h5>Anmerkung hinzufügen</h5>\n      </div>\n	  <div>Hier können Sie ergänzende Informationen und Hinweise zu diesem Artikel veröffentlichen. Die Anmerkung erscheint erst nach Freigabe durch die digitalkamera.de-Redaktion.</div>\n      <div class=\"EmbeddedForumField\"><textarea rows=\"10\" cols=\"40\" id=\"{bodyid}\"></textarea></div>\n      <div class=\"EmbeddedForumFieldName\"><input type=\"button\" id=\"{submitid}\" value=\"Absenden\" onclick=\"{submitscript}\" /></div>\n    </div>\n  ','\n    <div id=\"embeddedforumform\">\n      <div class=\"EmbeddedForumHeaderArea\">\n        <h5>Antwort auf einen Kommentar</h5>\n      </div>\n      <p>Antwort auf den Kommentar von <a href=\"{postuserurl}\">{postusername}</a> vom {postdate} (<a href=\"#\" onclick=\"{postscript}\">Abbruch</a>)</p>\n      <div class=\"EmbeddedForumField\"><textarea rows=\"10\" cols=\"40\" id=\"{bodyid}\"></textarea></div>\n      <div class=\"EmbeddedForumFieldName\">\n        <input type=\"button\" id=\"{submitid}\" value=\"Absenden\" onclick=\"{submitscript}\" />\n      </div>\n    </div>\n  ','\n    <div id=\"embeddedforumform\">\n      <div class=\"EmbeddedForumHeaderArea\">\n        <h5 class=\"EmbeddedForumHeader\">Report Abuse</h5>\n      </div>\n      <p>Report <a href=\"{postuserurl}\">{postusername}</a>\'s comment on {postdate} as abuse (<a href=\"#\" onclick=\"{postscript}\">cancel abuse report</a>)</p>\n      <div class=\"EmbeddedForumField\"><textarea rows=\"10\" cols=\"40\" id=\"{bodyid}\"></textarea></div>\n      <div class=\"EmbeddedForumFieldName\">\n        <input type=\"button\" id=\"{submitid}\" value=\"Submit abuse report\" onclick=\"{submitscript}\" />\n      </div>\n    </div>\n  ','Sie müssen angemeldet sein und ein  autorisiertes Konto besitzen um zu antworten oder zu kommentieren.','Ihr Kommentar ist zu lang. Bitte kürzen sie und senden Ihn wieder.','\n    .EmbeddedForumHeaderArea \n    {\n      margin: 2em 0 1em 0;\n      padding: 0;\n    } \n    \n    .EmbeddedForumHeader\n    {\n      margin: 0;\n      font-size: 130%;\n      font-weight: bold;\n      font-family: Arial, Helvetica;\n    } \n    \n    .EmbeddedForumPosts \n    {\n      font-family: Arial, Helvetica;\n      font-size: 90%;\n      border-top: solid 1px #ddd;\n    } \n    \n    .EmbeddedForumDetails \n    {\n      margin: 1em 0;\n      font-family: Arial, Helvetica;\n      font-size: 90%;\n    } \n    .EmbeddedForumPostContent blockquote { margin-left:13px; }\n    .EmbeddedForumPostContent blockquote div img { margin-left:-13px; }\n    \n    \n    .EmbeddedForumPost .EmbeddedForumPostAvatar, .EmbeddedForumPost .EmbeddedForumPostDetails, .EmbeddedForumPost .EmbeddedForumPostContent\n    { \n      border-bottom: solid 1px #ddd; \n    } \n    \n    .EmbeddedForumPostAlt .EmbeddedForumPostAvatar, .EmbeddedForumPostAlt .EmbeddedForumPostDetails, .EmbeddedForumPostAlt .EmbeddedForumPostContent\n    { \n      background-color: #f7f7f7; \n      border-bottom: solid 1px #ddd; \n    } \n    \n    .EmbeddedForumPostAvatar\n    {\n      width: 44px;\n      vertical-align: top;\n    }\n    \n    .EmbeddedForumPostAvatar img\n    {\n      width: 40px;\n      border: solid 1px #ddd;\n      padding: 1px;\n      margin: 4px;\n    }\n    \n    .EmbeddedForumPostDetails\n    {\n      white-space: nowrap;\n      vertical-align: top;\n      padding: 4px;\n      width: 25%;\n    }\n    \n    .EmbeddedForumPostAuthor \n    { \n      font-weight: bold;	\n      font-size: 100%; \n      margin: 0; \n      padding: 0;\n    } \n    \n    .EmbeddedForumPostDate \n    { \n      font-size: 90%; \n    } \n    \n    .EmbeddedForumPostContent \n    { \n      padding: 4px;\n      width: 75%;\n    } \n    \n    .EmbeddedForumPostContent p\n    {\n      margin: 0 0 1em 0;\n    }\n    \n    .EmbeddedForumPostActions\n    {\n      margin-top: 1em;\n      text-align: right;\n    }\n    \n    .EmbeddedForumFieldName \n    { \n      font-weight: bold; \n      padding: 2px 0; \n      font-family: Arial, Helvetica; \n      margin-top: 1em; \n    } \n    \n    .EmbeddedForumField \n    {	\n      padding: 2px 0; \n    }\n    \n    .EmbeddedForumField input\n    {\n      width: 33%;\n    }\n    \n    .EmbeddedForumField textarea\n    {\n      height: 10em;\n      width: 50%;\n    }\n  ');