function IndustryNewsPostComment(i){var l=$("IndustryNews_contentView"+i);var g=$("IndustryNews_commentName"+i);if(l.value.blank()){alert(JsLabel["js.PostComment.Error.CommentEmpty.Text"]);l.focus();return}if(!check_size(l,2000)){return}var h='<div width="100%" style="background-color: white; text-align:center; padding-top: 50px; height: 200px"><div id="lightBox_industryNewsCommentSubmit" class="IndustryNewsLightBox">'+JsLabel["js.PostComment.Submiting.Text"]+"";h+="</div></div>";displayLightBox(JsLabel["js.PostComment.Title.Text"],h);var j=getQueryVariable().get("id");var k={contentView:l.value,id:j,contactid:g.value};new Ajax.Request("/Service/IndutriesNewsCommentSubmit.html",{method:"post",parameters:k,onSuccess:function(a){if(a.responseText.strip()=="COMMENT_SENT"){$("lightBox_industryNewsCommentSubmit").innerHTML="<center>"+JsLabel["js.PostComment.Successful.Text"]+'<div class="OKbutton" onclick="location.href = location.pathname + location.search;">'+JsLabel["js.PostComment.Button.OK.Text"]+"</div></center>"}else{alert("There are some error on submitting the form")}}})}function BlogPostComment(i){var l=$("Blog_contentView"+i);var g=$("Blog_commentName"+i);if(l.value.blank()){alert(JsLabel["js.PostComment.Error.CommentEmpty.Text"]);l.focus();return}if(!check_size(l,2000)){return}var h='<div width="100%" style="background-color: white; text-align:center; padding-top: 50px; height: 200px"><div id="lightBox_BlogCommentSubmit" class="DiscussionLightBox">'+JsLabel["js.PostComment.Submiting.Text"]+"";h+="</div></div>";displayLightBox(JsLabel["js.PostComment.Title.Text"],h);var j=getQueryVariable().get("id");var k={contentView:l.value,id:j,contactid:g.value};new Ajax.Request("/Service/BlogCommentSubmit.html",{method:"post",parameters:k,onSuccess:function(a){if(a.responseText.strip()=="COMMENT_SENT"){$("lightBox_BlogCommentSubmit").innerHTML="<center>"+JsLabel["js.PostComment.Successful.Text"]+'<div class="OKbutton" onclick="location.href = location.pathname + location.search;">'+JsLabel["js.PostComment.Button.OK.Text"]+"</div></center>"}else{alert("There are some error on submitting the form")}}})}function DiscussionPostComment(i){var l=$("Discussion_contentView"+i);var g=$("Discussion_commentName"+i);if(l.value.blank()){alert(JsLabel["js.PostComment.Error.CommentEmpty.Text"]);l.focus();return}if(!check_size(l,2000)){return}var h='<div width="100%" style="background-color: white; text-align:center; padding-top: 50px; height: 200px"><div id="lightBox_DiscussionCommentSubmit" class="DiscussionLightBox">'+JsLabel["js.PostComment.Submiting.Text"]+"";h+="</div></div>";displayLightBox(JsLabel["js.PostComment.Title.Text"],h);var j=getQueryVariable().get("id");var k={contentView:l.value,id:j,contactid:g.value};new Ajax.Request("/Service/DiscussionCommentSubmit.html",{method:"post",parameters:k,onSuccess:function(a){if(a.responseText.strip()=="COMMENT_SENT"){$("lightBox_DiscussionCommentSubmit").innerHTML="<center>"+JsLabel["js.PostComment.Successful.Text"]+'<div class="OKbutton" onclick="location.href = location.pathname + location.search;">'+JsLabel["js.PostComment.Button.OK.Text"]+"</div></center>"}else{alert("There are some error on submitting the form")}}})}function AskTheExpertPostComment(i){var l=$("AskTheExpert_contentView"+i);var g=$("AskTheExpert_commentName"+i);if(l.value.blank()){alert(JsLabel["js.PostComment.Error.CommentEmpty.Text"]);l.focus();return}if(!check_size(l,2000)){return}var h='<div width="100%" style="background-color: white; text-align:center; padding-top: 50px; height: 200px"><div id="lightBox_AskTheExpertCommentSubmit" class="AskTheExpertLightBox">'+JsLabel["js.PostComment.Submiting.Text"]+"";h+="</div></div>";displayLightBox(JsLabel["js.PostComment.Title.Text"],h);var j=getQueryVariable().get("id");var k={contentView:l.value,id:j,contactid:g.value};new Ajax.Request("/Service/AskTheExpertCommentSubmit.html",{method:"post",parameters:k,onSuccess:function(a){if(a.responseText.strip()=="COMMENT_SENT"){$("lightBox_AskTheExpertCommentSubmit").innerHTML="<center>"+JsLabel["js.PostComment.Successful.Text"]+'<div class="OKbutton" onclick="ReloadPage();">'+JsLabel["js.PostComment.Button.OK.Text"]+"</div></center>"}else{alert("There are some error on submitting the form")}}})}function AskTheExpertShowPostBox(c){var d=$("AskTheExpert_container"+c);displayLightBox(JsLabel["js.PostQuestion.Title.Text"],d.innerHTML.gsub(/\$tid/,""),550)}function AskTheExpertPostQuestion(t){var m=$("AskTheExpert_contentView_question"+t);var q=$("asktheexpert_postnew_name"+t);if(m.value.blank()){alert(JsLabel["js.PostQuestion.Error.ContentEmpty.Text"]);m.focus();return}var l=$("AskTheExpert_contentView_Title"+t);if(l.value.blank()){alert(JsLabel["js.PostQuestion.Error.TitleEmpty.Text"]);l.focus();return}if(!check_size(m,2000)){return}var s=document.forms["asktheexpertpostQuestion"+t];if(s==null){alert("null");return}var i=s["asktheexpertCategory"+t];var r=new Array();for(var o=0;o<i.length;o++){if(i[o].checked){r[r.length]=i[o].value}}if(r.length==0){alert(JsLabel["js.PostQuestion.Error.CatagoryEmpty.Text"]);return}var n='<div width="100%" style="background-color: white; text-align:center; padding-top: 50px; height: 200px"><div id="lightBox_AskTheExpertCommentSubmit" class="AskTheExpertLightBox">'+JsLabel["js.PostComment.Submiting.Text"]+"";n+="</div></div>";var p={contentView:m.value,cat:r.join(","),title:l.value,contactid:q.value};displayLightBox(JsLabel["js.PostQuestion.Title.Text"],n);new Ajax.Request("/Service/AskTheExpertQuestionSubmit.html",{method:"post",parameters:p,onSuccess:function(a){if(a.responseText.strip()!=""){$("lightBox_AskTheExpertCommentSubmit").innerHTML="<center>"+JsLabel["js.PostQuestion.Successful.Text"]+' <div class="OKbutton" onclick="location.href = \'/'+info.lang+"/BlogAndDiscussion/AskTheExpert/Detail.html?id="+a.responseText.strip()+"';\">"+JsLabel["js.PostQuestion.Button.OK.Text"]+"</div></center>"}else{alert("There are some error on submitting the form")}}})};
