function popimage(imagesrc,naslov,naziv){
	var look='status=no,scrollbars=no, width=300,height=300';
	popwin=window.open('',naziv,look);
	popwin.document.open();
	popwin.document.write('<head><title>'+naslov+'</title></head><body onLoad="self.resizeTo(document.imgItemPic.width+10,document.imgItemPic.height+50)" leftmargin="0" topmargin="0">');
	popwin.document.write('<a href="javascript:this.window.close()"><img name="imgItemPic" alt="'+naslov+'" border="0" vspace="0" hspace="0" src="'+imagesrc+'"></a>');
	popwin.document.write('</body>');
	popwin.document.close();
	popwin.focus();
}	

function newWindow(link,sirina,visina)
{
    var NewWin=window.open(link,'Rezultati','width='+ sirina +',height='+ visina +',toolbar=no,location=no,scrollbars=yes,resizable=yes');
    NewWin.focus()
}

//postavlja Html kao InnerHTML elementa ako postoji element s tim ID-om
function PostaviInnerHTMLElementa(Id, Html)
{
    var elem = this.document.getElementById(Id);
    
    if(elem!=null)
        elem.InnerHTML = Html;
}

function PrikaziStranicu(pStranica,pJezik)
{
    
    var Stranica = AjaxUtils.DajStranicu(pStranica,pJezik).value;
    
    PostaviInnerHTMLElementa('naslovstranice',Stranica.Naslov);
    PostaviInnerHTMLElementa('tekststranice',Stranica.Sadrzaj);   
}

function AjaxTest()
{
    alert( AjaxUtils.eho('hello ajax').value);
}

function runSlideShow(){
   
   var mSlideShowImage = this.document.getElementById("SlideShow");
   if (mSlideShowImage!=null)
   {       
       mSlideShowImage.style.filter="blendTrans(duration=2)";
       mSlideShowImage.style.filter="blendTrans(duration=crossFadeDuration)";             
    
       if(navigator.appName=="Microsoft Internet Explorer")         
         mSlideShowImage.filters.blendTrans.Apply();
         
       mSlideShowImage.src = preLoad[j].src;
       
       if(navigator.appName=="Microsoft Internet Explorer")                
         mSlideShowImage.filters.blendTrans.Play();

       j = j + 1;
       if (j > (p-1)) j=0;
       t = setTimeout('runSlideShow()', slideShowSpeed);
   }
   else
   {
    alert("nema HTML elementa s Id-om 'SlideShow'");
   }
}

			
					

