var ch=new Array()
var ajax_loaded=1
//function emoticon(ecode,eobj,eurl){
//document.getElementById('fastreplyarea').value+=' '+ecode+' '}
function ajax_std_window_resize(pix,cid){
var box=document.getElementById('comment-edit-'+cid)
var h1=parseInt(box.style.height)? parseInt(box.style.height): 300
var h2=h1+pix
if(h2>0){
box.style.height=h2+"px"}
return false}
function ajax_cancel_for_edit(ci){
if(ch[ ci ] !=""){
document.getElementById('comment-'+ci).innerHTML=ch[ ci ]}
return false}
function ajax_save_for_edit(ei,ci){
var url=ipb_var_blog_url+'req=doxmledit&eid='+ei+'&cid='+ci
var fields=new Array()
fields['md5check']=ipb_md5_check
fields['eid']=ei
fields['cid']=ci
fields['req']='doxmledit'
fields['Post']=document.getElementById('comment-edit-'+ci).value
fields['std_used']=1
do_request_function=function(){
if(! x1.readystate_ready_and_ok()){
x1.show_loading()
return}
x1.hide_loading()
var html=x1.xmlhandler.responseText
if(html !='error'){
document.getElementById('comment-'+ci).innerHTML=html}}
x1=new ajax_request()
x1.onreadystatechange(do_request_function)
var xmlreturn=x1.process(url,'POST',x1.format_for_post(fields))
ch[ ci ]=''
return false}
function ajax_prep_for_edit(ei,ci,event){
global_cancel_bubble(event,true)
var comment_main_obj=document.getElementById('comment-main-'+ci)
var comment_box_top=_get_obj_toppos(comment_main_obj)
var url=ipb_var_blog_url+'req=xmledit&eid='+ei+'&cid='+ci
if(! ch[ ci ] || ch[ ci ]==''){
ch[ ci ]=document.getElementById('comment-'+ci).innerHTML}
try{
menu_action_close()}
catch(e){}
do_request_function=function(){
if(! x1.readystate_ready_and_ok()){
x1.show_loading()
return}
x1.hide_loading()
var html=x1.xmlhandler.responseText
if(html !='error'){
if(comment_box_top){
scroll(0,comment_box_top-30)}
document.getElementById('comment-'+ci).innerHTML=html}
else{
alert(html)}}
x1=new ajax_request()
x1.onreadystatechange(do_request_function)
x1.process(url)
return false}
function multiquote_add(id){
saved=new Array()
clean=new Array()
add=1
if(tmp=my_getcookie('mqcids')){
saved=tmp.split(",")}
for(i=0;i<saved.length;i++){
if(saved[i] !=""){
if(saved[i]==id){
add=0}
else{
clean[clean.length]=saved[i]}}}
if(add){
clean[ clean.length ]=id
eval("document.mad_"+id+".src=removequotebutton")}
else{
eval(" document.mad_"+id+".src=addquotebutton")}
my_setcookie('mqcids',clean.join(','),0)
return false}