﻿// JScript File

// register a keypress on the pad
var pinNo = "";

function padKeypress(key){

    //pinNo = document.forms[0].txtPin.value
    pinNo = txtPin.GetText();

    if (pinNo == null) {
        pinNo = ""
    }

    if (pinNo.length == 0) {
        pinNo = key;
    }
    else if (pinNo.length < 6) {
        pinNo += key;
    }

	    //document.forms[0].txtPin.value = pinNo;
	    txtPin.SetText(pinNo);	  
}

// clear pin number on pad
function padClear(){

    txtPin.SetText("");
    pinNo = "";
}

function moveKeyPad(){

var randomnumber=Math.floor(Math.random()*50)
 var keyPad = document.getElementById("KeyPadDiv");
    keyPad.style.left = randomnumber;
    keyPad.style.right = "auto";
    //document.frmMain.txtPin.attributes["ReadOnly"].value = "true";
}
