
function popup(page,x,y)  {
	if (page.length > 0) {
		strConfig = "width=" + x + ",height=" + y + ", status=no,toolbar=no,menubar=no,scrollbars=yes";
		window.open(page, "displayWindows", strConfig);
	}
}

var moviename = "topnav";
var movie_ready = "false";
var xFrame = 0; 

function movieobject(moviename) { 
	if (navigator.appName.indexOf ("Microsoft") !=-1)  {
		return window[moviename]
	}  else {
		return document[moviename] 
	}
}

function GoFlash() {
	while(movie_ready == "false") { 
		if (movieobject(moviename).PercentLoaded() == 100) 	{
			movieobject(moviename).GotoFrame(xFrame);
			movie_ready = "true";
		}
	}
}

function FormValues(FileName,redirect, subject, group) {

document.write("<input type=\"hidden\" name=\"GroupID\" value=\"" + group + "\">");
document.write("<input type=\"hidden\" name=\"Redirect\"  value=\""  + FileName + "?id=" + redirect + "\">");
document.write("<input type=\"hidden\" name=\"Subject\" value=\"" + subject + "\">");

}



// form validation script


//This array is a global array that labels the
//fields.  The alert() function will use these 
//names if it is needed.

//Things to change: Change the number 7 to however many
//fields you are requiring.  Give a name to each label.
//Ideally, this should be the same wording as what the visitor
//sees on the form.
	
	var fieldnames = new Array (1)
	fieldnames[0] = "E-mail"
	
	
function validation(contact) {

	var onoff=0
	var alertboxnames = ""

//This puts the length property of each field entry into an array.  
//Make the field name (Name, Email, Age, etc.) the same as what you
//named it in the INPUT tag.  They also need to be in the same order
//as what you entered in the above array.  Don't forget to change
//the number of elements (currently the 7) you have in the array.

	var fields = new Array (1)
	fields[0] = contact.FromEmail.value.length


	
//That's all the changes you need for the script.  Just add the
//fields and then you're done.  Don't forget to change the ACTION
//attribute in the FORM tag!

	for (var i=0; i < fields.length; i++) {
	
        if (fields[i] == 0) {
    	
    	alertboxnames = alertboxnames + fieldnames[i] + ", ";
        
        onoff ++;
		}              
 
	}

	if (onoff == 0) {
	
		return true
		
	} else {
	
		if (onoff == 1) {
		
			var catness = alertboxnames.substring (0, alertboxnames.indexOf(","));
		
			alert ("You have not filled in the following field: \r" + catness + "\rThis is required in order for us to contact you regarding your request.");

			} else {
			
			var catness = alertboxnames.substring (0, alertboxnames.length-2)
				
	        alert ("You have not filled in the following field: \r" + catness + "\rThis is required in order for us to contact you regarding your request."); 

			}
		
		return false
		
	}

}

