// open big picture
function openBig(picN)
{
	var source = 'bigPic.asp?picN='+ picN;
	win = window.open(source, "galleryBig", "top=0, left=0, width=350, height=400, status=no, resizable, scrollbars=yes")
	window.focus;
}


// hide all divs on onload
function hideDivs()
{
	var arrayOfDivs = document.all.tags("div");
	for (i=0 ; i< arrayOfDivs.length ; i++) {
		arrayOfDivs[i].style.visibility = 'hidden';
	}
}



// handle the sub menu opener
function dispSub(id,status,pos)
{
	var leftPos = ((screen.width-528)/2)+pos;
	document.all[id].style.left=leftPos;
	document.all[id].style.visibility=status;
}


// handle the menu over
function menuOver(id,img,fld)
{
	document.all[id].src = eval(img);
	document.all[fld].style.borderColor = '#751119';
}

// handle the menu out
function menuOut(id,img,fld)
{
	document.all[id].src = eval(img);
	document.all[fld].style.borderColor = '#A2A2A2';
}

// handle the Sub menu over
function menuOverSub(id,img)
{
	document.all[id].src = eval(img);
}



function checkForm()
{
	var fContact = document.contactForm;
	// last name
	if (fContact.Lname.value==""){
		fContact.Lname.style.backgroundColor="red";
	}
	
	// first name
	if (fContact.Fname.value==""){
		fContact.Fname.style.backgroundColor="red";
	}
	
	// city name
	if (fContact.City.value==""){
		fContact.City.style.backgroundColor="red";
	}
	
	// state name
	if (fContact.State.value==""){
		fContact.State.style.backgroundColor="lightYellow";
	}
	
	// other explanation
	if (fContact.Iam.value=="Other" && fContact.Notes.value==""){
		fContact.Notes.style.backgroundColor="red";
	}
	
	// email validation
	var mail = document.contactForm.Email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");

	if (mail=='') {
		fContact.Email.style.backgroundColor="red";
	}
	
	if (mail!="") {
		if (x==-1 || y==-1) {
			fContact.Email.style.backgroundColor="red";
		}
	}
	
	// Best Time to Call
	if (fContact.Tel.value!="" && fContact.BestTime.value==""){
		fContact.BestTime.style.backgroundColor="red";
	}
		
	// Topic
	if (fContact.Topic.value==""){
		fContact.Topic.style.backgroundColor="red";
	}
	
	// Message
	if (fContact.Message.value==""){
		fContact.Message.style.backgroundColor="red";
	}
	
}

function checkHotel()
{
	var fContact = document.contactForm;
	// last name
	if (fContact.Lname.value==""){
		fContact.Lname.style.backgroundColor="red";
	}
	
	// first name
	if (fContact.Fname.value==""){
		fContact.Fname.style.backgroundColor="red";
	}
	
	//hotel
	if (fContact.Company.value==""){
		fContact.Company.style.backgroundColor="red";
	}
	
	//Position
	if (fContact.Position.value==""){
		fContact.Position.style.backgroundColor="red";
	}
	
	// city name
	if (fContact.City.value==""){
		fContact.City.style.backgroundColor="red";
	}
	
	// state name
	if (fContact.State.value==""){
		fContact.State.style.backgroundColor="lightYellow";
	}
	
	// tel
	if (fContact.Tel.value==""){
		fContact.Tel.style.backgroundColor="red";
	}
	
	// Best Time to Call
	if (fContact.BestTime.value==""){
		fContact.BestTime.style.backgroundColor="red";
	}	
	
	// email validation
	var mail = document.contactForm.Email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");

	if (mail=='') {
		fContact.Email.style.backgroundColor="red";
	}
	
	if (mail!="") {
		if (x==-1 || y==-1) {
			fContact.Email.style.backgroundColor="red";
		}
	}
	
	// Topic
	if (fContact.Topic.value==""){
		fContact.Topic.style.backgroundColor="red";
	}
	
	// Message
	if (fContact.Message.value==""){
		fContact.Message.style.backgroundColor="red";
	}
	
}

function checkTravel()
{
	var fContact = document.contactForm;
	// last name
	if (fContact.Lname.value==""){
		fContact.Lname.style.backgroundColor="red";
	}
	
	// first name
	if (fContact.Fname.value==""){
		fContact.Fname.style.backgroundColor="red";
	}
	
	// city name
	if (fContact.City.value==""){
		fContact.City.style.backgroundColor="red";
	}
	
	// state name
	if (fContact.State.value==""){
		fContact.State.style.backgroundColor="lightYellow";
	}
	
	// email validation
	var mail = document.contactForm.Email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");

	if (mail=='') {
		fContact.Email.style.backgroundColor="red";
	}
	
	if (mail!="") {
		if (x==-1 || y==-1) {
			fContact.Email.style.backgroundColor="red";
		}
	}
	
	// Best Time to Call
	if (fContact.Tel.value!="" && fContact.BestTime.value==""){
		fContact.BestTime.style.backgroundColor="red";
	}
		
	// Topic
	if (fContact.Topic.value==""){
		fContact.Topic.style.backgroundColor="red";
	}
	
	// Message
	if (fContact.Message.value==""){
		fContact.Message.style.backgroundColor="red";
	}
	
}

function checkTravelE()
{
	var fContact = document.contactForm;
	// last name
	if (fContact.Lname.value==""){
		fContact.Lname.style.backgroundColor="red";
	}
	
	// first name
	if (fContact.Fname.value==""){
		fContact.Fname.style.backgroundColor="red";
	}
	
	// city name
	if (fContact.City.value==""){
		fContact.City.style.backgroundColor="red";
	}
	
	// state name
	if (fContact.State.value==""){
		fContact.State.style.backgroundColor="lightYellow";
	}
	
	// email validation
	var mail = document.contactForm.Email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");

	if (mail=='') {
		fContact.Email.style.backgroundColor="red";
	}
	
	if (mail!="") {
		if (x==-1 || y==-1) {
			fContact.Email.style.backgroundColor="red";
		}
	}
	
}

function checkResident()
{
	var fContact = document.contactForm;
	// last name
	if (fContact.Lname.value==""){
		fContact.Lname.style.backgroundColor="red";
	}
	
	// first name
	if (fContact.Fname.value==""){
		fContact.Fname.style.backgroundColor="red";
	}
	
	// other explanation
	if (fContact.Iam.value=="Other" && fContact.Notes.value==""){
		fContact.Notes.style.backgroundColor="red";
	}
	
	//Property
	if (fContact.Company.value==""){
		fContact.Company.style.backgroundColor="red";
	}
	
	//Position
	if (fContact.Position.value==""){
		fContact.Position.style.backgroundColor="red";
	}
	
	// city name
	if (fContact.City.value==""){
		fContact.City.style.backgroundColor="red";
	}
	
	// state name
	if (fContact.State.value==""){
		fContact.State.style.backgroundColor="lightYellow";
	}
	
	// tel
	if (fContact.Tel.value==""){
		fContact.Tel.style.backgroundColor="red";
	}
	
	// Best Time to Call
	if (fContact.BestTime.value==""){
		fContact.BestTime.style.backgroundColor="red";
	}	
	
	// email validation
	var mail = document.contactForm.Email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");

	if (mail=='') {
		fContact.Email.style.backgroundColor="red";
	}
	
	if (mail!="") {
		if (x==-1 || y==-1) {
			fContact.Email.style.backgroundColor="red";
		}
	}
	
	// Topic
	if (fContact.Topic.value==""){
		fContact.Topic.style.backgroundColor="red";
	}
	
	// Message
	if (fContact.Message.value==""){
		fContact.Message.style.backgroundColor="red";
	}
	
}


function checkSupport()
{
	var fContact = document.contactForm;
	// last name
	if (fContact.Lname.value==""){
		fContact.Lname.style.backgroundColor="red";
	}
	
	// first name
	if (fContact.Fname.value==""){
		fContact.Fname.style.backgroundColor="red";
	}
	
	// other explanation
	if (fContact.Iam.value=="Other" && fContact.Notes.value==""){
		fContact.Notes.style.backgroundColor="red";
	}
	
	// email validation
	var mail = document.contactForm.Email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");

	if (mail=='') {
		fContact.Email.style.backgroundColor="red";
	}
	
	if (mail!="") {
		if (x==-1 || y==-1) {
			fContact.Email.style.backgroundColor="red";
		}
	}
	
	// Best Time to Call
	if (fContact.Tel.value!="" && fContact.BestTime.value==""){
		fContact.BestTime.style.backgroundColor="red";
	}
		
	// Topic
	if (fContact.Topic.value==""){
		fContact.Topic.style.backgroundColor="red";
	}
	
	// Message
	if (fContact.Message.value==""){
		fContact.Message.style.backgroundColor="red";
	}
	
}

function checkReceipt()
{
	var fContact = document.contactForm;
	// last name
	if (fContact.Lname.value==""){
		fContact.Lname.style.backgroundColor="red";
	}
	
	// first name
	if (fContact.Fname.value==""){
		fContact.Fname.style.backgroundColor="red";
	}
	
	// hotel
	if (fContact.Hotel.value=="" || fContact.Hotel.value=="enter hotel name here"){
		fContact.Hotel.style.backgroundColor="red";
	}
	
	// city
	if (fContact.City.value=="" || fContact.City.value=="enter city here"){
		fContact.City.style.backgroundColor="red";
	}
	
	// dates
	if (fContact.Dates.value=="" || fContact.Dates.value=="mm:dd:yy"){
		fContact.Dates.style.backgroundColor="red";
	}
	
		
	// email validation
	var mail = document.contactForm.Email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");

	if (mail=='') {
		fContact.Email.style.backgroundColor="red";
	}
	
	if (mail!="") {
		if (x==-1 || y==-1) {
			fContact.Email.style.backgroundColor="red";
		}
	}
	
	// Best Time to Call
	if (fContact.Tel.value!="" && fContact.BestTime.value==""){
		fContact.BestTime.style.backgroundColor="red";
	}
	
}
