// JavaScript Document

	   var arrTemp=self.location.href.split('?'); 
	   var picUrl = (arrTemp.length > 0)?arrTemp[1]:''; 
	   var NS = (navigator.appName=="Netscape")?true:false; 


/* 
	Descirption: Resajzanje otovrenog prozora na dimenzije slike
	File: *.asp
*/
     function FitPic() { 
       iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
       iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
       iWidth = document.images[0].width - iWidth + 80; 
       iHeight = document.images[0].height - iHeight + 80; 
       window.resizeBy(iWidth, iHeight); 
       self.focus(); 
     }

/* 
	Descirption: Otvaranje novog prozora
	File: *.asp
*/
	function PopupPic(sPicURL) { 
    	openWin(sPicURL,'previewImg','480','380','yes'); 
   } 

	function openWin(file,name,w,h,resizable,otherFeat){
		l=screen.width/2-w/2;
		t=screen.height/2-h/2;
		if(otherFeat) otherFeat= ',' + otherFeat
		return window.open(file,name,'width='+w+',height='+h+',scrollbars=no,resizable='+resizable+',top='+t+',left='+l+otherFeat);
	}
	
/* 
	This switches expand collapse icons 
	File: *.asp
*/
	function filter(imagename,objectsrc){
		/*
		if (document.images){
			document.images[imagename].src=eval(objectsrc+".src");
		}*/
	}
	
	
/*	
	show OR hide funtion depends on if element is shown or hidden 
	File: *.asp
*/
	function shoh(id) { 
		
		if (document.getElementById) { // DOM3 = IE5, NS6
			if (document.getElementById(id).style.display == "none"){
				document.getElementById(id).style.display = 'block';
				filter(("img"+id),'imgin');			
			} else {
				filter(("img"+id),'imgout');
				document.getElementById(id).style.display = 'none';			
			}	
		} else { 
			if (document.layers) {	
				if (document.id.display == "none"){
					document.id.display = 'block';
					filter(("img"+id),'imgin');
				} else {
					filter(("img"+id),'imgout');	
					document.id.display = 'none';
				}
			} else {
				if (document.all.id.style.visibility == "none"){
					document.all.id.style.display = 'block';
				} else {
					filter(("img"+id),'imgout');
					document.all.id.style.display = 'none';
				}
			}
		}
	}
