<!--

function nAleatorio()
{
	aleat=Math.random()*9;
	aleat=Math.floor(aleat);
	aleat=aleat+1
	return aleat
}

function nAleatorio2()
{
	aleat=Math.random()*5;
	aleat=Math.floor(aleat);
	aleat=aleat+1
	return aleat
}

function ImprimirPlano() {
	parent.mPlano.focus()
	parent.mPlano.print()
}

function BorrarFormulario() {
top.mEmpleo.document.FrontPage_Form1.tPuesto.value="Ninguno"
top.mEmpleo.document.FrontPage_Form1.tNombre.value=""
top.mEmpleo.document.FrontPage_Form1.tApellidos.value=""
top.mEmpleo.document.FrontPage_Form1.tTelefonos.value=""
top.mEmpleo.document.FrontPage_Form1.tEmail.value=""
top.mEmpleo.document.FrontPage_Form1.tNacionalidad.value=""
top.mEmpleo.document.FrontPage_Form1.tResidencia.value=""
top.mEmpleo.document.FrontPage_Form1.tTitulo.value=""
top.mEmpleo.document.FrontPage_Form1.tEspecialidades.value=""
top.mEmpleo.document.FrontPage_Form1.tHardysoft.value=""
top.mEmpleo.document.FrontPage_Form1.tLenguamadre.value=""
top.mEmpleo.document.FrontPage_Form1.tIdiomasorigen.value=""
top.mEmpleo.document.FrontPage_Form1.tCAT[1].checked=true
top.mEmpleo.document.FrontPage_Form1.tCATotros.value=""
}

function EnviarFormulario() {
vTo="rrhh@sevensi.net"
vAsunto="SOLICITUD DE EMPLEO - "+top.mEmpleo.document.FrontPage_Form1.tNombre.value+" "+top.mEmpleo.document.FrontPage_Form1.tApellidos.value
vCuerpo="PUESTO SOLICITADO = " + top.mEmpleo.document.FrontPage_Form1.tPuesto.value + "\13"
vCuerpo=vCuerpo + "NOMBRE = " + top.mEmpleo.document.FrontPage_Form1.tNombre.value + "\13"
vCuerpo=vCuerpo + "APELLIDOS = " + top.mEmpleo.document.FrontPage_Form1.tApellidos.value + "\13"
vCuerpo=vCuerpo + "TELÉFONO DE CONTACTO = " + top.mEmpleo.document.FrontPage_Form1.tTelefonos.value + "\13"
vCuerpo=vCuerpo + "E-MAIL = " + top.mEmpleo.document.FrontPage_Form1.tEmail.value + "\13"
vCuerpo=vCuerpo + "NACIONALIDAD = " + top.mEmpleo.document.FrontPage_Form1.tNacionalidad.value + "\13"
vCuerpo=vCuerpo + "PAÍS DE RESIDENCIA = " + top.mEmpleo.document.FrontPage_Form1.tResidencia.value + "\13"
vCuerpo=vCuerpo + "TÍTULO ACADÉMICO = " + top.mEmpleo.document.FrontPage_Form1.tTitulo.value + "\13"
vCuerpo=vCuerpo + "CAMPOS DE ESPECIALIDAD = " + top.mEmpleo.document.FrontPage_Form1.tEspecialidades.value + "\13"
vCuerpo=vCuerpo + "HARDWARE Y SOFTWARE DISPONIBLE = " + top.mEmpleo.document.FrontPage_Form1.tHardysoft.value + "\13"
vCuerpo=vCuerpo + "LENGUA MADRE = " + top.mEmpleo.document.FrontPage_Form1.tLenguamadre.value + "\13"
vCuerpo=vCuerpo + "IDIOMAS ORIGEN = " + top.mEmpleo.document.FrontPage_Form1.tIdiomasorigen.value + "\13"
vCuerpo=vCuerpo + "TRADOS = "
if (top.mEmpleo.document.FrontPage_Form1.tCAT[1].checked) {
		vCuerpo=vCuerpo + "No"
	}
	else {
		vCuerpo=vCuerpo + "Sí"
	}
vCuerpo=vCuerpo + "\13"
vCuerpo=vCuerpo + "OTROS = "
if (top.mEmpleo.document.FrontPage_Form1.tCATotros.value == "") {
		vCuerpo=vCuerpo + "Ninguno"
	}
	else {
		vCuerpo=vCuerpo + top.mEmpleo.document.FrontPage_Form1.tCATotros.value
	}

alert ("Recuerde adjuntar al mensaje un archivo MS Word con su CV")
parent.location.href='mailto:'+vTo+'?subject='+vAsunto+'&body='+vCuerpo
}

function leerCookie(nombre) {
  var buscamos = nombre + "=";
  if (document.cookie.length > 0) {
    i = document.cookie.indexOf(buscamos);
    if (i != -1) {
      i += buscamos.length;
      j = document.cookie.indexOf(";", i);
      if (j == -1)
        j = document.cookie.length;
        texto=unescape(document.cookie.substring(i,j));
        texto=texto.replace(/[+]+/g," ");
        return texto;
    }
  }
}

function ConexionDB() {
cadenatexto = "Conexion.asp?Log=" + document.fAcceso.ctUsuario.value + "&Pwd=" + document.fAcceso.ctPassword.value
location.href = cadenatexto
}

function BorrarCampos() {
document.fAcceso.ctUsuario.value=""
document.fAcceso.ctPassword.value=""
document.fAcceso.ctUsuario.focus()
}

function ObtenerNavegador() {
var browserType=navigator.userAgent
if (browserType.indexOf("MSIE")==-1) {return false}
else {return true}
}

function CalculaAlto() {
	if (document.layers) {
		alto=window.innerHeight;
	} else {
		alto=document.body.clientHeight;
	}
	return eval(alto);
}

function CalculaAncho() {
	if (document.layers) {
		ancho=window.innerWidth;
	} else {
		ancho=document.body.clientWidth;
	}
	return eval(ancho);
}

function PintarCapa(nCapa) {

//Ancho y alto de la capa
txAncho = nCapa.style.width
txAlto = nCapa.style.height
dAncho = eval(txAncho.substring(0,txAncho.length-2))
dAlto = eval(txAlto.substring(0,txAlto.length-2))

//Alto y ancho de la ventana
AnchoVentana = CalculaAncho()
AltoVentana = CalculaAlto()

//Calcular la posición de la capa
if ((dAncho - AnchoVentana) > 0) {PosX = 0}
else {PosX = eval((AnchoVentana - dAncho) / 2)}
if ((dAlto - AltoVentana) > 0) {PosY = 0}
else {PosY = eval((AltoVentana - dAlto) / 2)}

//Pintar el marco
nCapa.style.visibility = "visible"
nCapa.style.position = "absolute"
nCapa.style.left = PosX
nCapa.style.top = PosY
}


function xPintarCapa(nCapa) {

//Ancho y alto de la capa
txAncho = nCapa.style.width
txAlto = nCapa.style.height
//txAncho=document.getElementById("cComoLlegar").width
//txAlto=document.getElementById("cComoLlegar").height
//dAncho=eval(txAncho)
//dAlto=eval(txAlto)
dAncho = eval(txAncho.substring(0,txAncho.length-2))
dAlto = eval(txAlto.substring(0,txAlto.length-2))

//Posición del ratón
xRaton = eval(event.clientX)
yRaton = eval(event.clientY)

//Alto y ancho de la ventana
AnchoVentana = CalculaAncho()
AltoVentana = CalculaAlto()
//AltoVentana = document.body.clientHeight


//Calcula la posición de la capa
if ((xRaton + dAncho) > AnchoVentana) {
	if ((xRaton - dAncho) < 0) {PosX = xRaton}
	else {PosX = xRaton - dAncho}
}
else
	{PosX = xRaton}

if ((yRaton + dAlto) > AltoVentana) {
	if ((yRaton - dAlto) < 0) {PosY = yRaton}
	else {PosY = yRaton - dAlto}
}
else
	{PosY = yRaton}

//Pintar el marco
nCapa.style.visibility = "visible"
nCapa.style.position = "absolute"
nCapa.style.left = PosX
nCapa.style.top = PosY
//texto="AnchoCapa=" + dAncho + " AltoCapa=" + dAlto + "<br> xRaton=" + xRaton + " yRaton=" + yRaton + "<br>"
//texto=texto + "AnchoVentana=" + AnchoVentana + " AltoVentana=" + AltoVentana
//document.getElementById("cComoLlegar").innerHTML=texto

}

function OcultarCapa(nCapa) {
nCapa.style.visibility = "hidden"
}


function Abrir_ventana(pagina) {
var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrolbars=no, width=660, height=420, top=0, left=0"
window.open(pagina,"",opciones)
}


//	window.alert(window.screenLeft)
//	window.alert(window.screenTop)
//	window.alert(document.body.clientWidth)
//	window.alert(document.body.clientHeight)
//	window.alert(document.body.clientLeft)
//	window.alert(document.body.clientTop)
//	ya window.alert(screen.width)
//	ya window.alert(screen.height)
//-->
