﻿function solonumeros() {
    var tecla = window.event.keyCode;
    if (tecla < 48 || tecla > 57)    {
        if (tecla != 46) {
        window.event.keyCode=0;
        }
    }
    if (window.event.keyCode==13) {
        alert(document.all);
    }
}

function Contactenos() {
    var _url="cncontactenos.aspx";
	WindowCenter(_url,"contactenos",460,280,"yes");
}

function Comercial() {
    var _url="cncomercial.aspx";
	WindowCenter(_url,"comercial",490,410,"yes");
	//return false;
}

function sololetras() {
    var tecla = window.event.keyCode;
    if((tecla < 65 || tecla >90) && (tecla<97 || tecla >122) && (tecla !=32)){
        window.event.keyCode=0;
    }
}
function validarvalor(ctrol) {
            //alert(document.getElementById(ctrol).value);
            if(document.getElementById(ctrol).value=="") {
                alert("Ingrese un valor");
                document.getElementById(ctrol).focus()
                return false;
            } else {
                return true;
            }            
        }
function numerosyletras() {
    var tecla = window.event.keyCode;
    if((tecla < 65 || tecla >90) && (tecla<97 || tecla >122) && (tecla < 48 || tecla > 57) && (tecla !=32)){
        window.event.keyCode=0;
    }
}
function Ayuda() {
    var _url="cnpasos.aspx";
	WindowCenter(_url,"help",600,450,"yes");
}
function WindowCenter(url,nombre,ancho,alto,scroll)
{
	var objWin = new Object();
	objWin.width = ancho;
	objWin.height = alto;
	if (navigator.appName == "Netscape")
	{
		objWin.left = window.screenX + ((window.outerWidth - objWin.width) / 2);
		objWin.top = window.screenY + ((window.outerHeight - objWin.height) / 2);
		var atributo = 'screenX=' + objWin.left + ',screenY=' + objWin.top + ',resizable=no,width=' + objWin.width + ',height=' + objWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	}
	else if (document.all)
	{
		objWin.left = ((screen.width-objWin.width) / 2);
		objWin.top = ((screen.height-objWin.height) / 2);
		var atributo = 'left=' + objWin.left + ',top=' + objWin.top + ',resizable=no,width=' + objWin.width + ',height=' + objWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	}
window.open(url,nombre,atributo);
}
function CargarJuego1() {
    var _url="w_carro1.html";
	WindowCenter(_url,"juego",700,500,"no");
}