 
function mkmail(user, domain, subj, disp, image, w, h)
{
  addr = user + '@' + domain;
  if (subj) {
  addr = addr + '?SUBJECT=' + subj;
  }
  if (image) {
  document.write('<A HREF=mailto:' + addr + '>' + '<img src="' + image + '" width="' + w + '" height="' + h 
+ '" border="0"><\/A>');
  }else {
  document.write('<A HREF=mailto:' + addr + '>' + disp + '<\/A>');
 }
}


function verify(form) {        
         
        var j = new RegExp(); 
        j.compile("[A-Za-z0-9._-]+@[^.]+\..+"); 
        if (!j.test(form["email"].value)) { 
                alert("Please supply a valid email address. Example: you@yourisp.com"); 
                return false; 
        } 
         
        
        return true;		


} 

function CheckRequiredFields() {
var errormessage = new String();
// Put field checks below this point.

if(NoneWithCheck(document.form1.radioOne))
	{ errormessage += "\n\nPlease click one radio button of the set."; }
if(WithoutCheck(document.form1.radioLoner))
	{ errormessage += "\n\nThe \"Loner\" radio button must be clicked."; }
if(NoneWithCheck(document.form1.checkOne))
	{ errormessage += "\n\nPlease check one or more check boxes of the set."; }
if(WithoutCheck(document.form1.checkLoner))
	{ errormessage += "\n\nThe \"Loner\" check box must be checked."; }
if(WithoutContent(document.form1.sometext.value))
	{ errormessage += "\n\nPlease type something in the \"Some text\" text field."; }
if(NoneWithContent(document.form1.oneOrTheOther))
	{ errormessage += "\n\nSomething must be typed in one or both of the set of form text fields."; }
if(WithoutContent(document.form1.areaName.value))
	{ errormessage += "\n\nSomething must be typed in the textarea box."; }
if(WithoutContent(document.form1.FileGet.value))
	{ errormessage += "\n\nA file name must be provided for uploading."; }
if(WithoutSelectionValue(document.form1.dropname))
	{ errormessage += "\n\nPlease select something from the dropdown list."; }

// Put field checks above this point.
if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()


function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].value.length > 0) { return false; }
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}
