function replaceImage(imID, imSRC) {
	var d = document.all[imID];
	if (typeof(d) == 'object') {
		d.src = imSRC;
	}
}
NewWindow=null;
function ViewImage(src, title, w, h ){
	if (NewWindow) { NewWindow.close(); }
	if (typeof(w)=="undefined" || w=="") w = img.width>0 ? img.width : 600;
	if (typeof(h)=="undefined" || h=="") h = img.height>0 ? img.height : 400;
	w = w-1+21;
	h = h-1+21;
	if (NewWindow==null || NewWindow.closed) {
		if (typeof(title)=="undefined" || title=="") title="Gallery";
		settings=
		 "left="+(screen.width-w)/2+","
		 +"top="+(screen.height-h)/2+","
		 +"width="+w+","
		 +"height="+h+","
		 +"toolbar=no,"
		 +"location=no,"
		 +"directories=no,"
		 +"status=no,"
		 +"menubar=no,"
		 +"scrollbars=no,"
		 +"resizable=no"
		 NewWindow = window.open("",'Gallery',settings);
	}
	NewWindow.document.open();
	NewWindow.document.clear();
	NewWindow.document.write(
 	 "<html><head><title>"+ title +"</title>"
	+"</head>\n"
	+"<body topmargin=0 leftmargin=0 bgcolor=#FFFFFF onclick=\"window.close();\">\n"
	+"<table width=\"100%\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=0><tr><td align=\"center\" valign=\"middle\"><img src=" + src + " border=0 alt=\""+title+"\"></td></tr></table>\n"
	+"</body>\n"
	+"</html>"
	);
	NewWindow.document.close();
	NewWindow.focus();
}

function FormTransfer(bool1,bool2) {
	if (bool1 || bool2) {
		document.all.transferDIV.style.display = "";
	}
	else document.all.transferDIV.style.display = "none";
}

function goNextField(field,value) {
	if (value.length == 4) {
		document.all[field].focus();
	}
}

NewWindow2 = null;
function ShowWin(adreska, w, h){
if(NewWindow2){NewWindow2.close();}
if(NewWindow2==null || NewWindow2.closed){
 settings=
 "left=20,"
 +"top=20,"
 +"width=" + w + ","
 +"height=" + h + ","
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=yes,"
 +"resizable=yes"
 NewWindow2 = window.open(adreska,'okno',settings);
}
NewWindow2.focus();
}

function blik_proc(element,color1,color2) {
	var d = document.all[element];
	if (typeof(d) == 'object') {
		if (d.style.color == color1) {
			d.style.color = color2;
		}
		else {
			d.style.color = color1;
		}
	}
}
function blik(element,color1,color2,interval) {
	window.setInterval("blik_proc('"+element+"','"+color1+"','"+color2+"')",interval);
}