


function valida_mayusculas(tx){	

	var nMay = 0, nMin = 0, nNum = 0
	var t1 = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ"
	var t2 = "abcdefghijklmnñopqrstuvwxyz"
	var t3 = "0123456789"
	for (i=0;i<tx.length;i++) {
		if ( t1.indexOf(tx.charAt(i)) != -1 ) {nMay++}
		if ( t2.indexOf(tx.charAt(i)) != -1 ) {nMin++}
		if ( t3.indexOf(tx.charAt(i)) != -1 ) {nNum++}
	}
	if ( nMay>4) { alert("Abuso de Letras Mayusculas\n\nUd. no debe ingresar sus datos todos escritos en mayusculas\nEjemplo correcto: Maria Gonzalez"); return false; } //else{ return false }
}







function validar_email(mail){
// si es valido devuelve true 

	//var filter=/^[A-Za-z][A-Za-z0-9_.]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
	var filter=/^[A-Za-z_.-][A-Za-z0-9_.-]*@[A-Za-z0-9_.-]+\.[A-Za-z0-9_.-]+[A-za-z]$/;

	if (mail.length == 0){   
	
		// alert('es vacio'); 
		return false; 
	}


	if (filter.test(mail)){

//		alert('Es un correo valido: ' + mail);
		return true;

	}else{
	
//		alert('no es valido 2' + mail);
		return false;

	} 
	


}

function getConfirmarSimple(formulario) //confirm order delete
{

  var entrar = confirm("ż Confirma ?");

	if (entrar){
			formulario.submit();
	}

}




	function confirmar(id, ask, url) //confirm order delete
	{
		temp = window.confirm(ask);
		if (temp) //delete
		{
			window.location=url;
		}
	}

	function open_window(link,w,h)
	{
		var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes";
		newWin = window.open(link,'newWin',win);
	}






// Deshabilitar click derecho 
var message=" Patagonia Jobs ";

function click(e) { 

	if (document.all) {

		if (event.button==2||event.button==3) {
		
				alert(message);
				return false;
		}
	}

	if (document.layers) {

		if (e.which == 3) {
		
			alert(message);
			return false;
		}
	}
}

if (document.layers) {

	document.captureEvents(Event.MOUSEDOWN);
}
	document.onmousedown=click;



  function mOvr(src,clrOver) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	  src.bgColor = clrOver;
	  src.fontColor = clrOver;
	}
  }
  function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = clrIn;
	  src.fontColor = clrIn;
	}
  }
  function mClk(src) {
    if(event.srcElement.tagName=='td'){
	  src.children.tags('A')[0].click();
    }
  }

