<!--

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

function formvalidationGP(thisform)
{
	with (thisform)
	{
		if (emptyvalidation(Type_Length,"Please provide the Type and Length of your Session")==false) {Type_Length.focus(); return false;};
		if (emailvalidation(Email,"Please enter a valid E-mail")==false) {Email.focus(); return false;};
		if (emptyvalidation(Trainer1,"Please provide the name of the Trainer")==false) {Trainer1.focus(); return false;};
		if (emptyvalidation(Address,"Please provide your Address")==false) {Address.focus(); return false;};
		if (emptyvalidation(Tel,"Please provide your Telephone Number")==false) {Tel.focus(); return false;};
		if (emptyvalidation(Title,"Please provide the Session Title")==false) {Title.focus(); return false;};
		if (emptyvalidation(Participants,"Please provide your preferred number of Participants")==false) {Participants.focus(); return false;};
		if (emptyvalidation(Description,"Please provide a brief Overview of your Session")==false) {Description.focus(); return false;};
		if (emptyvalidation(Bio,"Please provide some Biographical Information")==false) {Bio.focus(); return false;};
		if (emptyvalidation(References,"Please provide two References")==false) {References.focus(); return false;};




	}

} 


function formvalidationGPFR(thisform)
{
	with (thisform)
	{
		if (emptyvalidation(Type_Length,"Veuillez fournir le type et la longueur de votre session ")==false) {Type_Length.focus(); return false;};
		if (emailvalidation(Email,"Veuillez écrire un couriel valide ")==false) {Email.focus(); return false;};
		if (emptyvalidation(Trainer1,"Veuillez fournir le nom de l'animateur")==false) {Trainer1.focus(); return false;};
		if (emptyvalidation(Address,"Veuillez fournir votre adresse ")==false) {Address.focus(); return false;};
		if (emptyvalidation(Tel,"Veuillez fournir votre numéro de téléphone")==false) {Tel.focus(); return false;};
		if (emptyvalidation(Title,"Veuillez fournir le titre de la session ")==false) {Title.focus(); return false;};
		if (emptyvalidation(Participants,"Veuillez fournir le nombre préféré de participants")==false) {Participants.focus(); return false;};
		if (emptyvalidation(Description,"Veuillez fournir un bref suvol de votre session ")==false) {Description.focus(); return false;};
		if (emptyvalidation(Bio,"Veuillez fournir quelques informations biographiques")==false) {Bio.focus(); return false;};
		if (emptyvalidation(References,"Veuillez fournir deux références ")==false) {References.focus(); return false;};
	}

} 








function formvalidation(thisform)
{
with (thisform)
{



	if (radio_choice == false) {venue.focus(); return false;};
	if (emailvalidation(email,"Please enter a valid E-mail")==false) {email.focus(); return false;};
	if (emptyvalidation(fname,"Please provide your 'First Name'")==false) {fname.focus(); return false;};
	if (emptyvalidation(lname,"Please provide your 'Last Name'")==false) {lname.focus(); return false;};
	if (emptyvalidation(agency,"Please provide your 'Agency'")==false) {agency.focus(); return false;};
	if (emptyvalidation(address,"Please provide your 'Address'")==false) {address.focus(); return false;};
	if (emptyvalidation(city,"Please provide your 'City'")==false) {city.focus(); return false;};
	if (emptyvalidation(postal,"Please provide your 'Postal Code'")==false) {postal.focus(); return false;};
	if (emptyvalidation(tel,"Please provide your 'Telephone Number'")==false) {tel.focus(); return false;};
	if (emptyvalidation(fax,"Please provide your 'Fax Number'")==false) {fax.focus(); return false;};
	if (emptyvalidation(position,"Please provide your 'Position'")==false) {position.focus(); return false;};

	// set var radio_choice to false
	var radio_choice = false;
	// Loop from zero to the one minus the number of radio button selections
	for (counter = 0; counter < thisform.venue.length; counter++)
	{
	if (thisform.venue[counter].checked)
	radio_choice = true; 
	}
	if (!radio_choice)
		{
			alert("Please select a 'Preferred Location'")
			return (false);
		}
		
		if (emptyvalidation(num_fac,"Please provide your '# of Years in Faciliation'")==false) {num_fac.focus(); return false;};	
	if (emptyvalidation(num_dv,"Please provide your '# of Years in Domestic Violence program'")==false) {num_dv.focus(); return false;};	
	if (emptyvalidation(interest,"Please provide why you are 'Interested'")==false) {interest.focus(); return false;};
	if (valuevalidation(Value,0,5,"Value MUST be in the range 0-5")==false) {Value.focus(); return false;};
	/*if (digitvalidation(Digits,3,4,"You MUST enter 3 or 4 integer digits","I")==false) {Digits.focus(); return false;}; */

}
} 

function radio_button_checker()
{
	// set var radio_choice to false
	var radio_choice = false;
	
	// Loop from zero to the one minus the number of radio button selections
	for (counter = 0; counter < thisform.venue.length; counter++)
	{
	// If a radio button has been selected it will return true
	// (If not it will return false)
	if (thisform.venue[counter].checked)
	radio_choice = true; 
}

	if (!radio_choice)
		{
			// If there were no selections made display an alert box 
			alert("Please select a Locatin.")
			return (false);
		}
		return (true);
}


function emailvalidation(entered, alertbox)
{
	// E-mail Validation by Henrik Petersen / NetKontoret
	// Explained at www.echoecho.com/jsforms.htm
	// Please do not remove this line and the two lines above.
	with (entered)
	{
	apos=value.indexOf("@"); 
	dotpos=value.lastIndexOf(".");
	lastpos=value.length-1;
	if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
	{if (alertbox) {alert(alertbox);} return false;}
	else {return true;}
	}
} 


function valuevalidation(entered, min, max, alertbox, datatype)
{
// Value Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove this line and the two lines above.
with (entered)
{
checkvalue=parseFloat(value);
if (datatype)
{smalldatatype=datatype.toLowerCase();
if (smalldatatype.charAt(0)=="i") {checkvalue=parseInt(value)};
}
if ((parseFloat(min)==min && checkvalue<min) || (parseFloat(max)==max && checkvalue>max) || value!=checkvalue)
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
} 

function digitvalidation(entered, min, max, alertbox, datatype)
{
// Digit Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove this line and the two lines above.
with (entered)
{
checkvalue=parseFloat(value);
if (datatype)
{smalldatatype=datatype.toLowerCase();
if (smalldatatype.charAt(0)=="i") 
{checkvalue=parseInt(value); if (value.indexOf(".")!=-1) {checkvalue=checkvalue+1}};
}
if ((parseFloat(min)==min && value.length<min) || (parseFloat(max)==max && value.length>max) || value!=checkvalue)
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
} 

function emptyvalidation(entered, alertbox)
{
// Emptyfield Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove this line and the two lines above.
with (entered)
{
if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
} 
// -->