var NS=false;
var MSIE=false;
var MSIE7 = false;
browser=navigator.appName;
version=parseInt(navigator.appVersion);
if(browser=="Netscape" && version>= 3) NS=true
else if(browser=="Microsoft Internet Explorer" && version>= 7) MSIE7=true;
else if(browser=="Microsoft Internet Explorer" && version>= 4) MSIE=true;


function blinkIt() {
if (!document.all) return;
else {
for(i=0;i<document.all.tags('blink').length;i++){
s=document.all.tags('blink')[i];
s.style.visibility=(s.style.visibility=='visible') ?'hidden':'visible';
}
}
}


function showhide(what){
if(MSIE)
{
	if (what.style.display=='none'){
		hideAll('list')
	what.style.display='block';
	
	//what2.src=Open.src
	}
	else{
	what.style.display='none'
	//what2.src=Closed.src
	}
}
else
{
	if (what.style.display== ''){
		hideAll('list')
	what.style.display='none';
	//what2.src=Open.src
	}
	else{
		
	what.style.display=''
	//what2.src=Closed.src
	}
}
}

function showhideJQ(what){

	if (document.getElementById(what).style.display== 'block'){
		hideAll('list')
	//what.style.display='none';
	
	$('#' + what).hide('slow');
	//what2.src=Open.src
	}
	else{
	$('#' + what).show('slow');	
	//what.style.display=''
	//what2.src=Closed.src
	}
}

function hideAll(prefix)
{
	var elements = document.getElementsByTagName("div");
	for(i = 0; i<elements.length; i++)
		{
			var el = elements[i];
			
			if(el.id.substring(0, prefix.length) == prefix)
				(MSIE)? el.style.display = 'none' : el.style.display = 'none';
			}	
}

	
function popUp(link, w, h)
{
 params = "statusbar=NO,menubar=NO,toolbar=NO,scrollbars=YES,width=" + w + ",height=" + h + ",resizable=YES";
 x=window.open(link, "", params);
}

function popUpFixed(link, w, h)
{
 params = "statusbar=NO,menubar=NO,toolbar=NO,scrollbars=AUTO,width=" + w + ",height=" + h + ",resizable=NO";
 x=window.open(link, "", params);
}

function downloadSLDFile(url)
{
	document.location.href = 'http://www.sld.org.rs/preuzmiFajl.asp?docpath=' + escape('../sld/downloads/' + url);
	}

function downloadFile(url)
{
	document.location.href = 'http://www.opstamedicina.org/download.php?docpath=' + escape(url);
	}

