﻿function changeSlika() {
var file = "a00" + String(current);
file = file.slice(file.length-3);
file = path + file + ".jpg";
document.images.Slika.src = file;
with (parent.frameOpis) {
document.open();
document.writeln("<HTML>");
document.writeln("<HEAD>");
document.writeln("<META http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">");
document.writeln("</HEAD>");
document.writeln("<body color=black bgcolor=#cccccc>");
document.writeln("<P style=\"font-family:arial,helvetica,sans-serif;font-size:10pt;line-height:13pt;text-align:center;font-style:italic;\">" + Opis[current] + "</P>");
document.writeln("</BODY></HTML>");
document.close();
 };
};

function next() {
if (current+1 <= steviloSlik) { ++current; changeSlika(); }
};

function previous() {
if (current-1 >= 1) { --current; changeSlika(); }
};

function first() { if (current != 1) {current = 1; changeSlika();} };

function last() { if (current != steviloSlik) {current = steviloSlik; changeSlika();} };

function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
};

function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == steviloSlik) ? 1 : current+1;
changeSlika();
window.setTimeout("rotate()", rotate_delay);
 }
};

function slikice() {
with (parent.frameSlikice) {
document.open();
document.writeln("<HTML>");
document.writeln("<HEAD>");
document.writeln("<META http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">");
document.writeln("<style type=\"text/css\">body {color:black;background-color:#cccccc;margin:0;border:0;padding:0;}</style>");
document.writeln("</HEAD>");
document.writeln("<BODY>");
document.writeln("<TABLE width="+steviloSlik*85+"><TR><TD align=left>");
for ( i = 0; i < steviloSlik; i++) {
var file1 = "a00" + String(i+1);
file1 = file1.slice(file1.length-3);
file1 = path + file1 + "_t.jpg";
document.writeln("<a href=\"javascript:parent.setchangeSlika("+(i+1)+")\" title=\""+Opis[i+1]+"\"><img src=\""+file1+"\" width=\"80\" height=\"80\" border=\"0\"></A>");
}
document.writeln("</TD></TR></TABLE>");
document.writeln("</BODY>");
document.writeln("</HTML>");
document.close();
 }
};

function setchangeSlika(n) { current = n; changeSlika(); };


