/** * onArcade 2.2.0 * Copyright � 2006-2009 Hans M�esalu & Eveterm O�, All Rights Reserved ** * ONARCADE IS NOT FREE SOFTWARE! * /web/20131210134228/http://www.onarcade.com **/ var loader='
';var bb=new Array(0,0,0,0,0);function get_position(obj){var left_pos=0;var top_pos=0;if(obj.offsetParent){do{left_pos+=obj.offsetLeft;top_pos+=obj.offsetTop;}while(obj=obj.offsetParent);}else if(obj.x){left_pos+=obj.x;top_pos+=obj.y;}var jada=new Array(left_pos,top_pos);return jada;}function get_window_dimensions(){var width=0;var height=0;if(window.innerWidth){width=window.innerWidth;height=window.innerHeight;}else if(document.documentElement.clientWidth&&document.documentElement.clientWidth!=0){width=document.documentElement.clientWidth;height=document.documentElement.clientHeight;}else{width=document.body.clientWidth;height=document.body.clientHeight;}var jada=new Array(width,height);return jada;}function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}function doc_id(id){return document.getElementById(id);}function nl2br(string){return string.replace(/(\\r)?\\n/g,"
");}function nohtml(string){string=string.replace(/"/g,'"');string=string.replace(//g,'>');return string;}function check_all(){for(var i=0;i';doc_id("edit_comment_"+comment_id).firstChild.focus();}function comment_verification(){if(doc_id("comment_verification").style.display=="none"){doc_id("comment_verification").style.display="block";doc_id("c_verification_image").src=siteurl+"/includes/verification_image.php";}}function refresh_image(image_id){doc_id(image_id).src=siteurl+"/includes/verification_image.php?"+Math.random();}function tell_friend_pop(){var tell_friend=doc_id("tell_friend_popup");var file_info=doc_id("file_info");var position=get_position(file_info);tell_friend.style.display="block";if(document.getElementById("friend_verification"))refresh_image("friend_verification");left_plus=(file_info.offsetWidth-tell_friend.offsetWidth)/2;tell_friend.style.top=(position[1]+15)+"px";tell_friend.style.left=(position[0]+left_plus)+"px";}function report_broken(){var report_broken=doc_id("report_broken_popup");var file_info=doc_id("file_info");var position=get_position(file_info);report_broken.style.display="block";left_plus=(file_info.offsetWidth-report_broken.offsetWidth)/2;report_broken.style.top=(position[1]+40)+"px";report_broken.style.left=(position[0]+left_plus)+"px";}function close_popup(popup){doc_id(popup+"_popup").style.display="none";if(popup=='tell_friend'){doc_id("friend_email").value="";if(doc_id("friend_verification_code"))doc_id("friend_verification_code").value="";doc_id("tell_friend_error").innerHTML="
";doc_id("tell_friend_form").style.display="";}}function bb_code(code,text_id){var message=doc_id(text_id);var bb_code;message.focus();switch(code){case 0:bb_code="b";break;case 1:bb_code="i";break;case 2:bb_code="u";break;case 3:bb_code="s";break;case 4:bb_code="quote";break;}if(bb[code]%2==0)bb_code="["+bb_code+"]";else bb_code="[/"+bb_code+"]";bb[code]++;if(document.selection)document.selection.createRange().text=bb_code;else if(message.selectionStart||message.selectionStart==0)message.value=message.value.substring(0,message.selectionStart)+bb_code+message.value.substring(message.selectionEnd,message.value.length);else message.value+=bb_code;}function emoticon(code,text_id){var message=doc_id(text_id);message.focus();if(document.selection)document.selection.createRange().text=code;else if(message.selectionStart||message.selectionStart==0)message.value=message.value.substring(0,message.selectionStart)+code+message.value.substring(message.selectionEnd,message.value.length);else message.value+=code;}function makeHttpRequest(url,callback_function, return_json,post_data){var xmlHttp,response;try{xmlHttp=new XMLHttpRequest();}catch(e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}if(!xmlHttp)return;xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(return_json){response=eval('('+xmlHttp.responseText+')');}else{response=xmlHttp.responseText;}callback_function(response);}};if(post_data){xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(post_data);}else{xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function favourites_menu(link){if(!document.getElementById("favourites_menu")){var fav_menu=document.createElement("div");fav_menu.setAttribute("id","favourites_menu");document.body.appendChild(fav_menu);}else{var fav_menu=doc_id("favourites_menu");if(fav_menu.style.display=="block")return;}var position=get_position(link);fav_menu.style.display="block";fav_menu.style.top=(position[1]+17)+"px";fav_menu.style.left=(position[0]+2)+"px";fav_menu.innerHTML=loader;function back_function(server_r){contents=' ';fav_menu.innerHTML=contents;document.onclick=function(){doc_id("favourites_menu").style.display="none";document.onclick=null;};fav_menu.onclick=stop_event;}makeHttpRequest(siteurl+"/usercp.php?a=favourites&ajax=1",back_function, true);}function submit_report_broken(file_id){doc_id("submit_report_broken").disabled=true;function back_function(server_r){document.getElementById("report_broken_popup").innerHTML=server_r.message;setTimeout("close_popup('report_broken')",1000);}makeHttpRequest(siteurl+"/file.php?a=report_broken&f="+file_id,back_function, true,"broken_reason="+doc_id("broken_reason").value);}function submit_tell_friend(file_id){var error=doc_id("tell_friend_error");var submit=doc_id("submit_tell_friend");submit.disabled=true;function back_function(server_r){error.innerHTML=server_r.message;submit.disabled=false;if(server_r.error==0){doc_id("tell_friend_form").style.display="none";setTimeout("close_popup('tell_friend')",1000);}}var query="your_name="+doc_id("your_name").value+"&your_email="+doc_id("your_email").value+"&friend_email="+doc_id("friend_email").value;if(document.getElementById("friend_verification_code"))query+="&friend_verification_code="+doc_id("friend_verification_code").value;makeHttpRequest(siteurl+"/file.php?a=tellafriend&f="+file_id,back_function, true,query);}function make_favorite(file_id){function back_function(server_r){doc_id("make_favorite_img").src=siteurl+"/images/"+server_r.image+".png";}makeHttpRequest(siteurl+"/file.php?a=make_favorite&f="+file_id,back_function, true);}function edit_score_comment(score_id){var comment=doc_id("edit_comment_"+score_id);data_s="edit_comment="+doc_id("score_comment").value;comment.innerHTML=loader;makeHttpRequest(siteurl+"/scores.php?a=edit_comment&s="+score_id,function(server_r){comment.innerHTML=server_r.comment;},true,data_s);}function display_comments(file_id,comment_page){doc_id("file_comments").innerHTML="
"+loader;makeHttpRequest(siteurl+"/file.php?f="+file_id+"&a=comments&p="+comment_page,function(response){doc_id("file_comments").innerHTML=response;},false);}function submit_comment(file_id){var submit=doc_id("submit_comment");var error=doc_id("comment_error");var loader=doc_id("loader");submit.disabled=true;loader.style.display="";function back_function(server_r){error.innerHTML=server_r.message;if(server_r.error==0){doc_id("comment_form").style.display="none";doc_id("new_comment").style.display="block";doc_id("new_comment").innerHTML='
'+server_r.user+'
'+nl2br(server_r.comment);}else{submit.disabled=false;loader.style.display="none";}}if(document.getElementById("verification_code")){send_d="message="+doc_id("message").value+"&verification_code="+doc_id("verification_code").value;}else{send_d="message="+doc_id("message").value;}makeHttpRequest(siteurl+"/file.php?a=submit_comment&f="+file_id,back_function, true,send_d);}function report_comment(comment_id){if(confirm(sure_spam)){doc_id("report_"+comment_id).style.display="none";makeHttpRequest(siteurl+"/file.php?a=report_comment&c="+comment_id,function(){},false);}}function stop_event(event){if(!event)window.event.cancelBubble=true;else event.stopPropagation();}