<!--
        function init() {
            hasLoaded = true;		
			var currImg
			// Get the query string
			location.url = /\?.+/.exec(location.href)
			// create the url array
			location.url = location.url?(location.url[0].substring(1).split('&')):[];
			// loop over the tag pairs
			for (var i=0,len=location.url.length;i<len;i++){
				var nameValuePair = location.url[i].split('=');location.url[nameValuePair[0]]=unescape(nameValuePair[1]);
				if (nameValuePair[0] == 'imageid') {   
					currImg = unescape(nameValuePair[1])
					} else {
						currImg = 0
					}
				}
			
            showDiv(currImg);

            if (NUMBER_OF_PICTURES > 0) {
                document.getElementById(LOADING_DIV).style.display='none';
                document.getElementById(NAVBOX_DIV).style.display='block';
                document.getElementById(PICTURES_LINK_ID_PREFIX + currentPic).style.background= currentPicColor;
            }

           // if (document.getElementById(THUMBNAILS_DIV)) {
		//document.getElementById(THUMBNAILS_DIV).style.display='block';
           // }
        }

        function doBgColor() {
            for(var i = 0; i < NUMBER_OF_PICTURES; i++) {
                document.getElementById(PICTURES_LINK_ID_PREFIX + i).style.background= unselectedColor;
            }		
            document.getElementById(PICTURES_LINK_ID_PREFIX + currentPic).style.background= currentPicColor;
        }

        function doNextColor() {
            document.getElementById(BACK_DIV).style.color= unselectedColor;
          	if (document.getElementById(NEXT_DIV)){ 
		 	  if(currentPic < (NUMBER_OF_PICTURES - 1)) {				
                document.getElementById(NEXT_DIV).style.color= unselectedColor;
				}
             else {
				document.getElementById(NEXT_DIV).style.color= deadLinkColor;
           		}
			}	
       }

        function doBackColor(){
				if (document.getElementById(NEXT_DIV)){ 
            document.getElementById(NEXT_DIV).style.color= unselectedColor;
	
            if(currentPic > 0) {
                document.getElementById(BACK_DIV).style.color= unselectedColor;
            } else {
                document.getElementById(BACK_DIV).style.color= deadLinkColor;
           	 }		
			}
        }

        function showDiv(nDiv) {	
		
            for(var i = 0; i < NUMBER_OF_PICTURES; i++) {
				//disable previous link
				//if (NUMBER_OF_PICTURES == (nDiv+1)) {document.getElementById(BACK_DIV).style.color= deadLinkColor;}
				//disable next link
				//if (1 == (nDiv+1)) {document.getElementById(NEXT_DIV).style.color= deadLinkColor;}
		if (NUMBER_OF_PICTURES > 1) {
			        document.getElementById(PICTURES_LINK_ID_PREFIX + i).style.background= unselectedColor;
						if (document.getElementById(NEXT_DIV)){ 
                    document.getElementById(NEXT_DIV).style.color= unselectedColor;
                    document.getElementById(BACK_DIV).style.color= unselectedColor;	
						}
		}

                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 (NUMBER_OF_PICTURES > 1) {
                        document.getElementById(PICTURES_LINK_ID_PREFIX + currentPic).style.background= currentPicColor;
                    }
                } else if(node) {
                    node.style.display='none';
                    node.style.visibility='hidden';
                }		
            }
        }

        function showDivNext() {
            if(currentPic < (NUMBER_OF_PICTURES - 1)) {
                showDiv(currentPic + 1);	
                doBgColor();	
                doNextColor();
            }   
        }

        function showDivPrev() {
            if(currentPic > 0) {
                showDiv(currentPic - 1);
                doBgColor();	
                doBackColor();		
            }
        }

        function ColorOver(o) {
            o.style.backgroundColor= currentPicColor;	
        }

        function ColorOut(o) {
            o.style.backgroundColor= unselectedColor;
            document.getElementById(PICTURES_LINK_ID_PREFIX + currentPic).style.background= currentPicColor;
        }

	if (document.getElementById) {
		document.onLoad = init();
	}
    //-->
