// Jump to next box phone I

function check()
{
var letters = document.compose3.phonenumber31.value.length +1;
if (letters <= 3)
{document.compose3.phonenumber31.focus()}
else
{document.compose3.phonenumber32.focus()}
}
<!-- This code makes the jump from textbox two to text box three -->
function check2()
{
var letters2 = document.compose3.phonenumber32.value.length +1;
if (letters2 <= 3)
{document.compose3.phonenumber32.focus()}
else
{document.compose3.phonenumber33.focus()}
}
<!-- This code makes the jump from textbox three to textbox four -->
function check3()
{
var letters3 = document.compose3.phonenumber33.value.length +1;
if (letters3 <= 4)
{document.compose3.phonenumber33.focus()}
else
{document.compose3.passcode.focus()}
}


// Jump to next box phone II

function check11()
{
var letters = document.compose1.phonenumber11.value.length +1;
if (letters <= 3)
{document.compose1.phonenumber11.focus()}
else
{document.compose1.phonenumber12.focus()}
}
<!-- This code makes the jump from textbox two to text box three -->
function check22()
{
var letters2 = document.compose1.phonenumber12.value.length +1;
if (letters2 <= 3)
{document.compose1.phonenumber12.focus()}
else
{document.compose1.phonenumber13.focus()}
}
<!-- This code makes the jump from textbox three to textbox four -->
function check33()
{
var letters3 = document.compose1.phonenumber13.value.length +1;
if (letters3 <= 4)
{document.compose1.phonenumber13.focus()}
else
{document.compose1.passcode8.focus()}
}


// Validate number only script
function numberOnly(e)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);
keychar = keychar.toLowerCase();
// control keys
if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) )
   return true;
// alphas and numbers
else if ((("0123456789-").indexOf(keychar) > -1))
   return true;
else
   return false;
}	


// Validate the phone number on sign in page
function validate1() {
   var t11  = document.compose1.phonenumber11
   var t12  = document.compose1.phonenumber12
   var t13  = document.compose1.phonenumber13
   var t14  = document.compose1.passcode
   var t15  = document.compose1.passcode8
   
   if (t11.value.length < 3) 
      {    
	alert("Please enter your phone number");
	t11.focus();
	return false; }
   if (t12.value.length < 3) 
      {    
	alert("Please enter your phone number");
	t12.focus();
	return false; }	  
   if (t13.value.length < 4) 
      {    
	alert("Please enter your phone number");
	t13.focus();
	return false; }  
   if (t14.value.length < 3) 
      {    
	alert("Please enter your password");
	t14.focus();
	return false; }
   if (t15.value.length < 3) 
      {    
	alert("Please enter your password");
	t15.focus();
	return false; }
   }
