<!--
 

var CONST_URL_WA_BLOG="wa_dyn_blog.php"
function FLOiS(bSiCf)
{
var vkOFb;
if((bSiCf.responseXML!=null)&&(bSiCf.responseXML.documentElement!=null))
{
vkOFb=bSiCf.responseXML.documentElement
}
else
{
var s=bSiCf.responseText;
var delimiter1="<?xml";
var delimiter2="</is_blogslike>";
var n1=s.indexOf(delimiter1);
if(n1>=0)
{
s=s.substring(n1);
var n2=s.lastIndexOf(delimiter2);
if(n2>0)
{
s=s.substring(0,n2+delimiter2.length);
if(typeof DOMParser!='undefined')
{
var parser=new DOMParser();
vkOFb=parser.parseFromString(s,"text/xml");
}
else
{
var OvbBc=new ActiveXObject("Microsoft.XMLDOM");
OvbBc.async=false;
if(OvbBc.loadXML(s))
{
vkOFb=OvbBc;
}
}
}
}
}
return vkOFb
}
function qRfsC(qvhUd)
{
var kLRcB=qvhUd.getElementsByTagName("result");
if(kLRcB&&(kLRcB.length>0))
{
var XZrTd=kLRcB[0].firstChild.nodeValue
return wa_evaluate(XZrTd);
}
return false;
}
function pjwHo(qvhUd)
{
var kLRcB=qvhUd.getElementsByTagName("error");
if(kLRcB&&(kLRcB.length>0))
{
var XZrTd=""+trimString(kLRcB[0].firstChild.nodeValue)
if(XZrTd.substr(0,1)=="@")
{
XZrTd=Translator.tr(XZrTd.substr(1));
}
return XZrTd;
}
var lkjRb=qRfsC(qvhUd)
if(lkjRb==false)
{
return Translator.tr("Error:Server connexion");
}
return"";
}
uendr=function(TsNjP,gYvIs,GrZOX)
{
var LFSwC=GrZOX[0]
var qvhUd=FLOiS(gYvIs)
var hZAVa=qRfsC(qvhUd) 
if(hZAVa)
WA_Dialog.alert(Translator.tr("Post message successfully"))
else
{
WA_Dialog.alert(pjwHo(qvhUd))
}
WA_refreshBlogs() 
}
wELcA=function(LFSwC,OoNQs)
{
if(document.webaca_is_preview)
{
WA_Dialog.alert(Translator.tr("Operation not allowed in preview mode"));return;
}
var w=new WA_Dialog();
w.progress()
makePOSTRequest(CONST_URL_WA_BLOG+"?action=post_comment",OoNQs,uendr,[LFSwC]);
}
XVLtV=function(TsNjP,gYvIs,GrZOX)
{
var XnsLf=GrZOX[0]
var JPSKF=GrZOX[1]
var qvhUd=FLOiS(gYvIs)
var hZAVa=qRfsC(qvhUd)
var TrQIX=XnsLf.split(',');
for(var bIrLH=0;bIrLH<TrQIX.length;bIrLH++)
{
var pTFvI=TrQIX[bIrLH]
var kLRcB=qvhUd.getElementsByTagName("counter_"+pTFvI);
if(kLRcB.length>0)
{
var XZrTd=kLRcB[0].firstChild.nodeValue;
var GxvRx=document.getElementById(JPSKF)
if(GxvRx)
{
GxvRx.innerHTML=XZrTd+" "+Translator.tr("label_message(s)")
}
}
}
}
WA_refreshBlogs=function()
{
for(var sTJxK in document.wa_global_blogs_elements)
{
WA_blog_refresh(sTJxK)
}
}
WA_blog_refresh=function(JPSKF)
{
var MkMGV=cqncr(JPSKF)
var OoNQs=""
OoNQs+="list_id="+MkMGV+"&"
makePOSTRequest(CONST_URL_WA_BLOG+"?action=refresh_counter_comments",OoNQs,XVLtV,[MkMGV,JPSKF]);
}
function XYxlK(GrZOX)
{
var LFSwC=GrZOX[0]
var w=new WA_Dialog();
w.aQAnq=function(XZrTd)
{
return XZrTd;
}
w.xlLuZ=function(LFSwC)
{
var qdFGJ=document.getElementById(LFSwC+"-blog-form")
var EadrF=[qdFGJ.author,qdFGJ.comment]
for(var i=0;i<EadrF.length;i++)
{
var TcRTJ=EadrF[i];
TcRTJ.style.backgroundColor="#ffffff"
if(TcRTJ.value.length==0)
{
TcRTJ.style.backgroundColor="#ff0000";TcRTJ.focus();return;
}
}
var OoNQs=""
OoNQs+="id_article="+cqncr(LFSwC)+"&"
OoNQs+="author="+this.aQAnq(qdFGJ.author.value)+"&"
if(qdFGJ.email)
{
OoNQs+="email="+this.aQAnq(qdFGJ.email.value)+"&"
}
OoNQs+="comments="+this.aQAnq(qdFGJ.comment.value)+"&"
wELcA(LFSwC,OoNQs)
}
w.MmtBK=function(LFSwC)
{
var bSiCf=document.wa_global_blogs_elements[LFSwC]
var ZYAqI=bSiCf.has_email
this.addButton(Translator.tr("Submit message"),this.xlLuZ,LFSwC,this) 
var css_common="font-family:Arial;"
var s_col_text=this.getColorTheme(3)
var css_label=css_common+"color:"+s_col_text+";text-decoration:none;font-weight:bold;font-size:12px;"
this.initializeWindow(500,500)
var s=""
s+="<form id='"+LFSwC+"-blog-form'>"
s+="<table border=0 cellpadding=0 cellspacing=0  style='width:90%;'>";
s+="<tr><td align=left style='"+css_label+"'>"
s+=Translator.tr("Blog author")+"<br>"
s+="<input name='author' type=text>"
s+="<br>"
s+="<br>"
s+="</td></tr>";
if(ZYAqI)
{
s+="<tr><td align=left style='"+css_label+"'>"
s+=Translator.tr("Blog url")+"<br>"
s+="<input name='email' type=text>"
s+="<br>"
s+="<br>"
s+="<br>"
s+="</td></tr>";
}
s+="<tr><td align=center style='"+css_label+"'>"
s+="<textarea name='comment' style='width:100%;height:100px;' ></textarea>"
s+="</td></tr>";
s+="</table>"
s+="</form>"
this.writeContent(s)
}
w.MmtBK(LFSwC)
}
function jcZpu(parent,name)
{
var obj=parent.getElementsByTagName(name)
if(obj&&obj.length>0)
{
var node=obj[0]
return node.getAttribute('val');
}
return "";
}
function kocGX(TsNjP,gYvIs,tbVvU)
{
var LFSwC=tbVvU[0]
var lmDOt=tbVvU[1]
var qvhUd=FLOiS(gYvIs)
var rTkOR=pjwHo(qvhUd)
if(rTkOR.length>0)
{
if(document.webaca_is_preview)
{
return;
}
lmDOt.writeContent("<span style='"+lmDOt.cssText1()+"'>"+rTkOR+" </span>")
return;
}
var doc=qvhUd
var text="";
var items=qvhUd.getElementsByTagName("OBJECT");
var css_common="font-family:Arial;"
var s_col_text=lmDOt.getColorTheme(3)
var mBKWx=""
for(i=0;i<items.length;i++)
{
var obj_comment=items[i]
var id_article=jcZpu(obj_comment,"id_article")
var comment=jcZpu(obj_comment,"comment")
var author=jcZpu(obj_comment,"author")
var created=jcZpu(obj_comment,"created")
var email=jcZpu(obj_comment,"email")
author=unescape(author)
comment=unescape(comment)
if(email=="http://") email="";
if(email.length>0)
{
var label_url=email;
var url=email;
if((email.indexOf("@")>0)&&(email.indexOf("mailto:")<0))
{
url="mailto:"+email;
label_url=email;
}
email="<a href='"+url+"' target=_blank>"+label_url+"</a>";
}
mBKWx+="<span style='"+css_common+"color:"+s_col_text+";text-decoration:none;font-size:13px;'><b>"+author+" </b></span>";
mBKWx+="<span style='"+css_common+"color:#0000ff;text-decoration:underline;font-size:13px;'>"+email+"</span> ";
mBKWx+="<span style='"+css_common+"color:#0000ff;text-decoration:none;font-size:11px;'>"+created+" </span>";
mBKWx+="<br>";
mBKWx+="<span style='"+css_common+"color:"+s_col_text+";font-size:13px;'>"+comment+" </span>";
if(i<items.length-1)
{
mBKWx+="<hr>";
}
}
if(items.length==0)
{
mBKWx+="<span style='"+lmDOt.cssText1()+"'>"+Translator.tr("No comments in this blog!")+" </span>"
}
lmDOt.writeContent(mBKWx)
}
function cqncr(JPSKF)
{
var bSiCf=document.wa_global_blogs_elements[JPSKF]
return bSiCf.id_blog
}
function WA_blog(JPSKF)
{
var w=new WA_Dialog();
w.MmtBK=function(JPSKF)
{
this.addButton(Translator.tr("Send a message"),XYxlK,[JPSKF])
this.initializeWindow(650,900) 
var mess="Loading messages...."
if(document.webaca_is_preview)
{
mess=Translator.tr("Operation not allowed in preview mode");
}
var s=""
s+="<table border=0 cellpadding=0 cellspacing=0  style='width:100%;'><tr>";
s+="<td align=center style='"+this.cssText1()+"'>"
s+=mess
s+="</td></tr></table>"
this.writeContent(s)
var OoNQs="";
OoNQs+="list_id="+cqncr(JPSKF)
if(document.webaca_is_preview!=true)
{
makePOSTRequest(CONST_URL_WA_BLOG+"?action=get_comments",OoNQs,kocGX,[JPSKF,this]);
}
}
w.MmtBK(JPSKF)
}

-->
