var nav4 = window.Event ? true : false;
function accepnum(evt)
	{ 
	// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 
	var key = nav4 ? evt.which : evt.keyCode; 
	return (key <= 13 || (key >= 48 && key <= 57));
	}


function formatfocus(evt,campo,formu)
{ 


	p=eval('formu.'+campo+'.value')
	a5=p.replace('.','')
	a5=a5.replace('.','')
	a5=a5.replace('.','')

if(a5.length>3)
	 {		
		p1=a5.substring(0,3);
		eval('formu.'+campo+'.value="'+p1+'.'+a5.substring(3,a5.length)+'"');
	
		p=eval('formu.'+campo+'.value')
		if(p.length>7)
		 {		
			p1=p.substring(0,7);
			eval('formu.'+campo+'.value="'+p1+'.'+p.substring(7,p.length)+'"');
		 }
	
	 }


}



function formatphone(evt,campo,formu)
	{ 
	// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 
	var key = nav4 ? evt.which : evt.keyCode; 
	if (key <= 13 || (key >= 48 && key <= 57))
	{


		p=eval('formu.'+campo+'.value')
		a5=p.replace('.','')
		a5=a5.replace('.','')
		a5=a5.replace('.','')
		
		if(a5.length>=3)
		 {		
			p1=a5.substring(0,3);
			eval('formu.'+campo+'.value="'+p1+'.'+a5.substring(3,a5.length)+'"');
		
			p=eval('formu.'+campo+'.value')
			if(p.length>=7)
			 {		
				p1=p.substring(0,7);
				eval('formu.'+campo+'.value="'+p1+'.'+p.substring(7,p.length)+'"');
			 }
		
		 }


		
					/*		if(p.length==3)
							{
								p1=p.substring(0,3);
								eval('formu.'+campo+'.value="'+p1+'.'+p.substring(3,p.length)+'"');
							}
						
							if(p.length==7)
							{
								p1=p.substring(0,7);
								eval('formu.'+campo+'.value="'+p1+'.'+p.substring(7,p.length)+'"');
							}
					*/
					

		si=true
	}
	else
	{
		si=false
	}
	
	return si;
	
	}


function inlogin(evt)
	{ 
	// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 
	var key = nav4 ? evt.which : evt.keyCode; 
	return (key <= 13 || (key!=32));
	}
	
function back_go() {
	window.history.back();
}


function win_export()
{
	  // window.open("../functions/export.php")
	 location.href="../functions/export.php"
}


