//show and hide virtual keyboard
function hideVkb() {
	if (document.getElementById("virtualKeyboard")){
		if (document.getElementById("virtualKeyboard").style.display == "block"){
			document.getElementById("virtualKeyboard").style.display = "none";
			//validaForm();
		}
	}
}
function showVkb() {
	if (document.getElementById("virtualKeyboard")){
		if (document.getElementById("virtualKeyboard").style.display == "none"){
			document.getElementById("virtualKeyboard").style.display = "block";
		}
	}
}
//show and hide virtual keyboard
//check for control and shift keypress
function checkctrl(event) {
	// current pressed key
	var pressedKey = String.fromCharCode(event.keyCode).toLowerCase();
	if (event.ctrlKey && (pressedKey == "c" || pressedKey == "v")) {
		// disable key press porcessing
		return false;
	}
   	if (event.shiftKey) {
       	// disable key press processing
       	return false;
   	}
}

		$(document).ready(function(){
			$("#virtualKeyboard").draggable();
		});
		function KeyContrast(act)
		{
			var imgSrc = $("#imgKeyboard").attr("src");
			var intImage = imgSrc.substring((imgSrc.indexOf(".")-1), imgSrc.indexOf(".")) * 1;
			var imgName = imgSrc.substring(0, (imgSrc.indexOf(".")-1)) 
			var imgExt = imgSrc.substring((imgSrc.indexOf(".")+1), imgSrc.length) 
			var minContrast = 1;
			var maxContrast = 4;
			if(act == "add" && intImage < maxContrast)
			{
				newSrc = imgName + (intImage + 1) + "." + imgExt;			
				$("#imgKeyboard").attr({ 
					src: newSrc
				});
			}
			if(act == "sub" && intImage > minContrast)
			{
				newSrc = imgName + (intImage - 1) + "." + imgExt;			
				$("#imgKeyboard").attr({ 
					src: newSrc
				});
			}
		}
		
		function KeyWrite(tc)
		{
			//var textInput = document.frm.password.value;
			var textInput = document.getElementById("password").value;
			//document.frm.password.value = textInput + tc;
			document.getElementById("password").value = textInput + tc;
		}
		
		function ActionForm(act)
		{
			if(act == "Submit")
			{
				validaForm();
				//if(ValidaFrm())
					//document.frm.submit();
			}
			
			if(act == "Reset")
			{
				document.getElementById("password").value = "";
			}
		
		}
		
		function ValidaFrm()
		{
			return true;
		}

