// start: get generic browser type
NN = (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) != "5")?true:false;
IE = (navigator.appName != "Netscape")?true:false;


// start: select the appropriate stylesheet
if (!path) var path = ""; // if the path variable was set before the call to this (.js) file

if (NN)
	document.write("<LINK REL=stylesheet HREF=\""+path+"inc/nn4.css\" TYPE=\"text/css\">");
else
	document.write("<LINK REL=stylesheet HREF=\""+path+"inc/default.css\" TYPE=\"text/css\">");

	

// ----------------------------------------------------------------------------------
// start: form validator script
function checkForm(form){
	/*
	Use a hidden input on the submitting form called 
		required to send required field names.
	Just separate the field names with commas like this: 
		<input type="hidden" name="required" value="emailAddress,firstName,lastName">
	If you need all fields required then change the value="all"
	If you don't need the form to be validated, then don't call the script or 
		just omit the hidden input or leave the value empty.
	*/
	
	required = (form.required && form.required.value)?form.required.value:false;
	requiredFields = required.split(',');
	
	if (required && required != "all"){
		for(a=0;a<requiredFields.length;a++){
			currentName = eval("form."+requiredFields[a]+".name");
			currentValue = eval("form."+requiredFields[a]+".value");
			if(!currentValue && currentName != "emailAddress" && currentName != "email"){
				alert("You must supply information for all of the required fields.");
				eval("form."+requiredFields[a]+".value = ''");
				eval("form."+requiredFields[a]+".focus()");
				return false;
			}
			else if (currentName == "emailAddress" && (currentValue.indexOf("@") == -1 || currentValue.indexOf("\.") == -1 || currentValue.length < 5 || currentValue == "asdf@asdf.com") || currentName == "email" && (currentValue.indexOf("@") == -1 || currentValue.indexOf("\.") == -1 || currentValue.length < 5 || currentValue == "asdf@asdf.com")){
				alert("You must supply a valid email address.");
				eval("form."+requiredFields[a]+".value = ''");
				eval("form."+requiredFields[a]+".focus()");
				return false;
			}
		}
	}
	else if (required && required == "all"){
		for(i=0;i<form.elements.length;i++){
			if (!form.elements[i].value && form.elements[i].name != "emailAddress" && form.elements[i].name != "email"){
				alert("You must supply information for all of the required fields.");
				form.elements[i].focus();
				return false;
			}
			else if (form.elements[i].name == "emailAddress" && (form.elements[i].value.indexOf("@") == -1 || form.elements[i].value.indexOf("\.") == -1 || form.elements[i].value.length < 5 || form.elements[i].value == "asdf@asdf.com")){
				alert("You must supply a valid email address.");
				form.elements[i].value = "";
				form.elements[i].focus();
				return false;
			}
		}
	}
	else{
		return true;
	}
}
// end: form validator script
// ----------------------------------------------------------------------------------


		function msover(img,ref)
			{
					document.images[img].src = ref;
			}
	
		function msout(img,ref)
			{
					document.images[img].src = ref;
			}
			
		xx = new Image();
		xx.src="images/buttons/bridal_on.gif";
		xxx = new Image();
		xxx.src="images/buttons/home_on.gif";
		xxxx = new Image();
		xxxx.src="images/buttons/pet_on.gif";


function playVideoPet(){
	document.write("<object id=\"MediaPlayer\" width=320 height=286 classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" standby=\"Loading Windows Media Player components…\" type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112\">");
	document.write("<param name=\"filename\" value=\"http://www.showevent.com/inc/movs/petshowsweb_384K_Stream.wmv\">");
	document.write("<param name=\"Showcontrols\" value=\"True\">");
	document.write("<param name=\"autoStart\" value=\"True\">");
	document.write("<embed type=\"application/x-mplayer2\" src=\"http://www.showevent.com/inc/movs/petshowsweb_384K_Stream.wmv\" name=\"MediaPlayer\" width=320 height=240 ShowContorls=\"1\" autostart=\"1\"></embed>");
	document.write("</object>");
}

function playVideoHome(){
	document.write("<object id=\"MediaPlayer\" width=320 height=286 classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" standby=\"Loading Windows Media Player components…\" type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112\">");
	document.write("<param name=\"filename\" value=\"http://www.showevent.com/inc/movs/homeshowweb_384K_Stream.wmv\">");
	document.write("<param name=\"Showcontrols\" value=\"True\">");
	document.write("<param name=\"autoStart\" value=\"True\">");
	document.write("<embed type=\"application/x-mplayer2\" src=\"http://www.showevent.com/inc/movs/homeshowweb_384K_Stream.wmv\" name=\"MediaPlayer\" width=320 height=240 ShowContorls=\"1\" autostart=\"1\"></embed>");
	document.write("</object>");
}

function playVideoWedding(){
	document.write("<object id=\"MediaPlayer\" width=320 height=286 classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" standby=\"Loading Windows Media Player components…\" type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112\">");
	document.write("<param name=\"filename\" value=\"http://www.showevent.com/inc/movs/bridalshowsweb_384K_Stream.wmv\">");
	document.write("<param name=\"Showcontrols\" value=\"True\">");
	document.write("<param name=\"autoStart\" value=\"True\">");
	document.write("<embed type=\"application/x-mplayer2\" src=\"http://www.showevent.com/inc/movs/bridalshowsweb_384K_Stream.wmv\" name=\"MediaPlayer\" width=320 height=240 ShowContorls=\"1\" autostart=\"1\"></embed>");
	document.write("</object>");
}