/*=====================================================*\
|| ################################################### ||
|| # Post Ratings v1                                 # ||
|| # ----------------------------------------------  # ||
|| # Copyright ©2010 John DuHart All Rights Reserved.# ||
|| # http://compwhizii.net/                          # ||
|| ################################################### ||
\*=====================================================*/
MouseX=0;MouseY=0;$().mousemove(function(e){MouseX=e.pageX;MouseY=e.pageY});function CreateFloatingDiv(x,y,id){var Exists=$('#'+id);if(Exists[0]){Exists[0].style.left=x+'px';Exists[0].style.top=y+'px';Exists[0].style.display='none';Exists.show('fast');return}var div=document.createElement('div');div.style.left=x+'px';div.style.top=y+'px';div.style.position="absolute";div.style.background="#E9E9E9";div.style.border="1px solid #CECECE";div.style.padding='5px';div.style.fontSize='11px';div.style.display='none';div.className="top";div.id=id;document.body.appendChild(div);$(div).show('fast');return div}function OpenEvent(uid){var div=CreateFloatingDiv(MouseX,MouseY,'Event_'+uid);if(!div)return false;div.innerHTML+='Fetching..';$(div).click(function(){$(div).hide()});$(div).show('fast');$.get('events.php','ajax=1&user='+uid,function(d){div.innerHTML=d},"html");return false}function OpenPostAdmin(postid){if($('#postadmin_'+postid)[0]){$('#postadmin_'+postid).toggle('fast');return false}var div=document.createElement('div');div.id='postadmin_'+postid;div.className='postadmin';div.style.left=MouseX-180+'px';div.style.top=MouseY+'px';div.style.display='none';div.innerHTML+='Ban:';div.innerHTML+='<hr/>';div.innerHTML+='<a href="#" onclick="return AdminUser( \'unban\', '+postid+' );">UNBAN</a> | ';div.innerHTML+='<a href="#" onclick="return AdminUser( \'ban1h\', '+postid+' );">1H</a> ';div.innerHTML+='<a href="#" onclick="return AdminUser( \'ban1d\', '+postid+' );">1D</a> ';div.innerHTML+='<a href="#" onclick="return AdminUser( \'ban1w\', '+postid+' );">1W</a> ';div.innerHTML+='<a href="#" onclick="return AdminUser( \'banp\', '+postid+' );">PERM</a>';div.innerHTML+='<input id="PAR_'+postid+'">';div.innerHTML+='<br/>Post Actions: <hr/>';div.innerHTML+='<a href="#" onclick="return AdminUser( \'delpost\', '+postid+' );">Delete</a> | ';div.innerHTML+='<a href="#" onclick="return AdminUser( \'undelpost\', '+postid+' );">UnDelete</a>';document.body.appendChild(div);$(div).show('fast');$('#PAR_'+postid).focus();return false}function AdminPostReply(data,postid){$('#postadmin_'+postid)[0].innerHTML+=data.response+"<br />"}function AdminUser(typename,postid){var value=$('#PAR_'+postid)[0].value;$.post("ajax.php",{'do':'quickadmin_post',action:typename,postid:postid,value:value,securitytoken:SECURITYTOKEN},function(d){AdminPostReply(d,postid)},"json");$('#postadmin_'+postid)[0].innerHTML+="<font color=green>>>"+typename+"..</font><br />";return false}function AdminThreadReply(data){$('#threadadmin')[0].innerHTML+=data.response+"<br />"}function AdminThread(typename,threadid,value){if(!value)value=$('#ThreadAdmin')[0].value;$.post("ajax.php",{'do':'quickadmin_thread',action:typename,threadid:threadid,value:value,securitytoken:SECURITYTOKEN},AdminThreadReply,"json");$('#threadadmin')[0].innerHTML+="<font color=green>>>"+typename+"..</font><br />";return false}