// JavaScript Document

function changeCopyrightDate(){
	var captionElement = document.getElementById("copyrightDate");
	var now = new Date;
	var year = now.getFullYear();
	captionElement.innerHTML = year;
}

function startList(thisDiv) {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById(thisDiv);
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function switchDiv(showDiv, hideDiv, lnk){
	if(showDiv != ""){
		if(showDiv == "serviceLinkIcon"){
			if(lnk != "undefined"){
				topPosition = Math.round(document.getElementById(lnk).offsetTop + (document.getElementById(lnk).offsetHeight/2 - 7));
				
				document.getElementById(showDiv).style.top = topPosition+"px";
				document.getElementById(showDiv).style.left = "125px";
			}
		}
		
		document.getElementById(showDiv).style.display = "block";
	}
	if(hideDiv != ""){
		document.getElementById(hideDiv).style.display = "none";
	}
}

NumberOfImagesToRotate = 2;

// Specify the first and last part of the image tag. Customize width, height.

FirstPart = '<img src="images/img_randomaquatic';
LastPart = '.jpg" width="236" height="126" class="imageAlignRight">';

function printImageRandom1() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}

NumberOfImagesToRotate = 16;

// Specify the first and last part of the image tag. Customize width, height.

FirstPart = '<img src="images/img_random';
LastPart = '.jpg" width="180" height="140" class="imageAlignRight">';

function printImageRandom2() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}