function $(eid){
	return document.getElementById(eid);
}

function shift(thisObj, thisMaxLength, newElement){
	thisObj.value.length >= thisMaxLength ? $(newElement).focus() : null;
	return false;
}

function toggle_previous_address(isChecked, frmId){
	var frmId = $(frmId);
	
	frmId.style.display = isChecked ? 'block' : 'none';
	
	var inputCollections = frmId.getElementsByTagName('input');
	var inputCollections2 = frmId.getElementsByTagName('select');
	
	toggle_form_el(inputCollections, isChecked);
	toggle_form_el(inputCollections2, isChecked);
}

function toggle_previous_address2(isChecked, frmId){
	var frmId = $(frmId);
	
	frmId.style.display = isChecked ? 'block' : 'none';
	
	//var inputCollections = frmId.getElementsByTagName('input');
	//var inputCollections2 = frmId.getElementsByTagName('select');
	
	//toggle_form_el(inputCollections, isChecked);
	//toggle_form_el(inputCollections2, isChecked);
}

function toggle_form_el(htmlCollection, status){
	var htmlCollectionLength = htmlCollection.length;
	
	for(var i=0; i<htmlCollectionLength; i++){
		htmlCollection[i].disabled = status ? false : true;
	}
}