function showBaloon(obj) {
	var ob = document.getElementById(obj);
	ob.style.display="block";


}
function hideBaloon(obj) {
	var ob = document.getElementById(obj);
	ob.style.display="none";

}

function emptyBox(obj) {
	if(document.getElementById(obj).value=='') {
		alert('Vnosno polje je prazno!\nČe želite dodati artikel, izpolnite vnosno polje.');
	}	else {
		document.location.href="javascript: ajax('GET', 'index.php?module=potrebscine&op=dodajArtikel&artikel='+document.form.dodaj.value+'&ajax=1', 'potrebscine')"
		}
}
function mOver(obj, row, over, fOver) {
	obj.style.background = over;
	
	if(row) {
		var obj2 = document.getElementById(row);
		obj2.style.visibility = "visible";
	}
	if(fOver)
		obj.style.color = fOver;
	
}
function mOut(obj, row, over, fOver) {
	obj.style.background = over;
		
	if(row) {
		var obj2 = document.getElementById(row);
		obj2.style.visibility = "hidden";
	}
	if(fOver)
		obj.style.color = fOver;

}
function mFocus(obj) {
	obj.style.borderBottomWidth = "2px";
	obj.style.borderBottomColor = "#006e92";
	obj.style.paddingBottom = "1px";
	
}
function mBlur(obj) {
	obj.style.borderBottomWidth = "1px";
	obj.style.borderBottomColor = "#7fb6c8";
	obj.style.paddingBottom = "2px";
}

function zapriDiv(divID) {
	var obj= document.getElementById(divID);
	obj.style.visibility = "hidden";
}

function odpriDiv(divID) {
	var obj= document.getElementById(divID);
	obj.style.visibility = "visible";
}

function makesure() {
	if (confirm('Ali ste prepričani, da želite zbrisati?')) {
		return true;
	} else {
		return false;
	}
}

function makesureKupljeno() {
	if (confirm('Ali ste prepričani, da želite označiti artikle za kupljene? Pozor: Artikli bodo izbrisani s seznama.')) {
		return true;
	} else {
		return false;
	}
}

function makesurePovozi() {
	if (confirm('Ali ste prepričani, da želite datoteko premakniti v arhiv? Pozor: Če datoteka s tem imenom že obstaja jo boste povozili!')) {
		return true;
	} else {
		return false;
	}
}

function makesureObnovi() {
	if (confirm('Ali ste prepričani, da želite datoteko obnoviti? Pozor: Če datoteka s tem imenom že obstaja jo boste povozili!')) {
		return true;
	} else {
		return false;
	}
}




var shitKeyDown = false;

function mouseDown(e) {
 var ctrlPressed=0;
 var altPressed=0;
 var shiftPressed=0;

 if (parseInt(navigator.appVersion)>3) {

  var evt = navigator.appName=="Netscape" ? e:event;

  if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) {
   // NETSCAPE 4 CODE
   var mString =(e.modifiers+32).toString(2).substring(3,6);
   shiftPressed=(mString.charAt(0)=="1");
   ctrlPressed =(mString.charAt(1)=="1");
   altPressed  =(mString.charAt(2)=="1");
   self.status="modifiers="+e.modifiers+" ("+mString+")"
  }
  else {
   // NEWER BROWSERS [CROSS-PLATFORM]
   shiftPressed=evt.shiftKey;
   altPressed  =evt.altKey;
   ctrlPressed =evt.ctrlKey;
   self.status=""
    +  "shiftKey="+shiftPressed 
    +", altKey="  +altPressed 
    +", ctrlKey=" +ctrlPressed 
  }
  if (shiftPressed || altPressed || ctrlPressed) { 

	   shitKeyDown = true;
   } else {
   	   shitKeyDown = false;
   }
 }
 return true;
}
if (parseInt(navigator.appVersion)>3) {
 document.onmousedown = mouseDown;
 if (navigator.appName=="Netscape") 
  document.captureEvents(Event.MOUSEDOWN);
}


function deselectAll() {
	if (document.selection) {
    	document.selection.empty();
    } else {
    	window.getSelection().removeAllRanges();
    }
}
