// Name:		NumericKeyboardLock()
// Desc:		Prevent user to enter non-digit characters
// Input:		Evt = Input event.
// Return:		True of False for key strick.
// Example:		 <INPUT id="txtChar" onkeypress="return NumericKeyboardLock(event)" type="text" name="txtChar">
// Ver:			1.0


function NumericKeyboardLock(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57))
		return false;
	return true;
}

function ValidateRegistrationForm(){

if (document.getElementById("PhoneNumber").value == ""){
        alert("Please complete your phone number.");
        document.getElementById("PhoneNumber").focus();
        return false;
}
else {
        var myPhoneNumber = document.getElementById("PhoneNumber").value;
        var myPhoneFirstDigit = myPhoneNumber.charAt(0);
        if (myPhoneFirstDigit == "0") {
                alert("Phone number could not start with zero character.");
                document.getElementById("PhoneNumber").focus();
                return false;
        }
}

if (document.getElementById("CaptchaCode").value == ""){
        alert("Please enter the access code.");
        document.getElementById("CaptchaCode").focus();
        return false;
}
    try{ntptEventTag("ev=mobile_submit")} catch(err) {}

    return true;
}

function PageInitalization()
{
    document.getElementById("Country").focus();
}


function OpeneCogra(lang)
{
        var w = 496;
        var h = 506;
        var l = (window.screen.width-w)/2;
        var t = (window.screen.height-h)/2;
        window.open("../../new888/lang/" +  lang + "/texts/ecogra.htm","eCogra","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}

function ContactUs()
{
        var w = 793;
        var h = 517;
        var l = 1; //(window.screen.width-w)/2;
        var t = 1; //(window.screen.height-h)/2;         
        var LocationString = "../new888/lang/en/texts/contactusform/contactus.htm?" + sCut;     
        var x = window.open(LocationString,"contactUsWnd","status=no,toolbar=no,menubar=no,location=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h)   
}

function activateFlash() {
    document.location.href = "HowToDownload.htm"; 
}