if (document.images)
{
	pic0= new Image(78,20); pic0.src="/0.gif";
	pic1= new Image(78,20); pic1.src="/1.gif";
	pic2= new Image(78,20); pic2.src="/2.gif";
	pic3= new Image(78,20); pic3.src="/3.gif";
	pic4= new Image(78,20); pic4.src="/4.gif";
	pic5= new Image(78,20); pic5.src="/5.gif";
}
function MM_swapImgRestore() {
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) {
	var p,i,x;	if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function rollimage() {
var i,j=0,x,a=rollimage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function displayrank(ptid) {
var voteid = "vote" + ptid;
var simgid = "simg" + ptid;
var smapid = "smap" + ptid;
document.write('<form name="'+voteid+'" method="post" action="http://www.picrank.com/vote.php">');
document.write('<div id="rank">');
document.write('<input name="note" type="hidden" />');
document.write('<input name="id" type="hidden" value="'+ptid+'" />');
document.write('<img src="http://www.picrank.com/0.gif" name="'+simgid+'" width="78" height="20" border="0" usemap="#'+smapid+'" id="'+simgid+'" />');
document.write('<input type="submit" value="Rank" onclick="document.voteid.submit();"/>');
document.write('<map name="'+smapid+'" id="'+smapid+'">');
document.write('<area shape="rect" coords="0,0,6,17" onmouseover="rollimage(\''+simgid+'\',\'\',\'/0.gif\',1) ; document.'+voteid+'.note.value=\'0\'" />');
document.write('<area shape="rect" coords="6,0,19,17" onmouseover="rollimage(\''+simgid+'\',\'\',\'/1.gif\',1) ; document.'+voteid+'.note.value=\'1\'" />');
document.write('<area shape="rect" coords="19,0,32,17" onmouseover="rollimage(\''+simgid+'\',\'\',\'/2.gif\',1) ; document.'+voteid+'.note.value=\'2\'" />');
document.write('<area shape="rect" coords="32,0,45,17" onmouseover="rollimage(\''+simgid+'\',\'\',\'/3.gif\',1) ; document.'+voteid+'.note.value=\'3\'" />');
document.write('<area shape="rect" coords="45,0,58,17" onmouseover="rollimage(\''+simgid+'\',\'\',\'/4.gif\',1) ; document.'+voteid+'.note.value=\'4\'" />');
document.write('<area shape="rect" coords="58,0,71,17" onmouseover="rollimage(\''+simgid+'\',\'\',\'/5.gif\',1) ; document.'+voteid+'.note.value=\'5\'" />');
document.write('<area shape="rect" coords="71,0,78,17" />');
document.write('</map>');
document.write('</div>');
document.write('</form>');
} 
