var imageTag=false;var theSelection=false;var clientPC=navigator.userAgent.toLowerCase();var clientVer=parseInt(navigator.appVersion);var is_ie=((clientPC.indexOf("msie")!=-1)&&(clientPC.indexOf("opera")==-1));var is_nav=((clientPC.indexOf('mozilla')!=-1)&&(clientPC.indexOf('spoofer')==-1)&&(clientPC.indexOf('compatible')==-1)&&(clientPC.indexOf('opera')==-1)&&(clientPC.indexOf('webtv')==-1)&&(clientPC.indexOf('hotjava')==-1));var is_moz=0;var is_win=((clientPC.indexOf("win")!=-1)||(clientPC.indexOf("16bit")!=-1));var is_mac=(clientPC.indexOf("mac")!=-1);b_help="Chữ đậm : text (ctrl+b)";i_help="Chữ nghiêng : text (ctrl+i)";u_help="Gạch dưới : text (ctrl+u)";q_help="12345 :
123
text
(ctrl+q)";c_help="Hiển thị 123 :
123
code
(ctrl+c)";l_help="Danh sách : (ctrl+l)";o_help="Sắp xếp danh sách : [list=]text[/list] (ctrl+o)";p_help="Chèn hình ảnh : ";w_help="Chèn URL : http://url or URL text (ctrl+w)";a_help="Đóng tất cả các thẻ bbCode đang mở";s_help="Màu font : text Có thể dùng color=#FF0000";f_help="Kích thước font : [size=x-small]small text[/size]";k_help="Scroll text: text (ctrl+k)";e_help="Fade text: text (ctrl+e)";r_help="Blur text: text (ctrl+r)";j_help="Flip text h: text  (ctrl+j)";v_help="Flip text v: text  (ctrl+v)";m_help="Text align left:
text
(ctrl+m)";d_help="Updown text: text (ctrl+d)";t_help="Text align center:
text
(ctrl+t)";g_help="Text align right:
text
(ctrl+g)";x_help="Strike text: text (ctrl+x)";y_help="Host an image";z_help="Insert a smiley in your message";h_help="Visible text by those who have posted in this topic :
text
(ctrl+h)";sp_help="Hidden text can be displayed by clicking on it :
123
 
(ctrl+o)";wo_help="A World of Warcraft object : ";ft_help="Text font : text";jt_help="Justify text :
text
(ctrl+j)";sub_help="Put as index: text (ctrl+m)";sup_help="Put as exponent: text (ctrl+n)";tab_help="Insert a table";hr_help="Insert a line break : text
text";fl_help="Insert flash : [flash(width,length)]url[/flash]";vd_help="Insert a video (youtube, dailymotion)";_help="";bbcode=new Array();bbtags=new Array('','','','','','','
123
','
','
123
','
','','
  1. ','
','','[url]','[/url]','','','','','','','',' ','',' ','','','
','
','
','
','','','[embed-flash(width,height)]','[/embed-flash]');bbtags[40]='
';bbtags[41]='
';bbtags[42]='
123
 
';bbtags[44]='';bbtags[46]='
';bbtags[47]='
';bbtags[48]='';bbtags[49]='';bbtags[50]='';bbtags[51]='';bbtags[52]='
';bbtags[53]='
';bbtags[54]='';bbtags[55]='
';bbtags[56]='
';bbtags[58]='[tr]';bbtags[59]='[/tr]';bbtags[60]='[td]';bbtags[61]='[/td]';var selectId=new Array('px','color','font','other','table_gui','flash','url','img','servimg_upload_gui','video','sel_smilies','dices','wpx','wcolor','wfont','wother','wtable_gui','wflash','wurl','wimg','wservimg_upload_gui','wvideo','wsel_smilies','wdices');imageTag=false;function helpline(help){if(help.length<5){document.getElementById('helpbox').innerHTML=eval(help+"_help")}else{document.getElementById('helpbox').innerHTML=help}}function getarraysize(thearray){for(i=0;i';text=' '+text+' ';parent.vB_Editor['text_editor'].insert_text(text,false)}}}else{text=' '+text+' ';if(parent.document.forms['post'].message.createTextRange&&parent.document.forms['post'].message.caretPos){var caretPos=parent.document.forms['post'].message.caretPos;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==' '?text+' ':text;parent.document.forms['post'].message.focus()}else{parent.document.forms['post'].message.value+=text;parent.document.forms['post'].message.focus()}}}function emoticonw(text){text=' '+text+' ';if(opener.document.forms['post'].message.createTextRange&&opener.document.forms['post'].message.caretPos){var caretPos=opener.document.forms['post'].message.caretPos;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==' '?text+' ':text;opener.document.forms['post'].message.focus()}else{opener.document.forms['post'].message.value+=text;opener.document.forms['post'].message.focus()}}function constructBBcode(bbcode,args,content){var textarea=document.post.message;var i=0;var tmp_args='';var tmp_content='';if(bbcode=='flash'||bbcode=='img'||(bbcode=='url'&&document.getElementById(content).value!='')){tmp_content+=document.getElementById(content).value}else{tmp_content+=document.getElementById(args[0]).value}if(bbcode=='flash'){if(document.getElementById(args[0]).value>0&&document.getElementById(args[1]).value>0){tmp_args+='('+document.getElementById(args[0]).value+','+document.getElementById(args[1]).value+')'}}else{if(bbcode=='url'&&document.getElementById(args[0]).value!=''){tmp_args+='=';if(document.getElementById(args[0]).value.indexOf('www.')==0){document.getElementById(args[0]).value='http://'+document.getElementById(args[0]).value}}while(i=4)&&is_ie&&is_win){theSelection=document.selection.createRange().text;if(!theSelection){txtarea.value+=bbopen+bbclose;txtarea.focus();return}document.selection.createRange().text=bbopen+theSelection+bbclose;txtarea.focus();return}else if(txtarea.selectionEnd&&(txtarea.selectionEnd-txtarea.selectionStart>0)){mozWrap(txtarea,bbopen,bbclose);return}else{txtarea.value+=bbopen+bbclose;txtarea.setSelectionRange(txtarea.value.length-bbclose.length,txtarea.value.length-bbclose.length);txtarea.focus()}storeCaret(txtarea)}function bbstyle(bbnumber){var txtarea=document.post.message;var button=document.getElementById('addbbcode'+bbnumber);if(bbnumber!=-1){var tag=document.getElementById('addbbcode'+bbnumber).tagName}donotinsert=false;theSelection=false;bblast=0;if(bbnumber==-1){while(bbcode[0]){butnumber=arraypop(bbcode)-1;txtarea.value+=bbtags[butnumber+1];var tag=document.getElementById('addbbcode'+butnumber).tagName;if(tag=='INPUT'){buttext=eval('document.post.addbbcode'+butnumber+'.value');eval('document.post.addbbcode'+butnumber+'.value ="'+buttext.substr(0,(buttext.length-1))+'"')}else if(tag=='BUTTON'&&document.getElementById('addbbcode'+butnumber)){document.getElementById('addbbcode'+butnumber).className='button2'}}imageTag=false;txtarea.focus();return}if((clientVer>=4)&&is_ie&&is_win){theSelection=document.selection.createRange().text;if(theSelection){document.selection.createRange().text=bbtags[bbnumber]+theSelection+bbtags[bbnumber+1];txtarea.focus();theSelection='';return}}else if(txtarea.selectionEnd&&(txtarea.selectionEnd-txtarea.selectionStart>0)){mozWrap(txtarea,bbtags[bbnumber],bbtags[bbnumber+1]);return}for(i=0;i'+smilieoptions[smilieid][1]+' '}smilies_content+='';div.innerHTML=smilies_content}}overFlowX=cd['x']+div.offsetWidth-document.body.offsetWidth;cd['x']=overFlowX>0?cd['x']-overFlowX:cd['x'];div.style.left=cd['x']+'px';div.style.top=(cd['y']+h)+'px'}else{div.style.visibility='hidden'}}function mozWrap(txtarea,open,close){var selLength=txtarea.textLength;var selStart=txtarea.selectionStart;var selEnd=txtarea.selectionEnd;if(selEnd==1||selEnd==2)selEnd=selLength;var s1=(txtarea.value).substring(0,selStart);var s2=(txtarea.value).substring(selStart,selEnd);var s3=(txtarea.value).substring(selEnd,selLength);txtarea.value=s1+open+s2+close+s3;return}function storeCaret(textEl){if(textEl.createTextRange)textEl.caretPos=document.selection.createRange().duplicate()}var html=document.getElementsByTagName('html');var document_dir='ltr';for(var i=0;i=window_width){mouse_x-=10}vari.style.left=mouse_x+'px'}function insert_search_menu(session_id){session_input=(session_id?'':'');session_id=(session_id?'?sid='+session_id:'');url_search=window.url_search||'/search.forum';document.write('')}function insert_search_menu_new(session_id){session_input=(session_id?'':'');session_id=(session_id?'?sid='+session_id:'');url_search=window.url_search||'/search.forum';document.write('')}function insert_plus_menu(search_where,session_id,add_favourite){var favourite='';session_id=(session_id?'&sid='+session_id:'');if(add_favourite){favourite=search_where.replace(new RegExp("f([0-9]*)(&|&)t=([0-9]*)","g"),'$3');url_favourite=window.url_favourite||('/search.forum?search_id=favouritesearch&add_favourite='+favourite+session_id);favourite='Add to your favourites
'}search_where='&search_where='+search_where;url_newposts=window.url_newposts||('/search.forum?search_id=newposts'+search_where+session_id);url_egosearch=window.url_egosearch||('/search.forum?search_id=egosearch'+search_where+session_id);url_unanswered=window.url_unanswered||('/search.forum?search_id=unanswered'+search_where+session_id);url_watchsearch=window.url_watchsearch||('/search.forum?search_id=watchsearch'+search_where+session_id);url_tellfriend=window.url_tellfriend||('/tell_friend.forum?f='+search_where+session_id);document.write('123
')}function insert_plus_menu_new(search_where,session_id,add_favourite,watch_topic){var watch='';if(watch_topic){watch=watch_topic+'
'}var favourite='';session_id=(session_id?'&sid='+session_id:'');if(add_favourite){favourite=search_where.replace(new RegExp("f([0-9]*)(&|&)t=([0-9]*)","g"),'$3');url_favourite=window.url_favourite||('/search.forum?search_id=favouritesearch&add_favourite='+favourite+session_id);favourite='Add to your favourites
'}search_where='&search_where='+search_where;url_newposts=window.url_newposts||('/search.forum?search_id=newposts'+search_where+session_id);url_egosearch=window.url_egosearch||('/search.forum?search_id=egosearch'+search_where+session_id);url_unanswered=window.url_unanswered||('/search.forum?search_id=unanswered'+search_where+session_id);url_watchsearch=window.url_watchsearch||('/search.forum?search_id=watchsearch'+search_where+session_id);url_tellfriend=window.url_tellfriend||('/tell_friend.forum?f='+search_where+session_id);document.write('123
')}function insert_plus_album(search_where,session_id){session_id=(session_id?'&sid='+session_id:'');document.write('123
')}function insert_plus_album_new(search_where,session_id){session_id=(session_id?'&sid='+session_id:'');document.write('123
')}function insert_plus_pic(search_where,session_id){session_id=(session_id?'&sid='+session_id:'');document.write('123
')}function insert_plus_pic_new(search_where,session_id){session_id=(session_id?'&sid='+session_id:'');document.write('123
')}function link_bbcode(){intext="[url="+self.location.href+"]"+window.document.title+"[/url]";if(document.all&&!window.opera){window.clipboardData.setData('Text',intext)}else{prompt('',intext)}}function ShowHideLayer(layer_open,layer_close){if(layer_open!=''){expandLayer(layer_open)}if(layer_close!=''){expandLayer(layer_close)}}function ShowHideMenu(layer_open,layer_close,page_id,new_class){if(layer_open!=''){expandLayer(layer_open)}if(layer_close!=''){expandLayer(layer_close)}if(document.getElementById(page_id).className==new_class){document.getElementById(page_id).className=''}else{document.getElementById(page_id).className=new_class}}function expandLayer(name){var itm=null;if(document.getElementById){itm=document.getElementById(name)}else if(document.all){itm=document.all[name]}else if(document.layers){itm=document.layers[name]}if(!itm){}else if(itm.style){if(itm.style.display=="none"){itm.style.display=""}else{itm.style.display="none"}}else{itm.visibility="show"}}function fa_endpage(){if(parent.wbo1_ferme)wbo1_ferme()}function hdr_ref(object){if(document.getElementById){return document.getElementById(object)}else if(document.all){return eval('document.all.'+object)}else{return false}}function hdr_expand(object){var object=hdr_ref(object);if(!object.style){return false}else{object.style.display=''}if(window.event){window.event.cancelBubble=true}}function hdr_contract(object){var object=hdr_ref(object);if(!object.style){return false}else{object.style.display='none'}if(window.event){window.event.cancelBubble=true}}function hdr_toggle(object,open_close,open_icon,close_icon){var object=hdr_ref(object);var icone=hdr_ref(open_close);if(!object.style){return false}if(object.style.display=='none'){object.style.display='';icone.src=close_icon}else{object.style.display='none';icone.src=open_icon}}function select_switch_col(nomchamp){for(i=0;i
'+string+'
';renderedElement=document.body.insertBefore(element,document.body.firstChild);renderedWidth=renderedElement.offsetWidth;renderedHeight=renderedElement.offsetHeight;renderedElement.style.top=(y+10)+'px';renderedElement.style.left=(x+10)+'px';var window_width=document.getElementById('content')?document.getElementById('content').offsetWidth:((document.body)?document.body.clientWidth:window.innerWidth);while(parseInt(renderedElement.style.left)+renderedElement.offsetWidth>=window_width){renderedElement.style.left=(parseInt(renderedElement.style.left)-10)+'px'}if(agt.indexOf('gecko')!=-1&&agt.indexOf('win')!=-1){setTimeout("renderedElement.style.visibility = 'visible'",1)}else{renderedElement.style.visibility='visible'}}function destroyTitle(){if(document.body.firstChild!=originalFirstChild){document.body.removeChild(document.body.firstChild)}}function my_getcookie(name){cname=name+'=';cpos=document.cookie.indexOf(cname);if(cpos!=-1){cstart=cpos+cname.length;cend=document.cookie.indexOf(";",cstart);if(cend==-1){cend=document.cookie.length}return unescape(document.cookie.substring(cstart,cend))}return null}function my_setcookie(name,value,sticky,path){expires="";domain="";if(sticky){expires="; expires=Wed, 1 Jan 2020 00:00:00 GMT"}if(!path){path="/"}document.cookie=name+"="+value+"; path="+path+expires+domain+';'}function expandAllLayer(name,open_close,layer_open_close){var itm=null;if(document.getElementById){itm=document.getElementById(name)}else if(document.all){itm=document.all[name]}else if(document.layers){itm=document.layers[name]}if(!itm){}else if(itm.style){if(itm.style.display=="none"){if((open_close=="open"&&layer_open_close=="open")||(open_close=="close"&&layer_open_close=="close")){itm.style.display=""}}else{if((open_close=="close"&&layer_open_close=="open")||(open_close=="open"&&layer_open_close=="close")){itm.style.display="none"}}}else{itm.visibility="show"}}function check(action,formname){var formnamevalue=document.forms[arguments[1]];field=formnamevalue.elements.length;switch(action){case"select":for(i=0;i'}function insertChatBoxNew(chatbox_id,chatbox_url){document.getElementById(chatbox_id).innerHTML=''}function insertChatBoxPopup(chatbox_url,l_chatbox_join){document.getElementById('chatbox_popup').innerHTML='[ '+l_chatbox_join+' ]'}function showMenu(user_id,user_name,my_user_id,my_chat_level,my_user_level,user_chat_level,user_level,event,sid){if(document.getElementById('chatbox_contextmenu')){hideMenu();return false}var connected=false;if(document.forms[0].elements["message"]){connected=true}if(document.all){mouseX=window.event.clientX+document.body.scrollLeft;mouseY=window.event.clientY+document.body.scrollTop}else{mouseX=event.clientX+window.scrollX;mouseY=event.clientY+window.scrollY}var div=document.createElement('div');div.setAttribute('id','chatbox_contextmenu');div.style.display='block';div.style.top=mouseY+'px';var window_width=0;if(document.getElementById('content')){window_width=document.getElementById('content').offsetWidth}else{window_width=(document.body)?document.body.clientWidth:window.innerWidth}var div_style_width=120;mouseX=parseInt(mouseX);while(div_style_width+mouseX>=window_width){mouseX-=10}div.style.left=mouseX+'px';div.style.position='absolute';var p=document.createElement('p');p.setAttribute('class','close');p.setAttribute('className','close');var title_name=' '+((user_name.length>9)?user_name.substr(0,9)+'...':user_name);var close=document.createElement('img');close.onclick=new Function('hideMenu();');close.setAttribute('src','http://illiweb.com/fa/cross.png');close.setAttribute('alt','Đóng cửa sổ này');p.appendChild(document.createTextNode(title_name));p.appendChild(close);div.appendChild(p);var p=document.createElement('p');p.onmouseover=new Function('this.className="hover";');p.onmouseout=new Function('this.className="";');var link=document.createElement('a');link.appendChild(document.createTextNode("View the profile"));link.setAttribute('href','/u'+user_id);link.setAttribute('target','profile');link.onclick=new Function("hideMenu();");p.appendChild(link);div.appendChild(p);var p=document.createElement('p');p.onmouseover=new Function('this.className="hover";');p.onmouseout=new Function('this.className="";');var link=document.createElement('a');link.appendChild(document.createTextNode("Send a PM"));link.setAttribute('href','/privmsg?mode=post&u='+user_id);link.setAttribute('target','profile');link.onclick=new Function("hideMenu();");p.appendChild(link);div.appendChild(p);if(document.forms[0].elements["message"]&&my_chat_level==2){user_name=user_name.replace(/\\/g,"\\\\");user_name=user_name.replace(/\'/g,"\\'");if(user_chat_level!=2){var p=document.createElement('p');p.onmouseover=new Function('this.className="hover";');p.onmouseout=new Function('this.className="";');var link=document.createElement('a');link.appendChild(document.createTextNode("kick from chat"));link.setAttribute('href','javascript:void(0)');link.onclick=new Function("return action_user('kick', '"+user_name+"', '"+sid+"');");p.appendChild(link);div.appendChild(p);var p=document.createElement('p');p.onmouseover=new Function('this.className="hover";');p.onmouseout=new Function('this.className="";');var link=document.createElement('a');link.appendChild(document.createTextNode("Ban from chat"));link.setAttribute('href','javascript:void(0)');link.onclick=new Function("return action_user('ban','"+user_name+"', '"+sid+"');")}p.appendChild(link);div.appendChild(p);if(my_user_level==1&&user_chat_level==2&&user_level!=1){var p=document.createElement('p');p.onmouseover=new Function('this.className="hover";');p.onmouseout=new Function('this.className="";');var link=document.createElement('a');link.appendChild(document.createTextNode("Remove moderation"));link.setAttribute('href','javascript:void(0)');link.onclick=new Function("return action_user('unmod','"+user_name+"', '"+sid+"');");p.appendChild(link);div.appendChild(p)}else if(my_user_level==1&&user_chat_level!=2){var p=document.createElement('p');p.onmouseover=new Function('this.className="hover";');p.onmouseout=new Function('this.className="";');var link=document.createElement('a');link.appendChild(document.createTextNode("Add to moderators"));link.setAttribute('href','javascript:void(0)');link.onclick=new Function("return action_user('mod','"+user_name+"', '"+sid+"');");p.appendChild(link);div.appendChild(p)}}if(connected&&user_id==my_user_id){var p=document.createElement('p');p.onmouseover=new Function('this.className="hover";');p.onmouseout=new Function('this.className="";');var link=document.createElement('a');link.appendChild(document.createTextNode("Away"));link.setAttribute('href','javascript:void(0)');link.onclick=new Function("return action_user('away', prompt('Reason',''), '"+sid+"');");p.appendChild(link);div.appendChild(p);var p=document.createElement('p');p.onmouseover=new Function('this.className="hover";');p.onmouseout=new Function('this.className="";');var link=document.createElement('a');link.appendChild(document.createTextNode("Log off"));link.setAttribute('href','javascript:void(0)');link.onclick=new Function("hideMenu();return CB_disconnect();");p.appendChild(link);div.appendChild(p)}document.body.appendChild(div);return false}function action_user(cmd,user_name,sid){if(user_name==null)user_name='';document.forms[0].elements["message"].value='/'+cmd+' '+user_name;submitmsg(params);hideMenu();return false}function hideMenu(){document.getElementById('chatbox_contextmenu').parentNode.removeChild(document.getElementById('chatbox_contextmenu'))}function js_urlencode(text){text=text.toString();var matches=text.match(/[\x90-\xFF]/g);if(matches){for(var matchid=0;matchid/*stop_refresh*/',0)!=-1){clearInterval(parent.frames['ekran'].Interval);parent.frames['ekran'].refreshing=false;var title_params=(params=='')?'?page=front':params+'&page=front';parent.frames['title'].location.href='/chatbox/chatbox_title.forum'+title_params;parent.frames['sender'].location.href='/chatbox/messenger_send.forum'+title_params}else{if(parent.frames['ekran'].refreshing==false){parent.frames['ekran'].Interval=setInterval('parent.frames[\'ekran\'].refresh_chatbox()',8000);parent.frames['ekran'].refreshing=true}}}};http_request.open('GET','/chatbox/generate_messages.forum'+params,true);http_request.send(null)}function ajax_submit_chatbox(params){var data='&nick='+js_urlencode(document.post.nick.value);data+='&sent='+js_urlencode(document.post.sent.value);data+='&sbold='+document.post.sbold.value;data+='&sitalic='+document.post.sitalic.value;data+='&sunderline='+document.post.sunderline.value;data+='&sstrike='+document.post.sstrike.value;data+='&scolor='+document.post.scolor.value;if(document.post.sent.value=='/banlist'){window.open('/chatbox/chatbox_banlist.forum'+params,'color','toolbar=no,menubar=no,personalbar=no,width=450,height=300,scrollbars=no,resizable=yes');return false}if(window.XMLHttpRequest){var http_request_submit=new XMLHttpRequest()}else if(window.ActiveXObject){var http_request_submit=new ActiveXObject("Microsoft.XMLHTTP")}http_request_submit.onreadystatechange=function(){if(http_request_submit.readyState==4&&http_request_submit.status==200){ajax_refresh_chatbox(params);ajax_refresh_chatterlist(params)}};http_request_submit.open('POST','/chatbox/generate_messages.forum'+params,true);http_request_submit.setRequestHeader('Content-Type','application/x-www-form-urlencoded;');http_request_submit.send(data)}function ajax_refresh_chatterlist(params){if(window.XMLHttpRequest){var http_request_list=new XMLHttpRequest()}else if(window.ActiveXObject){var http_request_list=new ActiveXObject("Microsoft.XMLHTTP")}http_request_list.onreadystatechange=function(){if(http_request_list.readyState==4&&http_request_list.status==200){var parsed_text=http_request_list.responseText;if(parent.frames['who'].document.getElementById('chatter_rows')){parent.frames['who'].document.getElementById('chatter_rows').innerHTML=parsed_text}}};http_request_list.open('GET','/chatbox/generate_chatterlist.forum'+params,true);http_request_list.send(null)}function insert_chatboxsmilie(smilie_code){opener.document.getElementById('message').value=opener.document.getElementById('message').value+smilie_code;opener.document.post.message.focus();window.close()}function change_display_by_icon(element,element_id,content_more,content_less,display_special){element.className=(element.className=="icon_less")?"icon_more":"icon_less";element.style.background='url(\''+((element.className=="icon_less")?'http://illiweb.com/fa/i/tabs_less.gif':'http://illiweb.com/fa/i/tabs_more.gif')+'\') no-repeat';if(content_more||content_less){element.innerHTML=(element.className=="icon_less")?content_less:content_more}if(!display_special){display_special='block'}document.getElementById(element_id).style.display=((element.className=="icon_more")?'none':display_special);my_setcookie('display_sql_info',element.className)}function switchuploadaddress(file){if(file){document.getElementById('upfile').style.display='inline';document.getElementById('upurl').style.display='none'}else{document.getElementById('upfile').style.display='none';document.getElementById('upurl').style.display='inline'}}function do_mark(mode,type){if(type==2){if(mode==7){for(i=0;i ',false)}else{parent.vB_Editor['vB_Editor_001'].insert_text(smilie_code+' ',false)}}function unban_user(user,id){opener.fetch_object('message').value='/unban '+user;opener.submitmsg();document.getElementById(id).style.display='none'}function checkmodcp(action){field=document.modcp.elements.length;switch(action){case"select":for(i=0;i1){for(var i=0;i'+''+google_ads[i].line1+'
'+''+google_ads[i].line2+'
'+''+google_ads[i].line3+'
'+'
'+google_ads[i].visible_url+'
'}}else if(google_num_ads==1){var i=0;narrowAds+=''}if(google_num_ads>0){if(narrowAds!=""){narrowAds=narrowAds+''+'
Ads by Google
'}}if(document.getElementById("narrow_ad_unit")){document.getElementById("narrow_ad_unit").innerHTML=narrowAds}}function set_solved(input,str){if(input){var title=input.value;var reg=new RegExp("\\"+str,"g");input.value=(reg.test(title))?title.replace(reg,''):str+title}}function bbstyle_table(){var nb_row=document.getElementById('table_gui_lines').value;var nb_cols=document.getElementById('table_gui_cols').value;if(nb_row>0&&nb_cols>0){var txtarea=document.post.message;if(nb_row>100){nb_row=100}if(nb_cols>100){nb_cols=100}var content="\n";for(var i=0;i\n";for(var j=0;j "}content+="\n"}content+="\n
";if((clientVer>=4)&&is_ie&&is_win){theSelection=document.selection.createRange().text;if(theSelection){document.selection.createRange().text=content;txtarea.focus();theSelection='';return}else{txtarea.value+=content}}else{var selLength=txtarea.textLength;var selStart=txtarea.selectionStart;var selEnd=txtarea.selectionEnd;if(selEnd==1||selEnd==2)selEnd=selLength;var s1=(txtarea.value).substring(0,selStart);var s2=(txtarea.value).substring(selStart,selEnd);var s3=(txtarea.value).substring(selEnd,selLength);txtarea.value=s1+content+s3}txtarea.focus();document.getElementById('table_gui_lines').value='';document.getElementById('table_gui_cols').value='';return}}function display_upload_servimg(button,account,id,f){var container=document.getElementById('servimg_upload_gui');if(!document.getElementById('obj_servimg')){container.innerHTML='

'}var div=document.getElementById('servimg_upload_gui');var visible=div.style.visibility;if(visible=='hidden'){var window_w=(document.body)?document.body.clientWidth:window.innerWidth;var cd=FindXY(button);var h=button.offsetHeight;var i=0;while(i

'}var div=document.getElementById('servimg_upload_gui');var visible=div.style.visibility;if(visible=='hidden'){var window_w=(document.body)?document.body.clientWidth:window.innerWidth;var cd=FindXY(button);var h=button.offsetHeight;var i=0;while(igw_window.offsetHeight){gw_window.style.top=curY-10-gw_window.offsetHeight+"px"}else{gw_window.style.top=curY+offsety+distY-gw_window.offsetHeight+"px"}}else{gw_window.style.top=curY+offsety+"px"}}var elem;var divHeight;var mouseX;var mouseY;function returnNumber(str){var result='';for(i=0;i=0&&(str.charAt(i)*1)<=9)result+=str.charAt(i);else return result*1}return result*1}function resizeElement(event,id){var el;var x,y;elem=document.getElementById(id);if(document.all){mouseX=window.event.clientX+document.body.scrollLeft;mouseY=window.event.clientY+document.body.scrollTop}else{mouseX=event.clientX+window.scrollX;mouseY=event.clientY+window.scrollY}divHeight=elem.style.height;if(isNaN(divHeight))divHeight=returnNumber(divHeight);if(document.all){document.attachEvent("onmousemove",resize);document.attachEvent("onmouseup",stopResize);window.event.cancelBubble=true;window.event.returnValue=false}else{document.addEventListener("mousemove",resize,true);document.addEventListener("mouseup",stopResize,true);event.preventDefault()}}function resize(event){var x,y;var minHeight=100;if(document.all){x=window.event.clientX+document.body.scrollLeft;y=window.event.clientY+document.body.scrollTop}else{x=event.clientX+window.scrollX;y=event.clientY+window.scrollY}if(divHeight+y-mouseY'+html+'')}function togglePostMultiQuote(obj){var toggle=obj.src==multiquote_img_on;obj.src=toggle?multiquote_img_off:multiquote_img_on;my_setcookie(obj.id,toggle?'':'1',true);return false}function initPostMultiQuote(){var cookie;var obj;cookies=document.cookie.split('; ');for(i in cookies){if(cookies[i].substring(0,7)=='post_mq'){cookie=cookies[i].split('=');if(cookie[1]=='1'&&(obj=document.getElementById(cookie[0]))){obj.src=multiquote_img_on}}}}function initSetFunction(f){if(window.addEventListener){window.addEventListener('load',f,false)}else if(window.attachEvent){window.attachEvent('onload',f)}}initSetFunction(initPostMultiQuote);function runLogInPopUp(){var logInPopUpOffsetTop=parseInt($('#login_popup').css('top'));$('#login_popup').css('top',(logInPopUpOffsetTop+($(document).scrollTop()+logInPopUpTop-logInPopUpOffsetTop)/8)+'px');if(my_getcookie('login_popup_closed')!='1'){setTimeout('runLogInPopUp()',8)}}function privmsg_add_username(url,after){$.add_username=function(){$('input[name^=username]:last').after(after).attr('disabled',$('select[name=userfriend]').val()||$('select[name=usergroup]').val()?'disabled':'')};function find_username(fieldname){$.get(url+'&fieldname='+fieldname+'&time='+timestamp(),'',function(data){$('#find_username').html(data).jqmShow();$('.jqmOverlay').bgiframe();$('#find_username').bgiframe()});return false}function total_username(){var total='';$('input[name^=username]').each(function(){total+=$(this).val()});return total}$('input[name^=username]').live('change',function(){$('select[name=userfriend],select[name=usergroup]').attr('disabled',total_username()?'disabled':'')});$('select[name=userfriend]').change(function(){$('input[name^=username],#find_user,select[name=usergroup]').attr('disabled',$('select[name=userfriend]').val()?'disabled':'')});$('select[name=usergroup]').change(function(){$('input[name^=username],#find_user,select[name=userfriend]').attr('disabled',$('select[name=usergroup]').val()?'disabled':'')});$('#find_user').click(function(){return find_username('username')});$('#add_username').click(function(){if(!$('input[name^=username]:last').attr('disabled')){$.add_username()}});if(total_username()){$('select[name=userfriend],select[name=usergroup]').attr('disabled','disabled')}else if($('select[name=userfriend]').val()){$('input[name^=username],#find_user,select[name=usergroup]').attr('disabled','disabled')}else if($('select[name=usergroup]').val()){$('input[name^=username],#find_user,select[name=userfriend]').attr('disabled','disabled')}$('#find_username').jqm({toTop:true})}$(function(){if(my_getcookie('login_popup_closed')!='1'&&$('#login_popup').length>0){logInPopUpLeft=Math.round(($(window).width()-logInPopUpWidth-16)/2);logInPopUpTop=Math.round(($(window).height()-logInPopUpHeight-16)/2);$('#login_popup').css({left:logInPopUpLeft+'px',top:logInPopUpTop+'px',width:logInPopUpWidth+'px',height:logInPopUpHeight+'px'});if(logInBackgroundClass){$('#login_popup_background').addClass(logInBackgroundClass).css('padding',0)}var logInBackgroundPadding=parseInt($('#login_popup_background').css('padding-top')||$('#login_popup').css('padding-top'))*2;$('#login_popup_background').css({width:(logInPopUpWidth-logInBackgroundPadding)+'px',height:(logInPopUpHeight-logInBackgroundPadding)+'px'});$('#login_popup_iframe').css('display','none');$('#login_popup_content').css('display','block');$('#login_popup_close').click(function(){my_setcookie('login_popup_closed','1',true);$('#login_popup').fadeOut('normal');return false});$('#login_popup').fadeIn('slow');runLogInPopUp()}});function resize_images(o){if($(document.body).data('image_resize')){o.delayed=true;$(document.body).one('resized',o,function(e){resize_images(e.data)})}else{instance=$(document.body).data('current_resize_instance')||0;$(document.body).data('current_resize_instance',++instance);$(document.body).data('image_resize',true);$(document.body).addClass('resize_process');var imgs=$(o.selector?o.selector+' img':'.postbody img').not('.signature_div img').not('.attachbox img').addClass('resize_img');resize_div=document.createElement('span');resize_border_div=document.createElement('span');resize_content_div=document.createElement('span');enlarge_a=document.createElement('a');resize_a=document.createElement('a');fullsize_a=document.createElement('a');resize_filler_div=document.createElement('span');$(resize_div).click(function(e){if(!$(e.target).hasClass('enlarge')&&!$(e.target).hasClass('resize')&&!$(e.target).hasClass('fullsize')&&!$(e.target).hasClass('resizebox'))return false}).addClass('resizebox gensmall clearfix');$(resize_border_div).addClass('resize_border clearfix');$(resize_div).append(resize_border_div);$(resize_content_div).addClass('resize_content clearfix');$(resize_border_div).append(resize_content_div);enlarge_a.href='#';resize_a.href='#';fullsize_a.href='#';$(enlarge_a).addClass('enlarge').text("Enlarge this image");$(resize_a).addClass('resize').text("Reduce this image");$(fullsize_a).addClass('fullsize').text("Click to see fullsize");$(resize_filler_div).addClass('resize_filler').text(' ');$(resize_content_div).append(enlarge_a);$(resize_content_div).append(resize_a);$(resize_content_div).append(resize_filler_div);$(resize_content_div).append(fullsize_a);tmp=jQuery.makeArray(imgs);refs={'imgs':tmp,'resize_div':resize_div,'max_width':o.max_width,'max_height':o.max_height};delete(resize_div);$(document.body).data('refs_'+instance,refs).bind('load',function(e,instance){current_instance=instance||$(document.body).data('current_resize_instance');skip_post=false;var refs=$(this).data('refs_'+current_instance);index=jQuery.inArray(e.target,refs.imgs);img_el=e.target;var img=$(img_el);if(index!=-1&&!$(this).data('img_'+current_instance+'_'+index)&&!img.data('data')){img_style=img_el.style&&(img_el.style.width||img_el.style.height)?{width:parseInt(img_el.style.width)||false,height:parseInt(img_el.style.height)||false}:false;if(!img_style){img.attr('style','display:inline')}img_width=img_style.width||img_el.width;img_height=img_style.height||img_el.height;if((img_width==0||img_height==0)&&($(this).data('img_'+current_instance+'_'+index+'_count')||0)<10){$(this).data('img_'+current_instance+'_'+index+'_count',($(this).data('img_'+current_instance+'_'+index+'_count')||0)+1);window.setTimeout("$($(document.body).data('refs_"+current_instance+"').imgs["+index+"]).trigger('load',["+current_instance+"]);",100);skip_post=true}if((img_width>refs.max_width&&refs.max_width!=0)||(img_height>refs.max_height&&refs.max_height!=0)){img.removeAttr('style');$(this).data('img_'+current_instance+'_'+index,true);var resize_div=$(refs.resize_div).clone(true);img_el.parentNode.insertBefore(document.createElement('br'),img_el);img_el.parentNode.insertBefore($(resize_div).get(0),img_el);img_el.parentNode.insertBefore(document.createElement('br'),img_el);resize_div.data('img_ref',img);resize_div.attr('style','display:block');max_width=document.defaultView?parseInt(document.defaultView.getComputedStyle(resize_div.get(0),"").getPropertyValue("width")):resize_div.get(0).offsetWidth;resize_div.removeAttr('style');if(img_width>max_width){resize_div.addClass('showfull')}new_width=img_width*((refs.max_width!=0&&(refs.max_height==0||img_width/img_height>refs.max_width/ refs.max_height ) ) ? refs.max_width/img_width:refs.max_height/img_height);img_el.width=new_width;data={'width':img_width,'resize_width':new_width,'max_sized':(img_width>max_width)};if(img_style){data.height=img_height;data.resize_height=new_width*img_height/img_width;img_el.height=data.resize_height}img.data('data',data);delete(data);resize_div.attr('style','width:'+new_width+'px');delete(max_width);delete(new_width)}else if(!skip_post){$(this).data('img_'+current_instance+'_'+index,true);img.removeClass('resize_img')}delete(img_width);delete(img_height);delete(img_style)}delete(img_el);delete(index)});if(instance==1){$(document.body).bind('click',function(e){switch(true){case $(e.target).hasClass('enlarge'):resize_div=$(e.target).parents('span.resizebox');if(resize_div.length){var img=$(resize_div.data('img_ref'));var img_data=img.data('data');resize_div.attr('style','display:block');resize_width=resize_div.width();img.removeAttr('width');img_width=img_data.width;if(resize_width