<!--
var arrTemp = self.location.href.split("?"); 
var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
var NS = (navigator.appName=="Netscape")?true:false;

function FitPic() { 
	iWidth = (NS)?window.innerWidth:document.body.clientWidth;
	iHeight = (NS)?window.innerHeight:document.body.clientHeight;
	iWidth = document.images[0].width - iWidth;
	iHeight = document.images[0].height - iHeight;
	window.resizeBy(iWidth, iHeight);
	//window.moveTo((screen.width / 2) - (document.images[0].width / 2), (screen.height / 2) - (document.images[0].height / 2));
	self.focus();
 }

function ClearBox(txtInput,txtValue) {
	var elem = document.getElementById(txtInput);
	
	if (elem.value == txtValue) {
		elem.value = "";
	} else {
		if (elem.value == "") {
			elem.value = txtValue
		}
	}
}

function disableForm(theform) {
	if (document.all || document.getElementById) {
		for (i = 0; i < theform.length; i++) {
			var tempobj = theform.elements[i];

			if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset") {
				tempobj.disabled = true;

				if (tempobj.type.toLowerCase() == "submit") {
					tempobj.value = "Please Wait..."
				}
			}
		}
		return true;
	} else {
		return false;
	}
}

function PopupPic(sPicURL) {
	var winProp = 'width=50,height=50,left=200,top=200,scrollbars=0,resizable=1,menubar=no';
	window.open("popup.html?"+sPicURL, "Photo", winProp);
}

function PopupVid(sVidURL) {
	var winProp = 'width=320,height=255,left=200,top=200,scrollbars=0,resizable=1,menubar=no';
	window.open("media-player.html, "Media", winProp);
}

function Popup(sURL,sName,sWidth,sHeight) {
	var winProp = 'width=' + sWidth + ',height=' + sHeight + ',left=200,top=200,scrollbars=0,resizable=1,menubar=no';
	window.open(sURL, sName, winProp);
}

//function that shows or hides a layer
function ShowHideLayer(lay) {
    var elem = document.getElementById(lay);

	if (elem.style.display == "") {
		elem.style.display = "none";
	} else {
		elem.style.display = "";
	}
}

// preload ButtonOn Images to improve initial swap time
var aButtons = new Array();

aButtons[0] = new Image();
aButtons[0].src = "Images/nav_home_on_01.gif";
aButtons[1] = new Image();
aButtons[1].src = "Images/nav_about_on_01.gif";
aButtons[2] = new Image();
aButtons[2].src = "Images/nav_awards_on_01.gif";
aButtons[3] = new Image();
aButtons[3].src = "Images/nav_staff_on_01.gif";
aButtons[4] = new Image();
aButtons[4].src = "Images/nav_services_on_01.gif";
aButtons[5] = new Image();
aButtons[5].src = "Images/nav_testimonials_on_01.gif";
aButtons[6] = new Image();
aButtons[6].src = "Images/nav_studio_on_01.gif";
aButtons[7] = new Image();
aButtons[7].src = "Images/nav_gallery_on_01.gif";
aButtons[8] = new Image();
aButtons[8].src = "Images/nav_login_on_01.gif";
aButtons[9] = new Image();
aButtons[9].src = "Images/nav_contact_on_01.gif";

// SwapButton is called from the WebMenu OnShow and OnHide events
// state is "on" or "off" and id is the WM.Group ID property
function SwapButton(id, state) {
	if(state == "on")
		eval(id + ".src='Images/nav_" + id + "_on_01.gif'");
	else if(state == "off")
		eval(id + ".src='Images/nav_" + id + "_01.gif'");
}

function makeClickableLabels() {
	if ((!document.body.children) || 
	(typeof window.opera != "undefined") ||
	(navigator.appVersion.indexOf("Mac") != -1)) return;
	
	var labels = document.getElementsByTagName("label"); 
	var len = labels.length;
	for (var i=0;  i<len;  i++)
	{
		if (labels[i].className.indexOf("clickable") != -1)
		{
			labels[i].onclick = function() {this.children[0].click(); }
			labels[i].setAttribute("unselectable","on"); //aesthetic improvement for IE
		}
	}
}

window.onload = function() {
	makeClickableLabels();
}

// function that sets focus to the first form element
function PlaceFocus() {
	if (document.forms.length > 0) {
		var field = document.forms[0];

		for (i = 0; i < field.length; i++) {
			if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s") && (field.elements[i].disabled != true)) {
				document.forms[0].elements[i].focus();
				break;
			}
		}
	}
}
// -->