﻿		function preload() {
			if (document.images) {
				menu1 = new Image(104, 40);
				menu1.src = '/images/vbutton.png';
				menu2 = new Image(104, 40);
				menu2.src = '/images/vbuttonover.png';
				menu3 = new Image(104, 40);
				menu2.src ='/images/vbuttonactive.png';
				image1 = new Image(350, 264);
				image1.src = '/photos/aboutimg1.jpg';
				image2 = new Image(221, 350);
				image2.src = '/photos/aboutimg2.jpg';
				image3 = new Image(350, 264);
				image3.src = '/photos/aboutimg3.jpg';
				image4 = new Image(232, 350);
				image4.src = '/photos/aboutimg4.jpg';
				image5 = new Image(350, 233);
				image5.src = '/photos/aboutimg5.jpg';
				image6 = new Image(234, 350);
				image6.src = '/photos/aboutimg6.jpg';
			}
		}
		function startRotate() {
			if (idx > limit) {
				idx = 1;
			}
			if (idx < 1) {
				idx = 1;
			}
			image = document.getElementById(imgId);
			image.src = '/photos/' + imgId + idx + ext;
			setOpacity(image, 0);
			image.style.visibility = 'visible';
			fadeIn(imgId,0);
		}
		function setOpacity(obj, opacity) {
			opacity = (opacity == 100)?99.999:opacity;
			// IE/Win
			obj.style.filter = "alpha(opacity:"+opacity+")";
			// Safari<1.2, Konqueror
			obj.style.KHTMLOpacity = opacity/100;
			// Older Mozilla and Firefox
			obj.style.MozOpacity = opacity/100;
			// Safari 1.2, newer Firefox and Mozilla, CSS3
			obj.style.opacity = opacity/100;
		}
		function fadeIn(objId,opacity) {
			if (document.getElementById) {
				obj = document.getElementById(objId);
				if (opacity <= 100) {
					setOpacity(obj, opacity);
					opacity += 10;
					window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
				} else {
					window.setTimeout("fadeOut('"+objId+"', 100)", 4000);
				}
			}
		}
		function fadeOut(objId,opacity) {
			if (document.getElementById) {
				obj = document.getElementById(objId);
				if (opacity > 0) {
					setOpacity(obj, opacity);
					opacity -= 10;
					window.setTimeout("fadeOut('"+objId+"',"+opacity+")", 100);
				} else {
					idx++;
					window.setTimeout("startRotate()", 50);
				}
			}
		}
		function changeClass(objid, classid) {
			if (document.getElementById) {
				document.getElementById(objid).setAttribute("className", classid);
			}
		}
		function noenter() {
			return !(window.event && window.event.keyCode == 13);
		}
		function validateContact() {
			rtn = true;
			message = "";
			if (document.apptrequest.name.value == "") {
				rtn = false;
				message += "Full name is required\r\n";
			}
			if (document.apptrequest.email.value == "") {
				rtn = false;
				message += "Email address is required\r\n";
			}
			if (document.apptrequest.phone.value == "") {
				rtn = false;
				message += "Phone number is required\r\n";
			}
			if (!rtn) {
				alert(message);
			}
			return rtn;
		}
		function getip() {
			document.apptrequest.ip.value = ip;
		}
		function testing(message) {
			alert(message);
		}
