         function resetLogo() {
            document.all.Logo.style.posTop = document.body.scrollTop+32; //(document.body.clientHeight/2);
            document.all.Logo.style.posLeft = document.body.scrollLeft;
         }

         function resetLogoCenter() {
            document.all.Logo.style.posTop = document.body.scrollTop+232; //(document.body.clientHeight/2);
         }

         function resetLogoAndButtons() {
            document.all.Logo.style.posTop = document.body.scrollTop+215; //(document.body.clientHeight/2);
            document.all.Buttons.style.posTop =  document.body.clientHeight+document.body.scrollTop-55;
         }

         function resetButtons() {
            document.all.Buttons.style.posTop =  document.body.clientHeight+document.body.scrollTop-55;
         }


         function addNew(text, value) {
            // Add a new option. 
            var el = document.createElement("OPTION");
            el.text = text;
            el.value = value;
            document.all.bm.options.add(el);
         }

         function buildList() {
            /* When adding a new list item, the text is the contents
               of the anchor and the value is the name of the
               bookmark. The value is used to scroll the element into
               view */
            for (var intLoop = 0; intLoop < document.anchors.length;
                  intLoop++) 
               addNew(document.anchors[intLoop].innerText,
                      document.anchors[intLoop].name);
         }

         function scrollit(where) {
            // Scroll the specified bookmark into view.
            document.all[where.value].scrollIntoView();
            document.all[where.value].className = 'yellow';
	        // Reset list box.
	        where.value = null;
		     }


         function resetAnchors() {
         	for (var intLoop = 0; intLoop < document.anchors.length; intLoop++) 
         		document.anchors[intLoop].className = 'white';
		  	}

		function zoomin() {
			if (document.all("Photo").className != "ZoomIn")
				document.all("Photo").className = "ZoomIn"
			else
				document.all("Photo").className = "ZoomOut"
			}

function menuOn() {
	event.srcElement.className = "MenuOn";
	} 
function menuOff() {
	event.srcElement.className = "Menu";
	} 

function menuImgOn() {
	event.srcElement.className = "MenuImgOn";
	} 
function menuImgOff() {
	event.srcElement.className = "MenuImg";
	} 


function menuGo(sHREF) {
	document.all.item("InnerFrame").src=sHREF;
	}
	
// usata in WKB1.0
function openNewWindow(sFileName,nWidth,nHeight) {
  window.open(sFileName,"NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width="+nWidth+",height="+nHeight)
}

function Trim(str)
/*
        PURPOSE: Remove trailing and leading blanks from our string.
        IN: str - the string we want to Trim

        RETVAL: A Trimmed string!
*/
{
        return RTrim(LTrim(str));
}


function RTrim(str)
/*
        PURPOSE: Remove trailing blanks from our string.
        IN: str - the string we want to RTrim

        RETVAL: An RTrimmed string!
*/
{
        // We don't want to trip JUST spaces, but also tabs,
        // line feeds, etc.  Add anything else you want to
        // "trim" here in Whitespace
        var whitespace = new String(" \t\n\r");

        var s = new String(str);

        if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
            // We have a string with trailing blank(s)...

            var i = s.length - 1;       // Get length of string

            // Iterate from the far right of string until we
            // don't have any more whitespace...
            while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
                i--;


            // Get the substring from the front of the string to
            // where the last non-whitespace character is...
            s = s.substring(0, i+1);
        }

        return s;
} //LTrim(string) : Returns a copy of a string without leading spaces.

function LTrim(str)
/*
        PURPOSE: Remove leading blanks from our string.
        IN: str - the string we want to LTrim

        RETVAL: An LTrimmed string!
*/
{
        var whitespace = new String(" \t\n\r");

        var s = new String(str);

        if (whitespace.indexOf(s.charAt(0)) != -1) {
            // We have a string with leading blank(s)...

            var j=0, i = s.length;

            // Iterate from the far left of string until we
            // don't have any more whitespace...
            while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
                j++;


            // Get the substring from the first non-whitespace
            // character to the end of the string...
            s = s.substring(j, i);
        }

        return s;
}

