function RegisterNamespaces(){
for(var i=0;i<arguments.length;i++){
var p=arguments[i].split("."),w=window;
for(var j=0;j<p.length;j++){
if(!w[p[j]]){
w[p[j]]=new Object();
}
w=w[p[j]];
}
}
}
RegisterNamespaces("Inpl.ClipVote");
Inpl.ClipVote=new function(){
var _4=this,d="default",ranks={},cName="V_",fn="Inpl.ClipVote.",en="Vote",img={"default":{"on":"/s/starOn.gif","off":"/s/star.gif"}},ttl=2592000,prl={},pid;
var _5=false;
this.getCode=function(id,_7,_8,_9){
var _a="";
_a+="<div class=\"object-opinion\">";
_a+="<p><span>oceń: </span></p>";
_a+="<ul id=\"Vote"+_8+id+"\">";
switch(_9){
case true:
switch(Math.round(parseInt(_7))){
case 5:
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></li>";
break;
case 4:
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></li>";
break;
case 3:
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></li>";
break;
case 2:
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></li>";
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></li>";
break;
case 1:
_a+="<li><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></li>";
break;
default:
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></li>";
_a+="<li><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></li>";
break;
}
break;
default:
switch(Math.floor(parseInt(_7))){
case 5:
_a+="<li><a href=\"/ocen,"+id+",1\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",2\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",3\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",4\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",5\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></a></li>";
break;
case 4:
_a+="<li><a href=\"/ocen,"+id+",1\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",2\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",3\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",4\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",5\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></a></li>";
break;
case 3:
_a+="<li><a href=\"/ocen,"+id+",1\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",2\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",3\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",4\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",5\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></a></li>";
break;
case 2:
_a+="<li><a href=\"/ocen,"+id+",1\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",2\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",3\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",4\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",5\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></a></li>";
break;
case 1:
_a+="<li><a href=\"/ocen,"+id+",1\"><img src=\"/s/news_star_on.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",2\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",3\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",4\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",5\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></a></li>";
break;
default:
_a+="<li><a href=\"/ocen,"+id+",1\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Kiepski\" title=\"Kiepski\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",2\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Poniżej średniej\" title=\"Poniżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",3\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Średni\" title=\"Średni\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",4\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Powyżej średniej\" title=\"Powyżej średniej\" /></a></li>";
_a+="<li><a href=\"/ocen,"+id+",5\"><img src=\"/s/star_off.gif\" width=\"19\" height=\"19\" alt=\"Bardzo dobry\" title=\"Bardzo dobry\" /></a></li>";
break;
}
break;
}
_a+="</ul>";
_a+="</div>";
return _a;
};
this.Init=function(id,_c,_d,_e,_f,_10){
try{
pid=id;
cid=pid<0?-pid:pid;
var o,i,a,s,r,x=_c+pid;
r=parseInt(INTPL("getCookie",cName+cid));
_5=(r)?true:false;
$("voting").innerHTML=this.getCode(id,_d,_c,_5);
prl[x+"n"]=new Image();
prl[x+"f"]=new Image();
if(_e||_f){
img[x]={"on":null,"off":null};
}
if(_e){
img[x].on=_e;
prl[x+"n"].src=_e;
}else{
prl[x+"n"].src=img[d].on;
}
if(_f){
img[x].off=_f;
prl[x+"f"].src=_f;
}else{
prl[x+"f"].src=img[d].off;
}
ranks[x]=_d;
_4.Set(pid,_c,(ranks[x]?ranks[x]:r));
if(r){
_5=true;
Voted(pid,_c,r);
}else{
_5=false;
o=$("voting").getElementsByTagName("LI");
for(i=0;i<5;i++){
a=o[i].childNodes[0];
a.onmouseover=new Function("return "+fn+"Set("+pid+",\""+_c+"\","+(i+1)+")");
a.onmouseout=new Function("return "+fn+"Clear("+pid+",\""+_c+"\")");
a.onclick=new Function("return "+fn+"Vote("+pid+","+id+",\""+_c+"\","+(i+1)+")");
}
}
}
catch(e){
}
};
this.Set=function(id,_13,_14){
try{
var o=$("voting").getElementsByTagName("LI"),i,a,s,x=_13+id;
for(i=0;i<5;i++){
s=(i<Math.floor(parseInt(_14))?"on":"off");
a=o[i].childNodes[0];
a.childNodes[0].src=(img[x]&&img[x][s]?img[x][s]:img[d][s]);
}
}
catch(e){
}
return false;
};
this.Clear=function(id,_17){
try{
_4.Set(id,_17,ranks[_17+id]);
}
catch(e){
}
return false;
};
this.Vote=function(pid,id,_1a,_1b){
try{
var i=document.createElement("IMG");
i.style.position="absolute";
i.style.top="1px";
i.style.left="1px";
i.style.visibility="hidden";
i.alt="";
if(parseInt(id)<0){
id=-id;
}
i.src="/ocen,"+parseInt(id)+","+Math.floor(parseInt(_1b))+"?t="+(new Date()).getTime();
document.body.appendChild(i);
//INTPL("setCookie",cName+id, _1b, '/', false, '.interia.pl');
Voted(pid,_1a,_1b);
}
catch(e){
}
return false;
};
function Voted(id,_1e,_1f){
var o=$("voting").getElementsByTagName("LI"),i,a,c=$("VoteC"+_1e+id);
for(i=0;i<5;i++){
a=o[i].childNodes[0];
a.onclick=new Function("return false");
a.onmouseover=null;
a.onmouseout=null;
a.style.cursor=d;
}
}
function $(n){
return document.getElementById(n);
}
};

