var agt=window.navigator.userAgent.toLowerCase();var ie=(agt.indexOf("msie")!=-1)?true:false;var moz=(agt.indexOf("gekko")!=-1)?true:false;
function mkHidInput(n,v){input=top.document.createElement("input");input.type="hidden";input.name=n;input.value=v;return input;}
function sbutton(idx){sbTD=top.document.createElement("TD");sbTD.className="wtab"+idx+"0";sbImg=top.document.createElement("IMG");sbImg.src=top.clearImg;sbImg.className="wtab"+idx;sbTD.appendChild(sbImg);return sbTD;}
function disableButton(event){var event=(ie)?window.event.srcElement:event.target;event.disabled=true;}
function answer(event,id,pseudo,pvalue){
	var tgt=event=(ie)?window.event.srcElement:event.target;top.edit=true;
	a=top.document.getElementById("answer");if(a)a.parentNode.removeChild(a);
	while(!tgt.className || tgt.className!="comment-post"){tgt=tgt.parentNode;};
	fAnswer=top.document.createElement("FORM");fAnswer.style.marginLeft="30px";fAnswer.id="answer";fAnswer.action="/datas/docomment.jsp";fAnswer.target="stdfrm";fAnswer.method="post";fAnswer.enctype = "application/x-www-form-urlencoded";fAnswer.acceptCharset="UTF-8";
	if(window.attachEvent){fAnswer.attachEvent("onsubmit",ccomment);}else if(window.addEventListener){fAnswer.addEventListener("submit",ccomment,true);};
	if(top.user){fAnswer.appendChild(mkHidInput("user",top.user));};
	if(top.pId){fAnswer.appendChild(mkHidInput("gparentid",top.pId));};
	if(top.referrer){fAnswer.appendChild(mkHidInput("referrer",top.referrer));};
	if(id){fAnswer.appendChild(mkHidInput("parentid",id));};
	fAnswer.appendChild(mkHidInput("id",-1));
	fAnswer.appendChild(mkHidInput("parenttype","2"));
	fAnswer.appendChild(mkHidInput("referrer",""));
	if(top._target){fAnswer.appendChild(mkHidInput("target",top._target));};
	if(top.mailAlert){fAnswer.appendChild(mkHidInput("commentalert","on"));};
	cDiv=top.document.createElement("DIV");cDiv.className="comments";fAnswer.appendChild(cDiv);
	fDiv=top.document.createElement("DIV");fDiv.className="form";cDiv.appendChild(fDiv);
	faDiv=top.document.createElement("DIV");faDiv.className="form-area";fDiv.appendChild(faDiv);
	ul=top.document.createElement("UL");faDiv.appendChild(ul);
	liChapeau=top.document.createElement("LI");ul.appendChild(liChapeau);
	h3=top.document.createElement("H3");liChapeau.appendChild(h3);h3.appendChild(top.document.createTextNode(top._fillComment));
	if(pseudo){
	liPseudo=top.document.createElement("LI");ul.appendChild(liPseudo);
	labelPseudo=top.document.createElement("label");liPseudo.appendChild(labelPseudo);labelPseudo.appendChild(top.document.createTextNode(top._fillPseudo));
	pseudoInput=top.document.createElement("INPUT");pseudoInput.className="text";pseudoInput.name="pseudo";pseudoInput.size="45";pseudoInput.maxLength="45";if(pvalue)pseudoInput.value=pvalue;liPseudo.appendChild(pseudoInput);
	}
	liTitle=top.document.createElement("LI");ul.appendChild(liTitle);
	labelTitle=top.document.createElement("label");liTitle.appendChild(labelTitle);	labelTitle.appendChild(top.document.createTextNode(top._fillTitle));
	tinput=top.document.createElement("input");tinput.name="title";tinput.size="70";tinput.maxLength="70";tinput.className="text";liTitle.appendChild(tinput);
	liText=top.document.createElement("LI");ul.appendChild(liText);
	labelText=top.document.createElement("label");liText.appendChild(labelText);labelText.appendChild(top.document.createTextNode(top._fillAnswer));
	tArea=top.document.createElement("TEXTAREA");tArea.name="comment";liText.appendChild(tArea);	
	liValidate=top.document.createElement("LI");ul.appendChild(liValidate);
	labelCaptcha=top.document.createElement("label");liValidate.appendChild(labelCaptcha);labelCaptcha.appendChild(top.document.createTextNode(top._pleasefillcapt));
	bubbleDiv=top.document.createElement("DIV");bubbleDiv.className="inf";liValidate.appendChild(bubbleDiv);
	bubA=top.document.createElement("A");bubA.href="#";bubbleDiv.appendChild(bubA);
	bubPopup=top.document.createElement("DIV");bubPopup.className="pop-up";bubbleDiv.appendChild(bubPopup);
	bubTop=top.document.createElement("SPAN");bubTop.className="top-bg";bubTop.appendChild(top.document.createTextNode(" "));bubPopup.appendChild(bubTop);
	bubP=top.document.createElement("P");bubPopup.appendChild(bubP);
	bubTxt=top.document.createElement("SPAN");bubTxt.appendChild(top.document.createTextNode(top._humanControl));bubP.appendChild(bubTxt);
	bubBt=top.document.createElement("SPAN");bubBt.className="bt-bg";bubBt.appendChild(top.document.createTextNode(" "));bubPopup.appendChild(bubBt);
	captchaDiv=top.document.createElement("DIV");captchaDiv.className="pic";liValidate.appendChild(captchaDiv);
	captchaImg=top.document.createElement("IMG");captchaImg.src="/captcha";captchaImg.className="captimg";captchaImg.id="captimganswser";captchaDiv.appendChild(captchaImg);
	captchaInput=top.document.createElement("INPUT");captchaInput.className="text";captchaInput.type="text";captchaInput.name="captchacodes";captchaInput.value="";captchaInput.size=5;
	if(window.attachEvent){captchaInput.attachEvent("onkeydown",keySubmit);}else if(window.addEventListener){captchaInput.addEventListener("keydown",keySubmit,true);};
	liValidate.appendChild(captchaInput);
	liThx=top.document.createElement("LI");ul.appendChild(liThx);
	if(top._thxforparticipating != undefined){labelThx=top.document.createElement("label");liThx.appendChild(labelThx);labelThx.appendChild(top.document.createTextNode(top._thxforparticipating));};
	liSave=top.document.createElement("LI");ul.appendChild(liSave);
	saveButton=top.document.createElement("INPUT");saveButton.type="submit";saveButton.className="submit";saveButton.value=top._saveComment;
	if(window.attachEvent){saveButton.attachEvent("onclick",disableButton);}else if(window.addEventListener){saveButton.addEventListener("click",disableButton,true);};
	liSave.appendChild(saveButton);
	answerAlert=top.document.createElement("DIV");answerAlert.className="editoralert";answerAlert.id="bcAnswer";liSave.appendChild(answerAlert);
	iBefore=tgt.nextSibling;while(iBefore.nodeType!=1){iBefore=iBefore.nextSibling;};
	tgt.parentNode.insertBefore(fAnswer,iBefore);
}