// Desarrollado por: Daniel A. Moniz M.  02/06/2006

//Mostrar Mensaje en la barra de estado:
window.status ="w w w . i n g p r e g o . c o m"
var le, to
	le = screen.width / 4;
	to = screen.height / 4;

function evaProvee() {
	window.open('evaProvee.asp' , '' , 'width=550, height=360 ,menubar=no, left='+le+', top='+to+'');
}
function aseCalidad() {
	window.open('aseCalidad.asp' , '' , 'width=550, height=360 ,menubar=no, left='+le+', top='+to+'');
}
function ctrolCalidad() {
	window.open('ctrolCalidad.asp' , '' , 'width=550, height=360 ,menubar=no, left='+le+', top='+to+'');
}
function inspObras() {
	window.open('inspObras.asp' , '' , 'width=550, height=400 ,menubar=no, left='+le+', top='+to+'');
}
function validarEmpleo() {
var empleo = document.Form.empleo.value
if (empleo == "" || empleo == null) 
   {
   window.alert("Te falta introducir el Empleo")			
   document.Form.empleo.focus()				
   return false
   }	
}

function validarPass() {
	
	var pass = document.Form.pass.value
if (pass == "" || pass == null) 
   {
   window.alert("Te falta introducir tu password anterior")			
   document.Form.pass.focus()				
   return false
   }
	
	
	var pass01 = document.Form.pass01.value
if (pass01 == "" || pass01 == null) 
   {
   window.alert("Te falta introducir tu nuevo password")			
   document.Form.pass01.focus()				
   return false
   }
var pass02 = document.Form.pass02.value
if (pass02 == "" || pass02 == null) 
   {
   window.alert("Te falta repetir tu nuevo password")			
   document.Form.pass02.focus()				
   return false
   }
if (pass01 != pass02) 
   {
   window.alert("Los Password deben ser identicos")			
   document.Form.pass02.focus()				
   return false
   }


}

function estudioSuelos() {
	window.open('estudioSuelos.asp' , '' , 'width=555, height=400 ,menubar=no, left='+le+', top='+to+'');
}
function proGeo() {
	window.open('proGeo.asp' , '' , 'width=555, height=485 ,menubar=no, left='+le+', top='+to+'');
}
function inspGeo() {

	window.open('inspGeo.asp' , '' , 'width=550, height=360 ,menubar=no, left='+le+', top='+to+'');
}
function instGeo() {
	window.open('instGeo.asp' , '' , 'width=550, height=360 ,menubar=no, left='+le+', top='+to+'');
}


function verPoliticas() {
	window.open('politicas.asp' , '' , 'width=550, height=260 ,menubar=no, left='+le+', top='+to+'');
}

function verPoliticasPC() {
	window.open('../politicas.asp' , '' , 'width=550, height=260 ,menubar=no, left='+le+', top='+to+'');
}

function verAcercaDe() {
	window.open('acercaDe.asp' , '' , 'width=550, height=260 ,menubar=no, left='+le+', top='+to+'');
}

function verAcercaDePC() {
	window.open('../acercaDe.asp' , '' , 'width=550, height=260 ,menubar=no, left='+le+', top='+to+'');
}

function cerrar() { 
window.close();
} // Fin de la funcion Cerrar

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 bloquearMouse() {
	
var message="w w w . i n g p r e g o . c o m";
function clickIE() {
	if (document.all) { (message); return false; }}

function clickNS(e) {
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) { (message); return false;  }}}
	if (document.layers) {
		document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS;
	} else { document.onmouseup=clickNS;document.oncontextmenu=clickIE; }
	document.oncontextmenu=new Function("return false"); }

function imprimir() {
	window.print(); // Para Imprimir 
}

function recomendarPagina(){
	var url = window.location.href;
	window.open('recomendar.asp?url='+url, '' , 'width=550, height=550 ,menubar=no, left='+le+', top='+to+'');
}

function envioCV() {
var nombre  = document.Form.nombre.value
if (nombre == "" || nombre == null) 
   {
   window.alert("Te falta introducir tu Nombre y Apellido")			
   document.Form.nombre.focus()				
   return false
   }
 
var email  = document.Form.email.value
if (email == "" || email == null) 
   {
   window.alert("Te falta introducir tu E-mail")			
   document.Form.email.focus()				
   return false
   }

if (email.indexOf("@") == -1) 
   {
   window.alert("Se te olvido colocar el símbolo @")
   document.Form.email.focus()				
   return false						
   }

if (email.indexOf(".") == -1) 
   {
   window.alert("Te falta completar el dominio, por ejemplo contacto@ingprego.com")
   document.Form.email.focus()				
   return false						
   }

 var ciudad  = document.Form.ciudad.value
if (ciudad == "" || ciudad == null) 
   {
   window.alert("Te falta introducir la Ciudad/País")			
   document.Form.ciudad.focus()				
   return false
   }

var archivo = document.Form.File1.value
if (archivo == "" || archivo == null) 
   {
   window.alert("Te falta seleccionar el archivo")			
   document.Form.File1.focus()				
   return false
   }
var comentarios = document.Form.comentarios.value
if (comentarios == "" || comentarios == null) 
   {
   window.alert("Te falta introducir los Comentarios")			
   document.Form.comentarios.focus()				
   return false
   }
} // Final de la Funcion para validar el formulario de Enviar CV

function envioRec() {
var nombre  = document.Form.nombre01.value
if (nombre == "" || nombre == null) 
   {
   window.alert("Te falta introducir tu Nombre y Apellido")			
   document.Form.nombre01.focus()				
   return false
   }
 
var email  = document.Form.email01.value
if (email == "" || email == null) 
   {
   window.alert("Te falta introducir tu E-mail")			
   document.Form.email01.focus()				
   return false
   }

if (email.indexOf("@") == -1) 
   {
   window.alert("Se te olvido colocar el símbolo @")
   document.Form.email01.focus()				
   return false						
   }

if (email.indexOf(".") == -1) 
   {
   window.alert("Te falta completar el dominio, por ejemplo contacto@ingprego.com")
   document.Form.email01.focus()				
   return false						
   }

var nombre2  = document.Form.nombre02.value
if (nombre2 == "" || nombre2 == null) 
   {
   window.alert("Te falta introducir el Nombre y Apellido a quien se lo vas a enviar")			
   document.Form.nombre02.focus()				
   return false
   }
 
var email2  = document.Form.email02.value
if (email2 == "" || email2 == null) 
   {
   window.alert("Te falta introducir el E-mail a quien se lo vas a enviar")			
   document.Form.email02.focus()				
   return false
   }

if (email2.indexOf("@") == -1) 
   {
   window.alert("Se te olvido colocar el símbolo @")
   document.Form.email02.focus()				
   return false						
   }

if (email2.indexOf(".") == -1) 
   {
   window.alert("Te falta completar el dominio, por ejemplo contacto@ingprego.com")
   document.Form.email02.focus()				
   return false						
   }
} // Final de la Funcion para validar la recomendacion

function fechaActual() {
	var mydate=new Date();
	var mes= new String();
	var year=mydate.getYear();
	if (year < 1000)
		year+=1900;
	var day=mydate.getDay();
	var month=mydate.getMonth()+1;
	if (month<10)
		month="0"+month;
	var daym=mydate.getDate();
	if (daym<10)
		daym="0"+daym;
	if(month==1) { mes='Enero';
	} else if(month==2) {mes='Febrero';
	} else if(month==3) {mes='Marzo';
	} else if(month==4) {mes='Abril';
	} else if(month==5) {mes='Mayo';
	} else if(month==6) {mes='Junio';
	} else if(month==7) {mes='Julio';
	} else if(month==8) {mes='Agosto';
	} else if(month==9) {mes='Septiembre';
	} else if(month==10) {mes='Octubre';
	} else if(month==11) {mes='Noviembre';
	} else if(month==12) {mes='Diciembre';
	}

return " "+daym+" de "+mes+" de "+year;
}
// Funcion para cerrar Ventana
function cerrar() { 
window.close();
} // Fin de la funcion Cerrar

function envioContactos() {
var nombre  = document.Form.nombre.value
if (nombre == "" || nombre == null) 
   {
   window.alert("Te falta introducir tu Nombre y Apellido")			
   document.Form.nombre.focus()				
   return false
   }

var email  = document.Form.email.value
if (email == "" || email == null) 
   {
   window.alert("Te falta introducir tu E-mail")			
   document.Form.email.focus()				
   return false
   }

if (email.indexOf("@") == -1) 
   {
   window.alert("Se te olvido colocar el símbolo @")
   document.Form.email.focus()				
   return false						
   }

if (email.indexOf(".") == -1) 
   {
   window.alert("Te falta completar el dominio, por ejemplo atención@ingprego.com")
   document.Form.email.focus()				
   return false						
   }

var telefonos = document.Form.telefono.value
if (telefonos == "" || telefonos == null) 
   {
   window.alert("Te falta introducir un número telefónico de contacto")			
   document.Form.telefono.focus()				
   return false
   }

var ciudad  = document.Form.ciudad.value
if (ciudad == "" || ciudad == null) 
   {
   window.alert("Te falta introducir la Ciudad/País")			
   document.Form.ciudad.focus()				
   return false
   }

} // Final de la Funcion para validar el formulario Contactos

function envioSS() {
var nombre  = document.Form.nombre.value
if (nombre == "" || nombre == null) 
   {
   window.alert("Te falta introducir tu Nombre y Apellido")			
   document.Form.nombre.focus()				
   return false
   }
   
var compania  = document.Form.compania.value
if (compania == "" || compania == null) 
   {
   window.alert("Te falta introducir tu Compania, si no aplica escriba N/A")			
   document.Form.compania.focus()				
   return false
   }

var email  = document.Form.email.value
if (email == "" || email == null) 
   {
   window.alert("Te falta introducir tu E-mail")			
   document.Form.email.focus()				
   return false
   }

if (email.indexOf("@") == -1) 
   {
   window.alert("Se te olvido colocar el símbolo @")
   document.Form.email.focus()				
   return false						
   }

if (email.indexOf(".") == -1) 
   {
   window.alert("Te falta completar el dominio, por ejemplo contacto@ingprego.com")
   document.Form.email.focus()				
   return false						
   }

var telefonos = document.Form.telefono.value
if (telefonos == "" || telefonos == null) 
   {
   window.alert("Te falta introducir un número telefónico de contacto")			
   document.Form.telefono.focus()				
   return false
   }

var ciudad  = document.Form.ciudad.value
if (ciudad == "" || ciudad == null) 
   {
   window.alert("Te falta introducir la Ciudad/País")			
   document.Form.ciudad.focus()				
   return false
   }

var comentarios = document.Form.comentarios.value
if (comentarios == "" || comentarios == null) 
   {
   window.alert("Te falta introducir los Comentarios")			
   document.Form.comentarios.focus()				
   return false
   }
} // Final
