<script type="text/javascript">
function awardsOpen(str)
{
var awardsn = new Array();
awardsn["KLUCHIK"] = new Array("название", "картинка", "пояснение")
str = str.split(",")
if(str[str.length-1].substring(str[str.length-1].length-1, str[str.length-1].length)==" "){str[str.length-1]=str[str.length-1].substring(0, str[str.length-1].length-1)}
var msg = new String("");
msg = "<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"http://satil.artbb.ru/style/"+BoardStyle+"/"+BoardStyle+".css\" /><title>Подарки пользователя</title>"
msg+= "<style type=\"text/css\">html, body, #pun, #pun-main {background-image: none; margin: 2px 2px; width: 99%;}</style><body>"
msg+="<div id=\"pun\" class=\"punbb\"><div id=\"pun-main\" class=\"main\">"
msg+="<table class=\"container\"><tr><th width=\"120px\">Название</th><th width=\"80px\">Подарочек</th><th>За что</th></tr>";
for(i=0;i<str.length;i++){
msg+="<tr><td align=\"center\"><span>"+awardsn[str[i]][0]+"</span></td><td align=\"center\"><img width=\"40px\" height=\"40px\" src=\""+awardsn[str[i]][1]+"\" /></td><td align=\"center\"><span>"+awardsn[str[i]][2]+"</span></td></tr>";
}
msg+="</table>";
msg+="</div></div></body></html>";
popup = window.open("", "", "height=250, width=400, top=350, left=400, scrollbars=1")
popup.document.write(msg)
popup.document.close()
return false
}
var li = document.getElementsByTagName("li");
for(z=0;z<li.length;z++){
if(li[z].className=="pa-fld2"){
nag = li[z].innerHTML.substring(li[z].innerHTML.indexOf(": ")+2)
nag1 = nag.split(",");
nag1 = nag1.length;
li[z].innerHTML = "Подарки: <a href=\"javascript: //\" onclick=\"awardsOpen('"+nag+"');\" title=\"Показать подарки пользователя\">"+nag1+"</a>"
}
}
</script>