function showdiv(num)  {
	var strBody = 'DivBody' + num

/*	if (document.all(strBody).style.visibility == 'visible')  {
		document.all(strBody).style.position = 'absolute'
		document.all(strBody).style.visibility = 'hidden'
	}
	else	{
		document.all(strBody).style.position = 'relative'		
		document.all(strBody).style.visibility = 'visible'
		
	}
*/

	if (document.all(strBody).style.display == 'block')  {
		document.all(strBody).style.display = 'none'
	}
	else	{
		document.all(strBody).style.display = 'block'
	}
		
}

function ShowChart(ID)  {
	var divToHide = 'DivChart' + CurrentChartID
	var divToShow = 'DivChart' + ID
	document.all(divToHide).style.display = 'none'
	document.all(divToShow).style.display = 'inline'
	CurrentChartID = ID
	//alert(divToHide + '\n' + divToShow)
}

function ShowAlbumi(ID)  {
	var divToHide = 'DivAlbum' + CurrentMonth
	var divToShow = 'DivAlbum' + ID
	if (CurrentMonth != '')  {
		document.all(divToHide).style.display = 'none'
	}
	document.all(divToShow).style.display = 'inline'
	CurrentMonth = ID
}


function open_new_window(strPage) {
        var h = window.screen.availHeight / 2;
        var w = window.screen.availWidth / 2;
        var s = 'fullscreen=no, dependent=1, resizable=1, top=0, left=0, height=' + h +', width=' + w;
        setTimeout('window.open("' + strPage +'", null, "' + s + '")', 100)
}


var isNav4 = (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) == 4) ? true : false
var isIE5 = (navigator.appVersion.indexOf("MSIE 5") > -1) ? true : false

function makeNewWind(form) {
	
	if (isNav4) {
		//netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite")
	}

	for (var i = 0; i < form.Pitanje.length; i++) {
		if (form.Pitanje[i].checked) {
			var attr = form.Pitanje[i].value
		}
	}	
	var h = window.screen.availHeight - 250;
	var w = window.screen.availWidth / 2
	var s = 'fullscreen=no, dependent=1, resizable=1, top=0, left=0, height=' + h +', width=' + w;
	
	var newWind = window.open("obradi_anketu.asp?Pitanje=" + attr ,"subwindow",s)	
	if (isNav4) {
		//netscape.security.PrivilegeManager.disablePrivilege("CanvasAccess")
	}
}

function makeMail2FriendWindow(ID) {
	var h = 400
	var w = 500
	var s

	if (isIE5)  {
		s = 'fullscreen=no, dependent=1, resizable=1, top=0, left=0, height=' + h +', width=' + w;
	}
	else   {
		s = 'screenX=120,screenY=20,height=' + h +',width=' + w;
	}
	var newWind = window.open("mailtofriend.asp?ID="+ID ,"subwindow",s)	
}



function makePostCommentWindow(ID) {
	var h
	var w
	var s

	if (isIE5)  {
		if (ID=='FIND')  
			ID = document.all.divPostQS.innerHTML
		h = 550
		w = 500
		s = 'status=1, fullscreen=no, dependent=1, resizable=1, top=0, left=0, height=' + h +', width=' + w;
		var newWind = window.open("post_comment_ie5.asp?ID="+ID ,"subwindow",s)	
	}
	else   {
		h = 550
		w = 550
		s = 'status,screenX=120,screenY=20,height=' + h +',width=' + w;
		var newWind = window.open("post_comment_nn.asp?ID="+ID ,"subwindow",s)	
	}
}

function makeMP3Popup(ID) {
	var h = 250
	var w = 500
	var s

	if (isIE5)  {
		s = 'fullscreen=no, dependent=1, resizable=1, top=0, left=0, height=' + h +', width=' + w;
	}
	else   {
		s = 'screenX=120,screenY=20,height=' + h +',width=' + w;
	}
	var newWind = window.open("mp3_popup.asp?ID="+ID ,"subwindow",s)
}


function showtrPV(row)   {
	var strTable = 'Tablica_' + row
	var strIMG = 'img' + row
	if (document.all(strTable).rows(1).style.display == 'none') {
		document.images(strIMG).src = 'images/minus.gif'
		document.all(strTable).rows(1).style.display = 'block'
	}
	else  {
		document.images(strIMG).src = 'images/plus.gif'
		document.all(strTable).rows(1).style.display = 'none'			
	}
}


//Default browsercheck, added to all scripts!
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=((this.ver.indexOf("MSIE 5")>-1 || this.ver.indexOf("MSIE 6")>-1) || this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bww=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bww=new checkBrowser()

