function mozeli()

			{

				var aw,i;

				if (document.qwe.file1.value=='' && document.qwe.file2.value=='' && document.qwe.file3.value=='') 

					{alert('Please select at least one photo.'); 
					self.document.qwe.file1.focus(); return false;}

			

				if (document.qwe.file1.value!='' && !testfileext(document.qwe.file1.value)) return false;

				if (document.qwe.file2.value!='' && !testfileext(document.qwe.file2.value)) return false;

				if (document.qwe.file3.value!='' && !testfileext(document.qwe.file3.value)) return false;

				

				document.getElementById("loaderpic").style.visibility="visible";

				document.qwe.upload.value="yes";

				document.qwe.submit();
				
				document.qwe.submitbutton.disabled = true;

				return false;

			}

			function testfileext(aw)

			{

				aw=aw.toUpperCase();

				if ( aw.indexOf('.JPG',0)==-1 &&  aw.indexOf('.JPEG',0)==-1 && aw.indexOf('.GIF',0)==-1 && aw.indexOf('.BMP',0)==-1 && aw.indexOf('.TIF',0)==-1 && aw.indexOf('.TIFF',0)==-1 && aw.indexOf('.PNG',0)==-1 )

				{alert('Only photos in jpg, gif, bmp, png or tif format are allowed!');return false;}

				return true;

			}

function setColor(el, bg, Ftxt) {
	if (el.style) {
		el.style.backgroundColor = bg;
		el.style.color = Ftxt;
}}

function orgStyle(org){
	if(org.style){
		org.style.backgroundColor="#FFFFFF";
		org.style.color="#043717";
		org.style.borderColor="#FFFFFF #FFFFFF #003300 #FFFFFF";
}}

function checkAll() {	
	var bgBad = "#FDEEB0";
	var txtBad = "#580005";
	
//*****begin email check*****
	txt=self.document.forms[0].email.value;
	if (txt == "") {
		alert("Please enter your e-mail address");
		self.document.forms[0].email.focus();
        return (false);
	} 
	var badchars="<> ;,'!#$%^&*()+=/\\?";
	for (var i=0; i < txt.length; i++) {
		temp = "" +txt.substring(i, i+1);
		if (badchars.indexOf(temp) != -1) {
			alert("Your e-mail address contains illegal characters.\n\n\tPlease try again.");
			setColor(self.document.forms[0].email,bgBad,txtBad);
			self.document.forms[0].email.focus();
        	return (false);
		}
	}
	var arr;
	arr = txt.split('@');
		
	if (arr.length != 2) {
		alert("Your e-mail address must contain a single \"@\" sign.\n\n\tPlease try again.");
		setColor(self.document.forms[0].email,bgBad,txtBad);
		self.document.forms[0].email.focus();
        return (false);
	}
	if ((arr[0] == "") || (arr[1] == "")) {
		alert("Your e-mail address is incomplete.\n\n\tPlease try again.");
		setColor(self.document.forms[0].email,bgBad,txtBad);
		self.document.forms[0].email.focus();
        return (false);
	}
	if ((arr[1].charAt(0) == '.') || (arr[1].charAt(arr[1].length-1) == '.')) {
		alert("Your e-mail address is incomplete (i.e. no \"yourwebaddress\" before the dot).\n\n\tPlease try again.");
		setColor(self.document.forms[0].email,bgBad,txtBad);
		self.document.forms[0].email.focus();
        return (false);
	}	
	if ((arr[0].charAt(0) == '.') || (arr[0].charAt(arr[0].length-1) == '.')) {
		alert("Your e-mail address is incomplete (i.e. no \"com\" after the dot).\n\n\tPlease try again.");
		setColor(self.document.forms[0].email,bgBad,txtBad);
		self.document.forms[0].email.focus();
        return (false);
	}					
	if ((arr[1].indexOf('.') > arr[1].length-3) || (arr[1].indexOf('.') == -1)) {
		alert("Your e-mail address must contain an internet domain (i.e. \"yourwebaddress.com\").\n\n\tPlease try again.");
		setColor(self.document.forms[0].email,bgBad,txtBad);
		self.document.forms[0].email.focus();
        return (false);
	}
	if (txt.indexOf("..") > 0) {
		alert("You have entered an e-mail address containing two (2) dots in a row.\n\n\tPlease try again.");
		setColor(self.document.forms[0].email,bgBad,txtBad);
		self.document.forms[0].email.focus();
        return (false);
	}
	var tld;
	tld = arr[1].substring(arr[1].lastIndexOf('.'));
	
	if ((tld.length != 3) && (tld != '.com') && (tld != '.edu') && (tld != '.gov') && (tld != '.int') && (tld != '.mil') && (tld != '.org') && (tld != '.net') && (tld != '.info') && (tld != '.biz') && (tld != '.coop') && (tld != '.aero') && (tld !='.arpa') && (tld != '.museum') && (tld != '.name') && (tld != '.pro') && (tld != '.nato') && (tld != '.nom') && (tld != '.firm') && (tld != '.store') && (tld != '.web') && (tld != '.COM') && (tld != '.EDU') && (tld != '.GOV') && (tld != '.INT') && (tld != '.MIL') && (tld != '.ORG') && (tld != '.NET') && (tld != '.INFO') && (tld != '.BIZ') && (tld != '.COOP') && (tld != '.AERO') && (tld !='.ARPA') && (tld != '.MUSEUM') && (tld != '.NAME') && (tld != '.PRO') && (tld != '.NATO') && (tld != '.NOM') && (tld != '.FIRM') && (tld != '.STORE') && (tld != '.WEB')) {
		alert("You have entered an incorrect domain or country code.\n\n\tPlease try again.");
		setColor(self.document.forms[0].email,bgBad,txtBad);

		self.document.forms[0].email.focus();
        return (false);
	}
//*****end email check*****

    if (self.document.forms[0].FName.value == "") {
        alert("\nPlease enter your First name.");
        self.document.forms[0].FName.focus();
        return (false);
    }
    if (self.document.forms[0].LName.value == "") {
        alert("\nPlease enter your Last Name.");
        self.document.forms[0].LName.focus();
        return (false);
    }
	if (!document.forms[0].Imagerelease.checked){
		alert("Please read the Image Release and check the box below."); 
	    self.document.forms[0].Imagerelease.focus();
		return false; } 

    return (true);
}


