function rate_post(userid,postid,mode) {
cw=350;ch=250;cl=(screen.width/2)-150;ct=(screen.height/2)-100;
var theurl = '../ratepost.php?userid='+userid+'&postid='+postid+'&mode='+mode;
var thekey = userid+'_'+postid;
newWin = window.open(theurl,thekey,"width="+cw+",height="+ch+",left="+cl+",top="+ct+",scrollbars=0,resizable=1,status=0,location=0,menubar=0,toolbar=0");
newWin.focus();
}
var current='current',week='week',month='month',all='all';
function switch_ratings(key) {
var current=document.getElementById('current'), week=document.getElementById('week'), month=document.getElementById('month'),all=document.getElementById('all');
if (current) if (key=='current') current.className = 'show_div'; else current.className = 'hide_div';
if (week) if (key=='week') week.className = 'show_div'; else week.className = 'hide_div';
if (month) if (key=='month') month.className = 'show_div'; else month.className = 'hide_div';
if (all) if (key=='all') all.className = 'show_div'; else all.className = 'hide_div';
}
