
	function isDate2(pStr) {	
	    var reDate = /^((0[1-9]|[12]\d)\/(0[1-9]|1[0-2])|30\/(0[13-9]|1[0-2])|31\/(0[13578]|1[02]))\/\d{2}$/;
		return (reDate.test(pStr));
	}
	
	function isDate4(pStr) {
	   reDate = /^((0[1-9]|[12]\d)\/(0[1-9]|1[0-2])|30\/(0[13-9]|1[0-2])|31\/(0[13578]|1[02]))\/\d{4}$/;
	   return (reDate.test(pStr));
	}

	function isTime(pStr) {
	   reTime = /^([0-1]\d|2[0-3]):[0-5]\d$/;
	   return (reTime.test(pStr));
	}

	function isEmail(pStr){
		var reEmail = /^[\w!#$%&'*+\/=?^`{|}~-]+(\.[\w!#$%&'*+\/=?^`{|}~-]+)*@(([\w-]+\.)+[a-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
		return reEmail.test(pStr);
	}

	function isNumberAndLetter(pStr){
		var reNL = /^[A-Za-z0-9]+$/;
		return Format.format(pStr, new RegExp('[^0-9A-Za-z]', 'g'), '');
	}
	
	function numberNoZero(strValue) {
		return Format.format(strValue, new RegExp('[^1-9]*', 'g'), '');
	}
	
	function MascaraCep(keypress, objeto) {
			campo = eval(objeto);
			caracteres = '0123456789';
			separacoes = 1;
			separacao1 = '-';
			conjuntos = 2;
			conjunto1 = 5;
			conjunto2 = 3;
			if ((caracteres.search(String.fromCharCode(keypress))!=-1) && campo.value.length < (conjunto1 + separacoes + conjunto2)) {
				if (campo.value.length == conjunto1) campo.value = campo.value + separacao1;
			}
			else {
				event.returnValue=false;
			}
	}
	
	function DFchangeField(f){
			if(f.value.length==f.maxLength){
		  	for(var i=0;i<f.form.length;i++){
		    	if(f.form[i]==f){f.form[i+1].focus();break}
				}
			}
	}

	function DFonlyThisChars(numbers,letters,others,e){
			if(window.event)key=window.event.keyCode
			else if(e)key=e.which
			else return true
			S=(others)?others:''
			if(numbers)S+='0123456789'
			if(letters)S+='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
			if(key==null||key==0||key==8||key==9||key==13||key==27)return true
			else if(S.indexOf(String.fromCharCode(key))!=-1)return true
			else return false
	}


/*
BrowserDetector()
Parses User-Agent string into useful info.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Richard Blaylock
Author Email: blaylock@wired.com

Usage: var bd = new BrowserDetector(navigator.userAgent);
*/


	// Utility function to trim spaces from both ends of a string
	function Trim(inString) {
	  var retVal = "";
	  var start = 0;
	  while ((start < inString.length) && (inString.charAt(start) == ' ')) {
	    ++start;
	  }
	  var end = inString.length;
	  while ((end > 0) && (inString.charAt(end - 1) == ' ')) {
	    --end;
	  }
	  retVal = inString.substring(start, end);
	  return retVal;
	}

	function BrowserDetector(ua) {
	// Defaults
	  this.browser = "Unknown";
	  this.platform = "Unknown";
	  this.version = "";
	  this.majorver = "";
	  this.minorver = "";

	  uaLen = ua.length;

	// ##### Split into stuff before parens and stuff in parens
	  var preparens = "";
	  var parenthesized = "";

	  i = ua.indexOf("(");
	  if (i >= 0) {
	    preparens = Trim(ua.substring(0,i));
	        parenthesized = ua.substring(i+1, uaLen);
	        j = parenthesized.indexOf(")");
	        if (j >= 0) {
	          parenthesized = parenthesized.substring(0, j);
	        }
	  }
	  else {
	    preparens = ua;
	  }
	
	// ##### First assume browser and version are in preparens
	// ##### override later if we find them in the parenthesized stuff
	  var browVer = preparens;

	  var tokens = parenthesized.split(";");
	  var token = "";
	// # Now go through parenthesized tokens
	  for (var i=0; i < tokens.length; i++) {
	    token = Trim(tokens[i]);
	        //## compatible - might want to reset from Netscape
	        if (token == "compatible") {
	          //## One might want to reset browVer to a null string
	          //## here, but instead, we'll assume that if we don't
	          //## find out otherwise, then it really is Mozilla
	          //## (or whatever showed up before the parens).
	        //## browser - try for Opera or IE
	    }
	        else if (token.indexOf("MSIE") >= 0) {
	      browVer = token;
	    }
	    else if (token.indexOf("Opera") >= 0) {
	      browVer = token;
	    }
	        //'## platform - try for X11, SunOS, Win, Mac, PPC
	    else if ((token.indexOf("X11") >= 0) || (token.indexOf("SunOS") >= 0) ||
				(token.indexOf("Linux") >= 0)) {
	      this.platform = "Unix";
	        }
	    else if (token.indexOf("Win") >= 0) {
	      this.platform = token;
	        }
	    else if ((token.indexOf("Mac") >= 0) || (token.indexOf("PPC") >= 0)) {
	      this.platform = token;
	        }
	  }

	  var msieIndex = browVer.indexOf("MSIE");
	  if (msieIndex >= 0) {
	    browVer = browVer.substring(msieIndex, browVer.length);
	  }
	
	  var leftover = "";
	  if (browVer.substring(0, "Mozilla".length) == "Mozilla") {
	    this.browser = "Netscape";
	        leftover = browVer.substring("Mozilla".length+1, browVer.length);
	  }
	  else if (browVer.substring(0, "Lynx".length) == "Lynx") {
	    this.browser = "Lynx";
	        leftover = browVer.substring("Lynx".length+1, browVer.length);
	  }
	  else if (browVer.substring(0, "MSIE".length) == "MSIE") {
	    this.browser = "IE";
	    leftover = browVer.substring("MSIE".length+1, browVer.length);
	  }
	  else if (browVer.substring(0, "Microsoft Internet Explorer".length) ==
	"Microsoft Internet Explorer") {
	    this.browser = "IE"
	        leftover = browVer.substring("Microsoft Internet Explorer".length+1,
	browVer.length);
	  }
	  else if (browVer.substring(0, "Opera".length) == "Opera") {
	    this.browser = "Opera"
	    leftover = browVer.substring("Opera".length+1, browVer.length);
	  }

	  leftover = Trim(leftover);

	  // # Try to get version info out of leftover stuff
	  i = leftover.indexOf(" ");
	  if (i >= 0) {
	    this.version = leftover.substring(0, i);
	  }
	  else
	  {
	    this.version = leftover;
	  }
	  j = this.version.indexOf(".");
	  if (j >= 0) {
	    this.majorver = this.version.substring(0,j);
	    this.minorver = this.version.substring(j+1, this.version.length);
	  }
	  else {
	    this.majorver = this.version;
	  }
	

	} // function BrowserCap
