// JavaScript Document
tmt_globalRules.verify_cpf = function(fieldNode){
	 var retorno = true;
	 var i;
     var s = fieldNode.value;
     var s = s.replace('.','');
     var s = s.replace('.','');
     var s = s.replace('-','');
        var c = s.substr(0,9);
        var dv = s.substr(9,2);
        var d1 = 0;
        for (i = 0; i < 9; i++){
            d1 += c.charAt(i)*(10-i);
        }
            if (d1 == 0){
				retorno = false;
            }
        d1 = 11 - (d1 % 11);
        if (d1 > 9) d1 = 0;
        if (dv.charAt(0) != d1){
			retorno = false;
        }

        d1 *= 2;
        for (i = 0; i < 9; i++){
            d1 += c.charAt(i)*(11-i);
        }
        d1 = 11 - (d1 % 11);
        if (d1 > 9) d1 = 0;
        if (dv.charAt(1) != d1){
			retorno = false;
        }
   return retorno;
}
// Luis Nt
///////////////

var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	var px = document.layers ? "" : "px";
	function JSFX_FloatDiv(id, sx, sy){
		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		window[id + "_obj"] = el;
		if(d.layers){
			el.style=el;
		}
		el.cx = el.sx = sx;el.cy = el.sy = sy;
		el.sP=function(x,y){
				this.style.left=x+px;
				this.style.top=y+px;
		};
		
		el.flt=function(){
			var pX, pY;
			pX = (this.sx >= 0) ? 0 : ns ? innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth; 
			pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
			if(this.sy<0){ pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; }
			this.sP(pX + this.sx - this.cx, pY + this.sy - this.cy);
			setTimeout(this.id + "_obj.flt()",0);
		}
	//fnd();
	return el;
}
	
	function fnd(){
  	var winW = window.innerWidth;
  	var winH = window.innerHeight;
		if (navigator.appName.indexOf("Microsoft")!=-1) {
		  winW = document.documentElement.clientWidth;
	  	  winH = document.documentElement.clientHeight;
		}
  	document.getElementById("wmodals").style.left = 0;
	document.getElementById("wmodals").style.top = 0;
  	document.getElementById("wmodals").style.width = winW;
	document.getElementById("wmodals").style.height = winH;
	document.getElementById("wmodals").style.backgroundColor = "#ffffff";
  	document.getElementById("wmodals").style.position = "absolute";
  	document.getElementById("wmodals").style.filter = "alpha(opacity=90)";
	}

	function hide(){
	  document.getElementById("wmodals").style.display = "none";
	}

	function hide_show(){
	  if (document.getElementById("wmodals").style.display == "block"){
	    document.getElementById("wmodals").style.display = "none";
	  }else{
	    document.getElementById("wmodals").style.display = "block";
  	  }
	}
	
//JSFX_FloatDiv("wmodals", 0, 0).flt();