function pokazic(ppok){
if (document.forma3.temp.value!='') {
showHideSpan(document.forma3.temp.value, 0);
eval('document.forma.' + document.forma3.temp.value + '.disabled=true;');
document.forma3.temp.value=ppok;
showHideSpan(document.forma3.temp.value, 1);
eval('document.forma.' + document.forma3.temp.value + '.disabled=false;');
} else {
document.forma3.temp.value=ppok;
eval('document.forma.' + ppok + '.disabled=false;');
}

showHideSpan(ppok, 0);
showHideSpan(ppok, 1);
}


function sakrijc(ppok){
showHideSpan(ppok, 0);
showHideSpan(ppok, 1);
}


function sakrijch(ppok){
showHideSpan('id' + ppok, 0);
showHideSpan(ppok, 1);
}



//FUNKCIJA  ZA  PROBJENE  STILA  NA  NEKOM  ID-u
function change(id, newClass) {
identity=document.getElementById(id);
identity.className=newClass;
}




function pokazich(ppok){
	if (document.forma3.temp.value!='') {
		showHideSpan('id' + document.forma3.temp.value, 0);
		showHideSpan(document.forma3.temp.value, 1);
		document.forma3.temp.value=ppok;
		showHideSpan(ppok, 0);
		showHideSpan('id' + ppok, 1);
	} else {
		showHideSpan(ppok, 0);
		showHideSpan('id' + ppok, 1);
		document.forma3.temp.value=ppok;
	}
}



var a=0;

function brisanje(urlbrisi) {
var pitanje = window.confirm("Jeste li sigurni da želite obrisati ovaj unos i sve pripadajuće slike i komentare?");
if (pitanje)
 { 
 window.location.href=urlbrisi;
}
}

function ChangeImgSrc(elId, newsrc){
var el;
if (document.getElementById) {el=document.getElementById(elId)}
if (document.all) {el=eval("document.all." + elId)}
if (el == undefined) return;
el.src = "images/" + newsrc
}

function showHideSpan(elId, showhide){
var el;
if (document.getElementById) {el=document.getElementById(elId)}
if (document.all) {el=eval("document.all." + elId)}
if (el == undefined) return;
if (showhide==1) {el.style.display='block';}
else {el.style.display='none';}
}

function pokazi(ppok){
showHideSpan(ppok, 1);
}

function sakrij(ppok){
showHideSpan(ppok, 0);
}

function mbar(str) {
st=document.getElementById(str)
eval(st).style.backgroundColor= '#fff7dc';
}


function pbar(str) {
st=document.getElementById(str)
eval(st).style.backgroundColor= '#336699';
}

function sbar(str) {
st=document.getElementById(str)
eval(st).style.backgroundColor= '#e5ecf4';
}

function cbar(str) {
st=document.getElementById(str)
eval(st).style.backgroundColor= '';
}

function gbar(str) {
st=document.getElementById(str)
eval(st).style.backgroundColor= '#336600';
}

			

function prikazidetalje(id){
	if (document.getElementById(id).style.display == "none") {
		document.getElementById(id).style.display = "";
	} else {
		document.getElementById(id).style.display = "none";
	}
}

function otvorinovi(koga) {

window.open(koga,'hotelapp','top=20,left=120,menubar=no, scrollbars=yes,width=770,height=540');

}

