
$(function(){
   $("#tabs_1").tabs();
   //tabSelect = document.location.hash.substr(1,document.location.hash.length);
   //alert(tabSelect);
   //$("#tabs_1").tabs('select',tabSelect-1);
}); 

/**************************************************************************************/

function get_selectbox_txt(from_handle,to_name){
   var si = from_handle.selectedIndex;
   var to_handle = document.getElementById(to_name);
   to_handle.value = from_handle.options[si].text;
   //testing
   //alert(to_handle.value);
}

/**************************************************************************************/

// MAGIC TAB
function inputTab(obj,len,alpha,nextElement,fillElement) {
	var maxSize = 0 ;
	var rExp  =  /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/;

	if (obj.value.length != maxSize) {
		maxSize = obj.value.length;
		if (alpha == 1) {
			numTrue = rExp.test(obj.value);
		}
		if ((maxSize == len) && (numTrue)) {
			if (fillElement != 0){
				fillElement.value = obj.value;
			}
			nextElement.focus(); 
		}
	}
	
}
// MAGIC TAB


