﻿// JScript File
var URI = "pokermac.com.ar";
function InicioClick(){window.location = "http://" + URI;}
function ForoClick(){window.location = "http://foro." + URI;}
function NuevoClick(){window.open('http://pokermac.com.ar/Pages/newuserframe.aspx', 'external', 'width=944,height=589,directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,resizable=no,scrollbars=no');}
function ContactoClick(){window.location = "http://" + URI + "/Pages/Contact.aspx";}
function TorneoClick(){window.location = "http://" + URI + "/Torneos-Poker/Torneos-Poker.aspx";}
function MisManosClick(){window.location = "http://" + URI + "/Manos-Poker/Manos-Poker.aspx";}
function MiPerfilClick(){window.location = "http://foro." + URI + "/default.aspx?g=cp_profile";}

function validaF5(e)
{ 
    var intKey = (window.Event) ? e.which : e.keyCode;  
                
    if (intKey == 116 || intKey == 34) //(Av Pag + F5)
    {
        if (e.preventDefault)
        {
            e.preventDefault( );    // DOM Level 2
        }
        else 
        {  
            event.returnValue = false;
            event.keyCode = 0;
            return false;
        }
    }
}
function focusUser()
{
    if (document.getElementById('TableLogin') != null)
        if (document.getElementById('txtUser').value == '')
        {
            document.getElementById('txtUser').focus();
        }
        else
            document.getElementById('txtPass').focus();
}
function login(e)
{
    var intKey = (window.Event) ? e.which : e.keyCode;   
    if (intKey == 13)
    {
        if (e.preventDefault)
        e.preventDefault( );
        else 
        {
        event.returnValue = false;
        event.keyCode = 0;
        return false;
        }

        __doPostBack('linkLogin','');

    }
            
}
function focusPass(e)
{
    var intKey = (window.Event) ? e.which : e.keyCode;
    if (intKey == 13)
    {
        if (document.getElementById('txtUser').value == '')
        {
            alert('Debe ingresar el usuario');
            document.getElementById('txtUser').focus();
        }
        else
        {
            document.getElementById('txtPass').focus();
            return false;
        }
    }
}

