﻿// JavaScript Document
    <!--
	
var currentPicColor = '#6A6dbe';
var unselectedColor = '#009';
var deadLinkColor = '#ccc';
	
    var hasLoaded = false;

	//constants
    var PICTURES_ID_PREFIX = "picGalleryNoScript_";
	var PICTURES_LINK_ID_PREFIX = "pictureLink_";

        var currentPic = 0;

	//divs
	var LOADING_DIV = "picGallery_loading";


        function init() {
            hasLoaded = true;
            showDiv(0);

            if (NUMBER_OF_PICTURES >= 1) {
                document.getElementById(LOADING_DIV).style.display='none';
				//document.getElementById('totalPic').innerHTML= NUMBER_OF_PICTURES;					
            }

        }


        function showDiv(nDiv) {	
            for(var i = 0; i < NUMBER_OF_PICTURES; i++) {


                var buttonid = i;
                var id = PICTURES_ID_PREFIX + i;	
                var node = document.getElementById(id);
                if(node && i==nDiv) {
                    node.style.display='block';		
                    node.style.visibility='visible';						
                    currentPic = i;
					if(document.getElementById('currentPic'))
					{
					    document.getElementById('currentPic').innerHTML= currentPic+1;
					}
                }
                else if(node) {
                    node.style.display='none';
                    node.style.visibility='hidden';
                }		
            }
        }

        function showDivNext() {
			if(currentPic == NUMBER_OF_PICTURES - 1) {
                currentPic = -1;	
            }   
            showDiv(currentPic + 1);	
        }

        function showDivPrev() {
			if(currentPic == 0) {
                currentPic = NUMBER_OF_PICTURES;	
            }   
            showDiv(currentPic - 1);	
        }


        function ColorOver(o) {
            o.style.backgroundColor= currentPicColor;	
        }

        function ColorOut(o) {
            o.style.backgroundColor= unselectedColor;
        }

	if (document.getElementById) {
		document.onLoad = init();
	}
    //-->
