		// *** FUNCTION: changeCursor *** //

		function changeCursor(strCursorType) {

			if (strCursorType != '' ) {
				document.body.style.cursor=strCursorType;
			}

		}


		// *** FUNCTION: imageSwap *** //

		function imageSwap(layerID,ImageName,newImage) {
			if (document.getElementById) {
				document.images[ImageName].src = newImage;
			}else if (document.all) {
				if (layerID != '') {
					document.all[layerID].document.images[ImageName].src = newImage;
				}
			} else if (document.layers) {
				if (layerID != '') {
					document.layers[layerID].document.images[ImageName].src = newImage;
				}
			}
		}

		// *** FUNCTION: returnWindowHeight *** //

		function returnWindowHeight(windowRef) {

			var height = 0;

			if (!windowRef) {
				windowRef = window;
			}
			if (typeof(windowRef.innerWidth) == 'number') {
				height = windowRef.innerHeight;
			}
			if (windowRef.document.body && typeof(windowRef.document.body.clientHeight) == 'number') {
				height = windowRef.document.body.clientHeight;
			}

			return height;
		}

		// *** FUNCTION: positionLayerCentral *** //

		function positionLayerCentral(layerID,intLyrWidth,intLayerHeight) {

			var lyr = new getObj(layerID);

			var intHalfWindowWidth = parseInt(returnWindowWidth())/2;
			var intHalfLayerWidth = parseInt(intLyrWidth)/2;
			var intXPosition = 0;

			if ( intHalfWindowWidth >= (intLyrWidth/2) ) {
				intXPosition = intHalfWindowWidth - intHalfLayerWidth;
			}

			var intHalfWindowHeight = parseInt(returnWindowHeight())/2;
			var intHalfLayerHeight = parseInt(intLayerHeight)/2;
			var intYPosition = 0;

			if ( intHalfWindowWidth >= (intLayerHeight/2) ) {
				var intYPosition = intHalfWindowHeight - intHalfLayerHeight;
			}

			lyr.style.left = intXPosition;
			lyr.style.top = intYPosition;

		}

		// *** FUNCTION: positionLayerFromCentre *** //

		function positionLayerFromCentre(layerID,intLyrWidth,intLayerHeight,intX,intY) {

			var lyr = new getObj(layerID);

			var intHalfWindowWidth = parseInt(returnWindowWidth())/2;

			//alert(returnWindowWidth());

			var intHalfLayerWidth = parseInt(intLyrWidth)/2;
			var intXPosition = 0;

			if ( intHalfWindowWidth >= (intLyrWidth/2) ) {
				intXPosition = intHalfWindowWidth - intHalfLayerWidth;
			}

			var intHalfWindowHeight = parseInt(returnWindowHeight())/2;
			var intHalfLayerHeight = parseInt(intLayerHeight)/2;
			var intYPosition = 0;

			if ( intHalfWindowWidth >= (intLayerHeight/2) ) {
				var intYPosition = intHalfWindowHeight - intHalfLayerHeight;
			}

			//alert(intHalfWindowWidth+','+intHalfLayerWidth+','+intXPosition+'\n'+intHalfWindowHeight+','+intHalfLayerHeight+','+intYPosition);

			lyr.style.left = intXPosition + intX;
			lyr.style.top = intYPosition + intY;

		}


		// *** FUNCTION: toggleLayerVisibility *** //

		function toggleLayerVisibility(layerID) {

			var lyr = new getObj(layerID);

			if (layerID != "NULL") {
				if(lyr.style.visibility == "hidden" || lyr.style.visibility == "hide"){
						lyr.style.visibility = "visible";
				} else {
						lyr.style.visibility = "hidden";
				}
			}
		}



		// *** FUNCTION: checkLabelVisibilityAndHide *** //

		function checkLabelVisibilityAndHide(layerID) {

			var lyr = new getObj(layerID);

			if(lyr.style.visibility != "hidden" || lyr.style.visibility != "hide") {
				lyr.style.visibility = "hidden";
			}
		}



		// *** FUNCTION: checkLabelVisibilityAndShow *** //

		function checkLabelVisibilityAndShow(layerID) {

			var lyr = new getObj(layerID);

			if(lyr.style.visibility == "hidden" || lyr.style.visibility == "hide") {
				lyr.style.visibility = "visible";
			}
		}

		// *** FUNCTION: getObj *** //

		function getObj(name) {
			if (document.getElementById) {
				this.obj = document.getElementById(name);
				this.style = document.getElementById(name).style;
			} else if (document.all) {
				this.obj = document.all[name];
				this.style = document.all[name].style;
			} else if (document.layers) {
				this.obj = document.layers[name];
				this.style = document.layers[name];
			}
		}

		function showHelp() {

			positionLayerCentral('help',450,350);
			checkLabelVisibilityAndShow('help');
		}

		function showintro() {
			positionLayerCentral('intro',450,350);
			checkLabelVisibilityAndShow('intro');
		}

		function showsoftware() {
			positionLayerCentral('software',450,350);
			checkLabelVisibilityAndShow('software');
		}

		var intTimer;

		function toggleAlphaSetting(objLayerID,intAlpha) {

			var lyr = new getObj(objLayerID);
			//lyr.style.filter:alpha(opacity=intAlpha);
			//filter:alpha(opacity="+i_strngth+")

			if (intAlpha < 100 ) {

				intAlpha = intAlpha + 10;
				intTimer = setTimeout("toggleAlphaSetting('"+objLayerID+"',"+intAlpha+")",10);

			}

		}
