
// Copyright 2003 Eddie Traversa
// http://www.dhtmlnirvana.com/
// free to use as long as this copyright notice stays intact
var tags = new Array('ul','font');
var pixelArray =  new Array('8','9','10','11','12','14','16','18','20','22','24');
var emArray =  new Array('0.7','0.9','1.0','1.5','2.0','2.5','3');
var initSize = 3;

function fontSizer(inc,unit) {
	if (!document.getElementById) 
		return;
	var size = initSize;
		size += inc;
	if (size < 0 ) {
		size = 0;
}
	if (size > 8 ) {
		size = 8;
}
		initSize = size;
		getBody = document.getElementsByTagName('body')[0];
	for (i = 0 ; i < tags.length ; i++ ) {
		getallTags = getBody.getElementsByTagName(tags[i]);
	for (k = 0 ; k < getallTags.length ; k++) 
		getallTags[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
	}
}



function clearDefault(el) {
if (el.defaultValue==el.value) el.value = ""
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);




function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}





function openwindow1()
{
	window.open("leskoskova.html","mywindow","menubar=0,resizable=0,width=600,height=500");
}


function openwindow2()
{
	window.open("turjaska.html","mywindow","menubar=0,resizable=0,width=620,height=550");
}
function openwindow3()
{
	window.open("pictures/razstave/2006/munich/4.html","mywindow","menubar=0,resizable=0,width=550,height=500");
}
function openwindow4()
{
	window.open("pictures/razstave/2006/munich/3.html","mywindow","menubar=0,resizable=0,width=700,height=700");
}
function openwindow5()
{
	window.open("pictures/razstave/2006/munich/2.html","mywindow","menubar=0,resizable=0,width=500,height=450");
}
function openwindow6()
{
	window.open("pictures/razstave/2006/munich/1.html","mywindow","menubar=0,resizable=0,width=500,height=450");
}
function openwindow7()
{
	window.open("pictures/razstave/2006/munich/5.html","mywindow","menubar=0,resizable=0,width=700,height=620");
}




function submitForm_vprasajte_nas() {
	var radioSelected = false;

	if (document.form.ime.value == "") {
		alert("Prosimo, vpišite vaše ime in priimek");
		return false;
	}
		
	if (document.form.posta.value == "") {
		alert("Prosimo, vpišite vaš elektronski naslov");
		return false;
	}

	if (document.form.vprasanje.value == "") {
		alert("Prosimo, vpišite vaše vprašanje");
		return false;
	}
	
	return true;
}


function submitForm_vprasajte_nas_mreznik() {
	var radioSelected = false;

	if (document.form.ime.value == "") {
		alert("Prosimo, vpišite vaše ime in priimek");
		return false;
	}
		
	if (document.form.posta.value == "") {
		alert("Prosimo, vpišite vaš elektronski naslov");
		return false;
	}

	if (document.form.vprasanje.value == "") {
		alert("Prosimo, vpišite vaše vprašanje");
		return false;
	}

	
	return true;
}



function submitForm_guestbook() {
	var radioSelected = false;

	if (document.form.ime.value == "") {
		alert("Prosimo, vpišite vaše ime in priimek");
		return false;
	}
		
	if (document.form.posta.value == "") {
		alert("Prosimo, vpišite vaš elektronski naslov");
		return false;
	}

	if (document.form.vprasanje.value == "") {
		alert("Prosimo, vpišite vaše sporoèilo");
		return false;
	}
	
	return true;
}


function submitForm_natecaj() {
	var radioSelected = false;

	if (document.form.ime.value == "") {
		alert("Prosimo, vpišite vaše ime in priimek");
		return false;
	}
		
	if (document.form.posta.value == "") {
		alert("Prosimo, vpišite vaš elektronski naslov");
		return false;
	}

	if (document.form.predlog.value == "") {
		alert("Prosimo, vpišite vaš predlog za slogan");
		return false;
	}
	
	return true;
}



function submitForm_vprasajte_nas_eng() {
	var radioSelected = false;

	if (document.form.ime.value == "") {
		alert("Please enter your Name");
		return false;
	}
		
	if (document.form.posta.value == "") {
		alert("Please enter your e-mail");
		return false;
	}

	if (document.form.vprasanje.value == "") {
		alert("Please describe your enquiry");
		return false;
	}
	
	return true;
}

function submitForm_guestbook_eng() {
	var radioSelected = false;

	if (document.form.ime.value == "") {
		alert("Please enter your name");
		return false;
	}
		
	if (document.form.posta.value == "") {
		alert("Please enter your e-mail");
		return false;
	}

	if (document.form.vprasanje.value == "") {
		alert("Please enter your comment");
		return false;
	}
	
	return true;
}


function submitForm_predlog() {
	var radioSelected = false;

	
	if (document.form.naslov.value == "") {
		alert("Prosimo, vpišite naslov publikacije");
		return false;
	}

	if (document.form.ime.value == "") {
		alert("Prosimo, vpišite vaše ime in priimek");
		return false;
	}
	
	if (document.form.email.value == "") {
		alert("Prosimo, vpišite vaš elektronski naslov");
		return false;
	}


	return true;
}

function submitForm_predlog_eng() {
	var radioSelected = false;

	
	if (document.form.naslov.value == "") {
		alert("Please, enter the 'Title' field");
		return false;
	}

	if (document.form.ime.value == "") {
		alert("Please, enter the 'Your name' field");
		return false;
	}
	
	if (document.form.email.value == "") {
		alert("Please, enter 'Your email address' field");
		return false;
	}


	return true;
}


function submitForm_isbn() {

	
	if (document.form.naziv_1.value == "") {
		alert("Prosimo, vpišite Uradni naziv organizacije");
		return false;
	}

	if (document.form.ulica_1.value == "") {
		alert("Prosimo, vpišite Ulico in hišno številko organizacije");
		return false;
	}
	
	if (document.form.posta_1.value == "") {
		alert("Prosimo, vpišite Poštno številko in kraj organizacije");
		return false;
	}

	if (document.form.telefon_1.value == "") {
		alert("Prosimo, vpišite Telefonsko številko organizacije");
		return false;
	}

	
	var urlToGo="";
    for (i=0;i<document.form.zaloznistvo.length;i++) {
        if (document.form.zaloznistvo[i].checked) {
            urlToGo=document.form.zaloznistvo[i].value
        }
    }

	var urlToGo1="";
    for (i=0;i<document.form.zaloznistvo1.length;i++) {
        if (document.form.zaloznistvo1[i].checked) {
            urlToGo1=document.form.zaloznistvo1[i].value
        }
    }





		if (urlToGo == "NE"){
			if (urlToGo1 == ""){
				alert("V primeru, da založništvo ni vaša primarna dejavnost, prosimo, da obkrožite kategorijo, ki najbolj ustreza vaši dejavnosti:");
				return false;
			}
			return true; 	
		}
	   	else if (urlToGo == "DA"){
			if (urlToGo1 != ""){
				alert("Ker je založništvo vaša primarna dejavnost, dodatna kategorija ne bo upoštevana");
				return true;
			}
		return true; 	
		}
	   	else
	    {
		alert("Prosimo, izberite odgovor na vprašanje: Je založništvo vaša primarna dejavnost?");
		return false; 
		}

		




	return true;
}


function submitForm_web2() {

	if (document.form.ime.value == "") {
		alert("Prosimo, vpišite vaše ime");
		return false;
	}
		
	if (document.form.priimek.value == "") {
		alert("Prosimo, vpišite vaš priimek");
		return false;
	}
		
	if (document.form.institucija.value == "") {
		alert("Prosimo, vpišite naziv ustanove, kjer ste zaposleni");
		return false;
	}

	if (document.form.ulica.value == "") {
		alert("Prosimo, vpišite vašo ulico bivanja");
		return false;
	}
		
	if (document.form.posta.value == "") {
		alert("Prosimo, vpišite vašo poštno številko");
		return false;
	}

	if (document.form.email.value == "") {
		alert("Prosimo, vpišite vaš elektronski naslov");
		return false;
	}

		
	return true;
}


 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["nove/slika0.jpg", "", ""] //plain image syntax
fadeimages[1]=["nove/slika1.jpg", "", ""] //plain image syntax
fadeimages[2]=["nove/slika2.jpg", "", ""] //plain image syntax
fadeimages[3]=["nove/slika3.jpg", "", ""] //plain image syntax
fadeimages[4]=["nove/slika4.jpg", "", ""] //plain image syntax
fadeimages[5]=["nove/slika5.jpg", "", ""] //plain image syntax
fadeimages[6]=["nove/slika6.jpg", "", ""] //plain image syntax
fadeimages[7]=["nove/slika7.jpg", "", ""] //plain image syntax
fadeimages[8]=["nove/slika8.jpg", "", ""] //plain image syntax
 
 var fadeimages1=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages1[0]=["pictures/2010/prva/slika0.jpg", "", ""] //plain image syntax
fadeimages1[1]=["pictures/2010/prva/slika1.jpg", "", ""] //plain image syntax
fadeimages1[2]=["pictures/2010/prva/slika2.jpg", "", ""] //plain image syntax
fadeimages1[3]=["pictures/2010/prva/slika3.jpg", "", ""] //plain image syntax
fadeimages1[4]=["pictures/2010/prva/slika4.jpg", "", ""] //plain image syntax
fadeimages1[5]=["pictures/2010/prva/slika5.jpg", "", ""] //plain image syntax
fadeimages1[6]=["pictures/2010/prva/slika6.jpg", "", ""] //plain image syntax
fadeimages1[7]=["pictures/2010/prva/slika7.jpg", "", ""] //plain image syntax
fadeimages1[8]=["pictures/2010/prva/slika8.jpg", "", ""] //plain image syntax
 
 
var fadebgcolor="white"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=80 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*200
var fadeheight=fadeheight+this.imageborder*200
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=2
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

function clearDefault(el) {
if (el.defaultValue==el.value) el.value = ""
}



function clearDefault(el) {
if (el.defaultValue==el.value) el.value = ""
}

 

function submitForm_medbibliotecna() {
	var radioSelected = false;

	if (document.forma.ime.value == "") {
		alert("Polje 'Ime in priimek' ne sme ostati prazno");
		return false;
	}
		
	if (document.forma.naslov.value == "") {
		alert("Polje 'Naslov (ulica in hišna številka)' ne sme ostati prazno");
		return false;
	}
	
	if (document.forma.posta.value == "") {
		alert("Polje 'Pošta' ne sme ostati prazno");
		return false;
	}
	
	if (document.forma.kraj.value == "") {
		alert("Polje 'Kraj' ne sme ostati prazno");
		return false;
	}
	
	
	

	if (document.forma.monografija[0].checked == true) {
	
		if (document.forma.naslovm.value == "") {
			alert("Polje 'Naslov' ne sme ostati prazno");
			return false;
		}

		if (document.forma.letom.value == "") {
			alert("Polje 'Leto' ne sme ostati prazno");
			return false;
		}
	
	return true;
		
	}
	

	if (document.forma.monografija[1].checked == true) {
	
		if (document.forma.naslovd.value == "") {
			alert("Polje 'Naslov' ne sme ostati prazno");
			return false;
		}

		if (document.forma.letod.value == "") {
			alert("Polje 'Leto' ne sme ostati prazno");
			return false;
		}

		if (document.forma.stranid.value == "") {
			alert("Polje 'Strani' ne sme ostati prazno");
			return false;
		}

	
	return true;
	}

return true;
}


function submitForm_bibliografija() {
	var radioSelected = false;

	if (document.forma.predlagatelj.value == "") {
		alert("Polje 'Predlagatelj' ne sme ostati prazno");
		return false;
	}
		
	if (document.forma.dropdown.selectedIndex == 0) {
		alert("Polje 'Vrsta avtorstva' ne sme ostati prazno");
		return false;
	}
	
	if (document.forma.priimek.value == "") {
		alert("Polje 'Priimek' ne sme ostati prazno");
		return false;
	}
	
	if (document.forma.ime.value == "") {
		alert("Polje 'Ime' ne sme ostati prazno");
		return false;
	}
	
	
	if (document.forma.letok.value == "") {
		alert("Polje 'Leto' ne sme ostati prazno");
		return false;
	}

	if (document.forma.tipologija.value == "") {
		alert("Polje 'Tipologija' ne sme ostati prazno");
		return false;
	}
	

	if (document.forma.kw.value == "") {
		alert("Polje 'Predlagane ključne besede' ne sme ostati prazno");
		return false;
	}

	
	
	if (document.forma.leto.value == "") {
		alert("Polje 'Leto' ne sme ostati prazno");
		return false;
	}
	
	if (document.forma.sifra.value == "") {
		alert("Polje 'Šifra' ne sme ostati prazno");
		return false;
	}
	
	if (document.forma.naslov.value == "") {
		alert("Polje 'Naslov knjige, članka' ne sme ostati prazno");
		return false;
	}
	
	if (document.forma.narocnik_ime.value == "") {
		alert("Polje 'Ime in priimek' ne sme ostati prazno");
		return false;
	}
	
		
	if (document.forma.narocnik_naslov.value == "") {
		alert("Polje 'Ulica in hišna številka' ne sme ostati prazno");
		return false;
	}

	
	if (document.forma.narocnik_posta.value == "") {
		alert("Polje 'Poštna številka in pošta' ne sme ostati prazno");
		return false;
	}

	
	if (document.forma.narocnik_email.value == "") {
		alert("Polje 'Elektronski naslov' ne sme ostati prazno");
		return false;
	}

	
	if (document.forma.narocnik_telefon.value == "") {
		alert("Polje 'Telefon' ne sme ostati prazno");
		return false;
	}

	if (document.forma.potrdi.checked == false) {
		alert("Polje za potrditev 'Da, naročam obdelavo navedenega gradiva...' ne sme ostati prazno");
		return false;
	}
	
	return true;
}

     
        fields = 0;
        function addInput() {
            var obj = document.getElementById('text');
        	var div = document.createElement('div');
            div.setAttribute("class", "mytable");

            div.id = "div" + fields;
            var junc = "<table><tr>";
			junc += "<td align=left width='170'><font face='Arial' style='font-size: 1pt'>&nbsp;</font><select name='dropdown"  + fields + "' size='1' style='width: 160px; color: #333333; border: 1px solid #808080; background-color: #FFFFFF; font-family:Arial; font-size:8pt'><option selected>izberite</option><option value='avtor'>070 - avtor</option><option value='skladatelj'>230 - skladatelj</option><option value='urednik'>340 - urednik</option><option value='ilustrator'>440 - ilustrator</option><option value='intervjuvanec'>460 - intervjuvanec</option><option value='oseba, ki intervjuva'>470 - oseba, ki intervjuva</option><option value='pripovedovalec'>550 - pripovedovalec</option><option value='fotograf'>600 - fotograf</option><option value='prevajalec'>730 - prevajalec</option><option value='pisec recenzij'>901 - pisec recenzij</option><option value='mentor'>991 - mentor</option><option value='avtor dodatnega besedila, spremne besede'>080 - avtor dodatnega besedila</option><option value='drugo'>drugo</option></select></td>";			
			junc += "<td align=left width='105'><input style='WIDTH: 100px; FONT-FAMILY: arial; COLOR: #3b3b3b; FONT-SIZE: 8pt; border:1px solid #808080;' size=50 type='text' name='priimek" + fields + "' /></td>";
			junc += "<td align=left width='105'><input style='WIDTH: 100px; FONT-FAMILY: arial; COLOR: #3b3b3b; FONT-SIZE: 8pt; border:1px solid #808080;' size=50 type='text' name='ime" + fields + "' /></td>";
			junc += "<td align=left width='105'><input style='WIDTH: 100px; FONT-FAMILY: arial; COLOR: #3b3b3b; FONT-SIZE: 8pt; border:1px solid #808080;' size=50 type='text' name='leto" + fields + "' /></td>";
			junc += "<td align=left width='105'><input style='WIDTH: 100px; FONT-FAMILY: arial; COLOR: #3b3b3b; FONT-SIZE: 8pt; border:1px solid #808080;' size=50 type='text' name='sifra" + fields + "' /></td>";
			junc += "<td align=left width='200'><input style='WIDTH: 195px; FONT-FAMILY: arial; COLOR: #3b3b3b; FONT-SIZE: 8pt; border:1px solid #808080;' size=50 type='text' name='podrocje" + fields + "' /></td>";
			junc += "<td align=left width='110'><input type= 'button' name='delete' class='gumb' value='odstrani avtorja' onclick='removeInput(" + fields + ")' /></td>";
            junc += "</tr></table>";
			div.innerHTML = junc;
			fields += 1;
            obj.appendChild(div);
        }
        function removeInput(number) {
            var obj = document.getElementById('div' + number);
            document.getElementById('text').removeChild(obj);
        }





function submitForm_elocal() {
	var radioSelected = false;

	if (document.forma.ime.value == "") {
		alert("Polje 'Ime in priimek' ne sme ostati prazno");
		return false;
	}
		
		
	if (document.forma.organizacija.value == "") {
		alert("Polje 'Organizacija' ne sme ostati prazno");
		return false;
	}
	
	if (document.forma.naslov.value == "") {
		alert("Polje 'Naslov' ne sme ostati prazno");
		return false;
	}
	
	
	if (document.forma.telefon.value == "") {
		alert("Polje 'Telefon' ne sme ostati prazno");
		return false;
	}

	if (document.forma.email.value == "") {
		alert("Polje 'Email' ne sme ostati prazno");
		return false;
	}
	
	return true;
}





