// JavaScript Document
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function fixNSStretch() {
	var browser_name = navigator.appName;
	// is browser Netscape? If so, write blank table to fix stretching issues in Netscape		
	if(browser_name == "Netscape") {
		document.writeln("<table width='764' height='600' border='0' cellspacing='0' cellpadding='0'><tr valign='top'>");
		document.writeln("<td width='760' height='600' bgcolor='#FFFFFF'><p>&nbsp;</p><br /><br /><br /><br /><br /></td>");
		document.writeln("<td width='4' background='images/page_edge.gif'><img src='images/spacer.gif' width='4' height='1' /></td></tr></table>");
	}
	// otherwise, write nothing
	else {
		document.writeln(" ");
	}
}

function fixNSStretchInterior() {
	var browser_name = navigator.appName;
	// is browser Netscape? If so, write blank table to fix stretching issues in Netscape		
	if(browser_name == "Netscape") {
		document.writeln("<table width='764' height='600' border='0' cellspacing='0' cellpadding='0'><tr valign='top'>");
		document.writeln("<td width='760' height='600' bgcolor='#FFFFFF'><p>&nbsp;</p><br /><br /><br /><br /><br /></td>");
		document.writeln("<td width='4' background='../images/page_edge.gif'><img src='../images/spacer.gif' width='4' height='1' /></td></tr></table>");
	}
	// otherwise, write nothing
	else {
		document.writeln(" ");
	}
}

function fixNSStretchSecondary() {
	var browser_name = navigator.appName;
	// is browser Netscape? If so, write blank table to fix stretching issues in Netscape		
	if(browser_name == "Netscape") {
		document.writeln("<table width='764' height='600' border='0' cellspacing='0' cellpadding='0'><tr valign='top'>");
		document.writeln("<td width='760' height='600' bgcolor='#FFFFFF'><p>&nbsp;</p><br /><br /><br /><br /><br /></td>");
		document.writeln("<td width='4' background='../images/page_edge.gif'><img src='../images/spacer.gif' width='4' height='1' /></td></tr></table>");
	}
	// otherwise, write nothing
	else {
		document.writeln(" ");
	}
}

function fixNSStretchTertiary() {
	var browser_name = navigator.appName;
	// is browser Netscape? If so, write blank table to fix stretching issues in Netscape		
	if(browser_name == "Netscape") {
		document.writeln("<table width='764' height='600' border='0' cellspacing='0' cellpadding='0'><tr valign='top'>");
		document.writeln("<td width='760' height='600' bgcolor='#FFFFFF'><p>&nbsp;</p><br /><br /><br /><br /><br /></td>");
		document.writeln("<td width='4' background='../../images/page_edge.gif'><img src='../../images/spacer.gif' width='4' height='1' /></td></tr></table>");
	}
	// otherwise, write nothing
	else {
		document.writeln(" ");
	}
}

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];}
}



var isNN = (navigator.appName.indexOf("Netscape")!=-1);

if(isNN)
  document.captureEvents(Event.KEYPRESS);
	
var isNN = (navigator.appName.indexOf("Netscape")!=-1);

if(isNN)
  document.captureEvents(Event.KEYPRESS);

//This autoTab function will focus on the next element if it's not disabled or hidden.
//If the next element is hidden or disabled it will keep on looping until if finds an element that is not hidden or not disabled
	function autoTab(input,len, e){
		var keyCode = (isNN)?e.which:e.keyCode; 
  		var filter = (isNN)?[0,8,9]:[0,8,9,16,17,18,37,38,39,40,46];
  		if(input.value.length >= len && !containsElement(filter,keyCode)){
			input.value = input.value.slice(0,len);
			var ii=1; // Start at 1, 'cause you need to move to the next element
			while( (ii <= input.form.length) && ((input.form[(getIndex(input)+ii)%input.form.length].disabled) || (input.form[(getIndex(input)+ii)%input.form.length].type == 'hidden'))){
				ii++
			}
			input.form[(getIndex(input)+ii)%input.form.length].focus();
		}
		
  		function containsElement(arr, ele){
   	 		var found = false, index = 0;
    		while(!found && index < arr.length)
     		 	if(arr[index]==ele)
        			found = true;
      			else
        			index++;
    		return found;
  		}
		
  		function getIndex(input){
    		var index = -1, i = 0, found = false;
    		while (i < input.form.length && index==-1)
      			if (input.form[i] == input)index = i;
      			else i++;
    		return index;
  		}
  		return true;
	}

//this function provides and input mask for an 10 digit date format of MM/DD/CCYY
//this function must be called using the onblur event
//Params: the object "this" 
//i.e. onblur="inputMask(this);"
function inputMask(input){
    var y  = input.value;
    var tmp = y.length;  
    var formatDate = "";
    var invalid = 0;    
    var now = new Date(); 
	var years= now.getYear();
	var year = ""+years;
	year = year.substring(2);
   
 
    //grab the numbers
    for(ii = 0; ii < tmp; ii++){
	
        //if the char is anything other than a valid slash, input is invalid
        if (y.charAt(ii) != "\/" && isNaN(y.charAt(ii))) {
	      invalid++;
	    } else {
	      for(jj = 0; jj < 10; jj++){
			//if the char is a number 0-9
            if(y.charAt(ii) == jj)
              formatDate = formatDate + y.charAt(ii);	
          }
	    }
     }
 
	 //if input date is invalid, return invalid value
	 if (invalid > 0) {
		input.value = y;
	
	
	//else, format date	per y2k rules
    } else {
			  //input is greater than 8 positions
			  if(formatDate.length > 8)
                   formatDate = formatDate.substring(0, 8);
              
			  //input is 8 positions
			  if(formatDate.length == 8)
                   formatDate = formatDate.substring(0,2) + "/" + formatDate.substring(2,4) + "/" + formatDate.substring(4, formatDate.length);
              
			  //input is 7 positions - then add '0' padding to either the date or the month
			  if(formatDate.length == 7){
 
			  		if (y.charAt(1) == '/'){
						formatDate = "0" + formatDate.substring(0,1) + "/" + formatDate.substring(1,3) + "/" + formatDate.substring(3, formatDate.length);
					}
					else if (y.charAt(2) == '/'){
						formatDate = formatDate.substring(0,2) + "/" + "0" + formatDate.substring(2,3) + "/" + formatDate.substring(3, formatDate.length);
					}
			  }
			  
			  //input is 6 positions
			  else if(formatDate.length == 6){
			  
			    	if ((y.charAt(1) == '/')&&(y.charAt(3) == '/')){ 
			    	
					 formatDate = "0" + formatDate.substring(0,1) + "/" + "0" + formatDate.substring(1,2) + "/" + formatDate.substring(2, formatDate.length);
				 
					} else {

                   formatDate = formatDate.substring(0,2) + "/" + formatDate.substring(2,4) + "/" + formatDate.substring(4, formatDate.length);
				   
                   //add "20" as century
				   formatDate = formatDate.substring(0,6) + "20" + formatDate.substring(6,8);
				   
				   //check and add "19" as century if applicable (based on Y2k rules)
                   if(year < formatDate.substring(8,10) && formatDate.substring(8,10) <= 99)
                        formatDate = formatDate.substring(0,6) + "19" + formatDate.substring(8,10);
                   }     

			  //input is 0 positions
              }			  //input is 6 positions
			  else if(formatDate.length == 5){

  			  		if (y.charAt(1) == '/'){
						formatDate = "0" + formatDate.substring(0,1) + "/" + formatDate.substring(1,3) + "/" + formatDate.substring(3, formatDate.length);
					}
					else if (y.charAt(2) == '/'){
						formatDate = formatDate.substring(0,2) + "/" + "0" + formatDate.substring(2,3) + "/" + formatDate.substring(3, formatDate.length);
					} 
				 
					if (y.indexOf('/') != -1) {
				   
                   //add "20" as century
				   formatDate = formatDate.substring(0,6) + "20" + formatDate.substring(6,8);
				   
				   //check and add "19" as century if applicable (based on Y2k rules)
                   if(year < formatDate.substring(8,10) && formatDate.substring(8,10) <= 99)
                        formatDate = formatDate.substring(0,6) + "19" + formatDate.substring(8,10);
                        
                    }    

			  //input is 0 positions
              }  else if(formatDate.length == 0){
                  formatDate = y;     
              }

              //retuen formatted Date String
			  input.value = formatDate;
    }
}


//this function provides and input mask for an 10 digit date format of MM/DD/YYYY
//this function must be called using the onblur event
//Params: the object "this" 
//i.e. onblur="inputDateMask(this);"
function inputDateMask(input){



    var y  = input.value;
    var tmp = y.length;  
    var formatDate = "";
 	var invalid = 0;   
    
	//grab the numbers
    for(ii = 0; ii < tmp; ii++){
        //if the char is anything other than a valid slash, input is invalid
        if (y.charAt(ii) != "\/" && isNaN(y.charAt(ii))) {
	      	invalid++;
	    } 
		else {
	      	for(jj = 0; jj < 10; jj++){
			//if the char is a number 0-9
            	if(y.charAt(ii) == jj)
              		formatDate = formatDate + y.charAt(ii);	
          	}
	    }
     }

	 //if input date is invalid, return invalid value
	if (invalid > 0) {
		input.value = y;
	}
	else {
              if(formatDate.length > 8)
                   formatDate = formatDate.substring(0, 8);
              if(formatDate.length == 8)
                   formatDate = formatDate.substring(0,2) + "/" + formatDate.substring(2,4) + "/" + formatDate.substring(4, formatDate.length);
              else if(formatDate.length != 0){
                  formatDate = y;
				  input.focus();
              }
              input.value = formatDate;
	}
}


function inputMaskOnReturn(input){

    var y  = input.value;
    var tmp = y.length;  
    var formatDate = "";
    var invalid = 0;    
    var now = new Date(); 
	var years= now.getYear();
	var year = ""+years;
	year = year.substring(2);

	if ( 13 == window.event.keyCode) {
	
    //grab the numbers
    for(ii = 0; ii < tmp; ii++){
	
        //if the char is anything other than a valid slash, input is invalid
        if (y.charAt(ii) != "\/" && isNaN(y.charAt(ii))) {
	      invalid++;
	    } else {
	      for(jj = 0; jj < 10; jj++){
			//if the char is a number 0-9
            if(y.charAt(ii) == jj)
              formatDate = formatDate + y.charAt(ii);	
          }
	    }
     }
 
	 //if input date is invalid, return invalid value
	 if (invalid > 0) {
		input.value = y;
	
	
	//else, format date	per y2k rules
    } else {
			  //input is greater than 8 positions
			  if(formatDate.length > 8)
                   formatDate = formatDate.substring(0, 8);
              
			  //input is 8 positions
			  if(formatDate.length == 8)
                   formatDate = formatDate.substring(0,2) + "/" + formatDate.substring(2,4) + "/" + formatDate.substring(4, formatDate.length);
              
			  //input is 7 positions - then add '0' padding to either the date or the month
			  if(formatDate.length == 7){
 
			  		if (y.charAt(1) == '/'){
						formatDate = "0" + formatDate.substring(0,1) + "/" + formatDate.substring(1,3) + "/" + formatDate.substring(3, formatDate.length);
					}
					else if (y.charAt(2) == '/'){
						formatDate = formatDate.substring(0,2) + "/" + "0" + formatDate.substring(2,3) + "/" + formatDate.substring(3, formatDate.length);
					}
			  }
			  
			  //input is 6 positions
			  else if(formatDate.length == 6){
			  
			    	if ((y.charAt(1) == '/')&&(y.charAt(3) == '/')){ 
			    	
					 formatDate = "0" + formatDate.substring(0,1) + "/" + "0" + formatDate.substring(1,2) + "/" + formatDate.substring(2, formatDate.length);
				 
					} else {

                   formatDate = formatDate.substring(0,2) + "/" + formatDate.substring(2,4) + "/" + formatDate.substring(4, formatDate.length);
				   
                   //add "20" as century
				   formatDate = formatDate.substring(0,6) + "20" + formatDate.substring(6,8);
				   
				   //check and add "19" as century if applicable (based on Y2k rules)
                   if(year < formatDate.substring(8,10) && formatDate.substring(8,10) <= 99)
                        formatDate = formatDate.substring(0,6) + "19" + formatDate.substring(8,10);
                   }     

			  //input is 0 positions
              }			  //input is 6 positions
			  else if(formatDate.length == 5){

  			  		if (y.charAt(1) == '/'){
						formatDate = "0" + formatDate.substring(0,1) + "/" + formatDate.substring(1,3) + "/" + formatDate.substring(3, formatDate.length);
					}
					else if (y.charAt(2) == '/'){
						formatDate = formatDate.substring(0,2) + "/" + "0" + formatDate.substring(2,3) + "/" + formatDate.substring(3, formatDate.length);
					}
					
					if (y.indexOf('/') != -1) {
				   
                   //add "20" as century
				   formatDate = formatDate.substring(0,6) + "20" + formatDate.substring(6,8);
				   
				   //check and add "19" as century if applicable (based on Y2k rules)
                   if(year < formatDate.substring(8,10) && formatDate.substring(8,10) <= 99)
                        formatDate = formatDate.substring(0,6) + "19" + formatDate.substring(8,10);
                   }

			  //input is 0 positions
              }  else if(formatDate.length == 0){
                  formatDate = y;     
              }

              //retuen formatted Date String
			  input.value = formatDate;
    }

	}	

}

//This function provides a mask to amount fields 
//Params: input (#) entered into amount field, size of amount field (including decimal))
//i.e inputAmountMask(this,10) for input 1234567899 returns 1234567.89
function inputAmountMask(input, size)
{
	
   var amount = input.value;
   var temp = String(amount);
   if (temp != '') {

	 //if is NOT a number, skip the logic
	 //if is a number, format number into amt (divide by 100)
	 if(!isNaN(amount)){
		 
		 //loops thru all characters of input and determines if there is a
		 //decimal point or a negative sign
		 for(var ii = 0; ii < amount.length; ii++)
		 {
	          if(amount.charAt(ii) == ".") var stop = 1; 
			  if(amount.charAt(ii) == "-")
			   {var neg = 1;}
		 }
			
			//ADDS ZEROS TO INPUT and DECMIAL POINTS EXIST IN INPUT
			
		//input is <(size -1) characters, has a decimal point in the last position 
		//(xxx.) then add .00 to end
		 if((amount.charAt(amount.length -1 ) == ".") && amount.length < (size - 1)) {
			input.value = Math.abs(amount) + '.00';
 		 }
		 
		//input is <(size) characters, has a decimal point in the second to last 
		//position (xxx.x) then add 0 to end
		 if((amount.charAt(amount.length -2 ) == ".") && amount.length < size){
			input.value = Math.abs(amount) + '0';
		 }
		
		 //input is positive, has < (size) characters, has a decimal point in the second 						
		 //to last position, has a zero in the last position (xxx.0) 
		 //then return input with extra zero at end (xxx.00)
		 if((temp.charAt(temp.length -1) == "0")  && (temp.charAt(temp.length -2) == ".") &&temp.length <(size) && neg !=1) {
			input.value = amount + "0";
		 }
		 //input is negative, has < (size) characters, has a decimal point in the 
		 //second to last position, has a zero in the last position (xxx.0) 
		 //then return input with extra zero at end (xxx.00)
		 if((temp.charAt(temp.length -1) == "0")  && (temp.charAt(temp.length -2) == ".") &&temp.length <(size) && neg ==1) {
			input.value = amount.slice(1,temp.length) + "0";
		 }
		 
		 //input have more than two digits after the decimal place then round it off to the near number
		  if ( ((temp.indexOf(".")+3) < temp.length ) && (stop == 1)){
 			input.value = amount.substring(0, temp.indexOf(".")+3);
		  }
		
		//IF LENGTH =10	AND DECIMAL POINTS EXIST
			
		 //input is positive, (size) characters long, has a decmial point in the last 			
		 //position(123456789.)then return 1234567.89
		if((amount.charAt(amount.length -1 ) == ".") && amount.length == size  && neg != 1) {
			input.value = amount.slice(0,size -3) + "." + amount.slice(size -3,size-1);
		}
		   	
		 //input is positive, (size) characters long, has a decmial point in
		 // the second to last position(12345678.9) then return 1234567.89
		 if((amount.charAt(amount.length -2 ) == ".") && amount.length == size && neg !=1){
			input.value = amount.slice(0,size -3) + "." + amount.slice(size -3,size -2) + amount.slice(size-1,size);
		 }		
		
		 //input is negative, (size) characters long, and has a decimal
		 // in the last position (123456789.) then return 1234567.89	
		if((amount.charAt(amount.length -1 ) == ".") && amount.length == size  && neg == 1) {
			input.value = amount.slice(1,size -2) + "." + amount.slice(size-2,size-1) + "0";
		}
		   	
		 //input is negative, size characters long, and has a decmial 
		 //in the second to last position (12345678.9) then return 1234567.89
		 if((amount.charAt(amount.length -2 ) == ".") && amount.length == size && neg ==1){
			input.value = amount.slice(1,size-2) + "." + amount.slice(size-1,size) + "0";
		 }
		
		
		
		
				//NO DECMIALS EXIST
		  
    	 //input is postive, has no decimal, more than (size -1)
		 // characters exist (1234657899)
		 //then only return first 9 numbers entered with decimal (1234567.89)
		 if(amount.value != "" && amount.length > (size -1) && stop !=1 && neg != 1) {
		 	amount = amount.slice(0,size-1);
			amount = amount/100;
	        input.value = (amount == Math.floor(amount)) ? amount + ".00" : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);	         			
		}	
		 
 		//input is negative, has no decmial point, more than (size-1) characters
		// (-123456789)
		//then return (1234567.89)
 	     if(amount.value != "" && amount.length > (size -1) && stop !=1 && neg == 1) {
		 	amount = amount.slice(1,size);
			amount = amount/100;
			input.value = (amount == Math.floor(amount)) ? amount + ".00" : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);	         			
		 }
		 
		//input has no decimal point, less than (size) characters
		//divide by 100 and return input
		 if(amount.value != "" && stop != 1 && amount.length < size){ 
	          amount = Math.abs(amount/100);
	          input.value = (amount == Math.floor(amount)) ? amount + ".00" : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);	         			
		 }
		 
			
			//INPUTS WITH DECIMAL IN CORRECT POSITION
			
			
		 //input is positive, less than (size +1) characters, and has a decimal point in 			
		 //the third to last position. (xxx.xx)
		 //then return the input
		 if((temp.charAt(temp.length -3) == ".")  && temp.length <(size +1) && neg !=1) {
			input.value = amount;
		 }
		 //input is negative, less than (size +1) characters, and 
		 //has a decimal point in the third to last position. (xxx.xx)
		 //then return the absolute value of the input
		 if((temp.charAt(temp.length -3) == ".")  && temp.length <(size +1) && neg ==1) {
			input.value = amount.slice(1,temp.length);
		 }
		 		 
  	} 
  } 
} 

//used instead of ifKeyPress for quick sumbmit on any fields that have an 
//inputAmountMask (onBlur).  This is a combination of inputAmountMask and 
//ifKeyPress
function inputAmountMaskOnReturn(input, size)
{
	
   var amount = input.value;
   var temp = String(amount);
   if ( 13 == window.event.keyCode) {
   
	if (temp != '') {

	 //if is NOT a number, skip the logic
	 //if is a number, format number into amt (divide by 100)
	 if(!isNaN(amount)){
		 
		 //loops thru all characters of input and determines if there is a
		 //decimal point or a negative sign
		 for(var ii = 0; ii < amount.length; ii++)
		 {
	          if(amount.charAt(ii) == ".") var stop = 1; 
			  if(amount.charAt(ii) == "-")
			   {var neg = 1;}
		 }
			
			//ADDS ZEROS TO INPUT and DECMIAL POINTS EXIST IN INPUT
			
		//input is <(size -1) characters, has a decimal point in the last position 
		//(xxx.) then add .00 to end
		 if((amount.charAt(amount.length -1 ) == ".") && amount.length < (size - 1)) {
			input.value = Math.abs(amount) + '.00';
 		 }
		 
		//input is <(size) characters, has a decimal point in the second to last 
		//position (xxx.x) then add 0 to end
		 if((amount.charAt(amount.length -2 ) == ".") && amount.length < size){
			input.value = Math.abs(amount) + '0';
		 }
		
		 //input is positive, has < (size) characters, has a decimal point in the second 						
		 //to last position, has a zero in the last position (xxx.0) 
		 //then return input with extra zero at end (xxx.00)
		 if((temp.charAt(temp.length -1) == "0")  && (temp.charAt(temp.length -2) == ".") &&temp.length <(size) && neg !=1) {
			input.value = amount + "0";
		 }
		 //input is negative, has < (size) characters, has a decimal point in the 
		 //second to last position, has a zero in the last position (xxx.0) 
		 //then return input with extra zero at end (xxx.00)
		 if((temp.charAt(temp.length -1) == "0")  && (temp.charAt(temp.length -2) == ".") &&temp.length <(size) && neg ==1) {
			input.value = amount.slice(1,temp.length) + "0";
		 }
		 
		 //input have more than two digits after the decimal place then round it off to the near number
		  if ( ((temp.indexOf(".")+3) < temp.length ) && (stop == 1)){
 			input.value = amount.substring(0, temp.indexOf(".")+3);
		  }
		
		//IF LENGTH =10	AND DECIMAL POINTS EXIST
			
		 //input is positive, (size) characters long, has a decmial point in the last 			
		 //position(123456789.)then return 1234567.89
		if((amount.charAt(amount.length -1 ) == ".") && amount.length == size  && neg != 1) {
			input.value = amount.slice(0,size -3) + "." + amount.slice(size -3,size-1);
		}
		   	
		 //input is positive, (size) characters long, has a decmial point in
		 // the second to last position(12345678.9) then return 1234567.89
		 if((amount.charAt(amount.length -2 ) == ".") && amount.length == size && neg !=1){
			input.value = amount.slice(0,size -3) + "." + amount.slice(size -3,size -2) + amount.slice(size-1,size);
		 }		
		
		 //input is negative, (size) characters long, and has a decimal
		 // in the last position (123456789.) then return 1234567.89	
		if((amount.charAt(amount.length -1 ) == ".") && amount.length == size  && neg == 1) {
			input.value = amount.slice(1,size -2) + "." + amount.slice(size-2,size-1) + "0";
		}
		   	
		 //input is negative, size characters long, and has a decmial 
		 //in the second to last position (12345678.9) then return 1234567.89
		 if((amount.charAt(amount.length -2 ) == ".") && amount.length == size && neg ==1){
			input.value = amount.slice(1,size-2) + "." + amount.slice(size-1,size) + "0";
		 }
		
		
		
		
				//NO DECMIALS EXIST
		  
    	 //input is postive, has no decimal, more than (size -1)
		 // characters exist (1234657899)
		 //then only return first 9 numbers entered with decimal (1234567.89)
		 if(amount.value != "" && amount.length > (size -1) && stop !=1 && neg != 1) {
		 	amount = amount.slice(0,size-1);
			amount = amount/100;
	        input.value = (amount == Math.floor(amount)) ? amount + ".00" : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);	         			
		}	
		 
 		//input is negative, has no decmial point, more than (size-1) characters
		// (-123456789)
		//then return (1234567.89)
 	     if(amount.value != "" && amount.length > (size -1) && stop !=1 && neg == 1) {
		 	amount = amount.slice(1,size);
			amount = amount/100;
			input.value = (amount == Math.floor(amount)) ? amount + ".00" : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);	         			
		 }
		 
		//input has no decimal point, less than (size) characters
		//divide by 100 and return input
		 if(amount.value != "" && stop != 1 && amount.length < size){ 
	          amount = Math.abs(amount/100);
	          input.value = (amount == Math.floor(amount)) ? amount + ".00" : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);	         			
		 }
		 
			
			//INPUTS WITH DECIMAL IN CORRECT POSITION
			
			
		 //input is positive, less than (size +1) characters, and has a decimal point in 			
		 //the third to last position. (xxx.xx)
		 //then return the input
		 if((temp.charAt(temp.length -3) == ".")  && temp.length <(size +1) && neg !=1) {
			input.value = amount;
		 }
		 //input is negative, less than (size +1) characters, and 
		 //has a decimal point in the third to last position. (xxx.xx)
		 //then return the absolute value of the input
		 if((temp.charAt(temp.length -3) == ".")  && temp.length <(size +1) && neg ==1) {
			input.value = amount.slice(1,temp.length);
		 }
		 		 
  	} 
  }
  
  //submitForm();
 }//end if key pressed = 13 (or enter)
}

//-->
