var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{

    if ((version >= 5.5) && (version <7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}
var banlist= new Array();
function changepict(t){
document.getElementById('pozanews').src=document.getElementById('n'+t.id).src;

}

function shownews(t){
	dontdoit=1;

	for(i=0;i<banlist.length;i++) {
		if(banlist[i]=='a'+t.id){
			dontdoit=0;
		} else {
			dontdoit=1;
		}
	}
	
	if(dontdoit==1){
			banlist.push('a'+t.id);
			d=document.getElementById('a'+t.id);
			t.style.background = "#eff6f7";
			if(d.style.display=="block"){

				strange('a'+t.id);

			} else {
				d.style.height=0;
				creste('a'+t.id);

			}

	}
}
function overnews(t,x){
if(x){
t.style.background="#eff6f7";
t.style.cursor='hand';
t.style.cursor='pointer';
} else {
t.style.background="#ffffff";
}
}
function strange(e){
aar=document.getElementById('aa'+e);
	t=document.getElementById(e);

	if(t.offsetHeight>0){
		if(t.offsetHeight-5>0){
		t.style.height=t.offsetHeight-5+"px";
		} else {
		t.style.height=0;
		aar.style.background="bottom left url('images/arrow-square.gif')"
		}
		
		setTimeout('strange("'+e+'")',10);
	} else {
		for(i=0;i<banlist.length;i++) {
			if(banlist[i]==e){
			banlist.splice(i,1);
			}
		}
		t.style.display='none';
	}

}
function creste(e){
	
	t=document.getElementById(e);
	g=document.getElementById('a'+e);
	aar=document.getElementById('aa'+e);
	t.style.display='block';
	if(t.offsetHeight<g.offsetHeight){
		if(t.offsetHeight+5<g.offsetHeight){
		t.style.height=t.offsetHeight+5+"px";
		} else {
			for(i=0;i<banlist.length;i++) {
				if(banlist[i]==e){
					banlist.splice(i,1);
				}
			}
			t.style.height=g.offsetHeight+"px";
			aar.style.background="top left url('images/arrow-square.gif')"
		}
		
		setTimeout('creste("'+e+'")',10);
	} 

}
