
<!-- This script is written (by Sujeet) for the purpose of automatic jumping of cursor to next field-->

	var currentField, nextField, sizeCF, e; 	
   	var isNN = (navigator.appName.indexOf("Netscape, Microsoft Internet Explorer")!=-1);
    
	function advance(c,n,s,e) { 
    	currentField = c, nextField = n;  sizeCF=s;
    	var keyCode = (isNN) ? e.which : e.keyCode; 
    	var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
    	
    	if((currentField.value.length == sizeCF) && !containsElement(filter,keyCode))
    	{
    		nextField.focus();
    	}
	}
	
	function containsElement(arr, ele) {
	    var found = false, index = 0;
	    while(!found && index < arr.length)
	      if(arr[index] == ele)
	         found = true;
	          else
	         index++;
	       return found;
	}

