function mt(domain,name,subject,body) {
  location.href = 'mailto:' + name + '@' + domain + '?subject=' + subject + '&body=' + body;
}
//Added 8/2/04 by AT
var mikExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|\?\,]/;
function checkFloat(val) {
	var inValid = false;
	if(val.value.length < 1) {
		alert("Please enter something.");
		return false;
	}
	if(val.value.search(mikExp) == -1) {
		for(var i=0;i<val.value.length;i++)
				if (val.value.charAt(i) == ' '){			
					inValid = true;
					break;
				}	
				if (inValid){
					alert("No spaces allowed in this field.");
					val.focus();
					return true; 
				}	
				else					
					return false;	
		return false;
 		//More than 1 decimal point    
      		if (CountOccurences(val,".") > 1 )
      			{
        			alert("This Number has more than 1 decimal point.  Please correct this.");
        			val.focus();
				return true;
    				}
		return false;
	}
	else {
		alert("Sorry, but the following characters\n\r\n\r@ ? $ % ^ & * # ( ) [ ] \\ { + } ` ~ = , | \n\r\n\rare not allowed!\n");
		val.select();
		val.focus();
		return false;
	}
	return false;
}

		<!-- Original:  Mikhail Esteves (miks80@yahoo.com) -->
<!-- Web Site:  http://www.freebox.com/jackol -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var mikExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|\?\,]/;
function doanothercheck(val) {
	var inValid = false;
	if(val.value.length < 1) {
		alert("Please enter something.");
		return false;
	}
	if(val.value.search(mikExp) == -1) {
		for(var i=0;i<val.value.length;i++)
				if ((val.value.charAt(i) == ' ')||(val.value.charAt(i) == '.')){			
					inValid = true;
					break;
				}	
				if (inValid){
					alert("No spaces or periods (.) allowed in this field.");
					val.focus();
					return true; 
				}	
				else					
					return false;	
		return false;
	}
	else {
		alert("Sorry, but the following characters\n\r\n\r@ , ? $ % ^ & * # ( ) [ ] \\ { + } ` ~ =  | \n\r\n\rare not allowed!\n");
		val.select();
		val.focus();
		return false;
	}
	return false;
}


/// WWW: http://www.mattkruse.com/
//-------------------------------------------------------------------
// isBlank(value)
//   Returns true if value only contains spaces
//-------------------------------------------------------------------
function isBlank(val){
	if(val==null){return true;}
	for(var i=0;i<val.length;i++) {
		if ((val.charAt(i)!=' ')&&(val.charAt(i)!="\t")&&(val.charAt(i)!="\n")&&(val.charAt(i)!="\r")){return false;}
		}
	return true;
	}
//-------------------------------------------------------------------
// isDigit(value)
//   Returns true if value is a 1-character digit
//-------------------------------------------------------------------
function isDigit(num) {
	if (num.length>1){return false;}
	var string="1234567890";
	if (string.indexOf(num)!=-1){return true;}
	return false;
	}
//-------------------------------------------------------------------
// isInteger(value)
//   Returns true if value contains all digits
//-------------------------------------------------------------------
function isInteger(val){
	if (isBlank(val)){return false;}
	for(var i=0;i<val.length;i++){
		if(!isDigit(val.charAt(i))){
			alert('Only numbers are allowed');
			return false;
		}
		}
	return true;
	}
//-------------------------------------------------------------------------	

 function checklength(thisvar,max,min) {
if (thisvar.length > max) {
alert("Please do not enter more than " + max + " characters. Please change your entry and submit again.");
return false;
   }
if (thisvar.length < min) {
var errormsg = "Please do not enter less than " + min + " characters. Please change your entry and submit again."
alert(errormsg);
return false;
   }
}



function hasBlank(obj){
		var inValid = false;
		
		if (obj.value != ''){	
			for(var i=0;i<obj.value.length;i++)
				if (obj.value.charAt(i) == ' '){				
					inValid = true;
					break;
				}	
				
				if (inValid){
					alert("No spaces allowed in this field.");
					obj.focus();
					return false; 
				}	
				else					
					return true;					
		}
		else
			return true;
	}


function CheckURL(obj){
		if (obj.value.length != 0 && obj.value.indexOf("http://") < 0 && obj.value.indexOf("https://") < 0){
			alert("Don't forget to put http:// in your URL!");
			obj.focus();//obj.value="http://"+obj.value;			
		}	
	}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//Opens a New Window
var newWin = null;
function popUp(strURL, strType, strHeight, strWidth){  
	if (newWin != null && !newWin.closed)    
		newWin.close();  
	var strOptions="";  
	if (strType=="console")    
		strOptions="resizable,height="+
		strHeight+",width="+strWidth;  
	if (strType=="fixed")    
		strOptions="status,height="+
		strHeight+",width="+strWidth;  
	if (strType=="elastic")    
		strOptions="toolbar,menubar,scrollbars,"+
		"resizable,location,height="+
		strHeight+",width="+strWidth;  
	if (strType=="scrollable")    
		strOptions="resizable,scrollbars,status,height="+
		strHeight+",width="+strWidth;
	if (strType=="noaddress")    
		strOptions="menubar,toolbar,resizable,scrollbars,status,height="+
		strHeight+",width="+strWidth;	
		
	newWin = window.open(strURL, 'newWin', strOptions);  
	newWin.focus();
}

// Example:
// var b = new BrowserInfo();
// alert(b.version); 
function BrowserInfo()
{
  this.name = navigator.appName;
  this.codename = navigator.appCodeName;
  this.version = navigator.appVersion.substring(0,4);
  this.platform = navigator.platform;
  this.javaEnabled = navigator.javaEnabled();
  this.screenWidth = screen.width;
  this.screenHeight = screen.height;
}
var browser = new BrowserInfo();
/*
// JavaScript Document
//Functionality: Validate required form entries
//Name:    formValidate(formname,fields,propernames)
//Arguments: formname -  Name of the form needing validation
//           field    - comma separated list of form field names that need to be validate.               
//           propernames - comma separated list of the Display names corresponding to each item in
//                         'fields' list 
// Usage: formValidate(formname,'FieldName1,FieldName2,...,FieldName6','ProperName1,ProperName2,...,ProperName6');														
// Example: 
// <form name="test" onsubmit="return formValidate(this.name,'fname,ssn','Firstname,Social Security Number')">
*/
function formValidate(formname,fields,propernames){
	var arrayOfFields = fields.split(",");
	var arrayOfNames  = propernames.split(",");
	var message="The following fields are required.\nPlease provide a value for each. \n\n";
	var i=0;
	var isValid=true;
	
	for(i=0; i <arrayOfFields.length; i++)
	{
		if(document.forms[formname].elements[arrayOfFields[i]].value == "")
		{
			message+=" \t"+ arrayOfNames[i] + " \n";
			isValid = false;
		}//End IF	
	}//End For
		
	if(isValid)
		return true;
	else		
	{
		alert(message);		
		return false;
	}

}

function validDate(formField,fieldLabel){
  if(formField.value != ""){
   	result = false;
	var elems = formField.value.split("/");   
   	result = (elems.length == 3); // should be three components
   	if (result) {
   		var month = parseInt(elems[0],10);
       	var day = parseInt(elems[1],10);
   		var year = parseInt(elems[2],10);

   		result = !isNaN(month) && (month > 0) && (month < 13) && !isNaN(day) && (day > 0) && (day < 32) && !isNaN(year) && (elems[2].length == 4);
   	}
   	if (!result&&formField.value.length >0) {
   	alert('Please enter a date in the format MM/DD/YYYY for the "' + fieldLabel +'" field.');
   	formField.focus();    
    }
	return result;
  }
   else
	return true;
}

function ConfirmDelete(url) {
			question = confirm("Are you sure you want to delete this?")
			if (question != "0"){
			self.location = url
			}
		}
		
		function MM_jumpMenu(targ,selObj,restore){ //v3.0
			eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
			if (restore) selObj.selectedIndex=0;
		}



		function CountOccurences(obj,val){
    
      var i = 0
      var count = 0
      var CheckMe = obj.value
      
      while((CheckMe.indexOf(val, i) != -1) && i <= CheckMe.length)
      {
        count = count + 1
        i = CheckMe.indexOf(val, i) + 1            
      }
      return count
      
    }  
    
   
    function CheckNumbers(obj){
      var i = 0
      var count = 0
      
      //More than 1 decimal point    
      if (CountOccurences(obj,".") > 1 )
      {
        alert("This Number has more than 1 decimal point.  Please correct this.")
        obj.focus()
      }
      //More than 1 - sign
      else if (CountOccurences(obj,"-") > 1 )
      {
        alert("This Number has more than 1 negative sign (-) .  Please correct this.")
        obj.focus()
      }
      //- sign not firt character  
      else if(obj.value.indexOf("-") > 0)
      {
        alert("Negative signs must be on the left.  Please correct this")
        obj.focus()
      }
      //Field is Blank
      else if(obj.value == "")
      {        
        obj.value = ""            
      }   
      
    }
  function CheckKey(KeyPressed, objField) {

  if (((KeyPressed < 48) || (KeyPressed > 57)) && (KeyPressed != 46) && (KeyPressed !=45))  {
    event.returnValue = false;
  }
  
    if ((objField.indexOf(".") != -1) && (KeyPressed == 46)) {
  	event.returnValue = false;
  
  }
  
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

	function CheckURL(obj){
		if (obj.value.length != 0 && obj.value.indexOf("http://") < 0 && obj.value.indexOf("https://") < 0){
			alert("Don't forget to put http:// in your URL!");
			obj.focus();//obj.value="http://"+obj.value;			
		}	
	}


function CustomConfirmation(msg,url){
	if (msg)
		question = confirm(msg)
	else	
		question = confirm("Are you sure you want to delete this?")
		
	if (url && question){
			
			self.location = url;
			return false;
  } else
			return question;
}

/* 
Block multiple form submission script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact for use
*/

//Enter error message to display if submit button has been pressed multiple times below.
//Delete below line if you don't want a message displayed:

var formerrormsg="You\'ve attempted to submit the form multiple times.\n Please be patient while the information is being processed."

function checksubmit(submitbtn){
submitbtn.form.submit()
checksubmit=blocksubmit
return false
}

function blocksubmit(){
if (typeof formerrormsg!="undefined")
alert(formerrormsg)
return false
}
