<!-- hide script from old browsers

// JAVASCRIPT FUNCTION PAGE


//Replaces an image with another image

function pic_swap(imgDocID, imgObjName, comment) 
{
document.images[imgDocID].src = imgObjName;
window.status = comment; return true;
}

// the form stuff is from w3schools: http://www.w3schools.com/dhtml/dhtml_dom_examples.asp
function formSubmit()
//{
//validate()
//document.forms.risk_regn.submit()
//}

//function validate()
{
x=document.risk_regn
at=x.email.value.indexOf("@")
firstname=x.fname.value
lastname=x.lname.value
posn=x.position.value
comp=x.company.value
address=x.address1.value
prov=x.prov.value
country=x.country.value
phone=x.phone.value
submitOK="True"



if (firstname.length==0)
 {
 alert("Please enter a first name.")
 submitOK="False"
 }
 
 else if (lastname.length==0)
 {
 alert("Please enter a last name.")
 submitOK="False"
 }
 
 else if (posn.length==0)
 {
 alert("Please enter your occupation.")
 submitOK="False"
 }
 
 else if (comp.length==0)
 {
 alert("Please enter your company name.")
 submitOK="False"
 }
 
 else if (address.length==0)
 {
 alert("Please enter an address.")
 submitOK="False"
 }
 
 else if (prov.length==0)
 {
 alert("Please enter a Province or State.")
 submitOK="False"
 }
 
 else if (country.length==0)
 {
 alert("Please enter a country.")
 submitOK="False"
 }
 
 else if (phone.length==0)
 {
 alert("Please enter a contact number.")
 submitOK="False"
 }
 
 else if (at==-1) 
 {
 alert("Your email address seems to be invalid.  Please confirm your email.")
 submitOK="False"
 }
 
if (submitOK=="False")
 {
 return false
 }
 
 
}




//End -->
