// 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", "");
				}
			}
		}
	}
}

NumberOfImagesToRotate = 6;

// Specify the first and last part of the image tag.
FirstPart = '<img src="images/img';
LastPart = '.jpg" class="imageAlignRight">';

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

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";
	}
}

function embedFlash(){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="555" height="192">');
	document.write('<param name="movie" value="swf/shell_banners.swf" />');
	document.write('<param name="quality" value="high" /><param name="wmode" value="opaque" /><param name="allowScriptAccess" value="sameDomain" />');
	document.write('<embed src="swf/shell_banners.swf" quality="high" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" width="555" height="192"></embed>');
	document.write('</object>');
	}
