function resizeFields() {
	if ( !document.getElementById ) {return false;}
	if ( !document.getElementById('sebForm') ) {return false;}
	if ( document.getElementById('order-form') ) {return false;}
	
	var sebForm;
	var inputs;
	var selects;
	var textareas;
	var i;
	var size;

	sebForm = document.getElementById('sebForm');
	inputs = sebForm.getElementsByTagName('input');
	selects = sebForm.getElementsByTagName('select');
	textareas = sebForm.getElementsByTagName('textarea');
	
	//Change size of all inputs and password fields based on maxlength/size
	for (i=0; i < inputs.length; i++) {
		//Make sure field is text or password
		if ( inputs[i].type == 'text' || inputs[i].type == 'password' ) {
			
			//get maxlength/size (default 30)
			if ( inputs[i].maxLength != undefined ) {
				size = parseInt(inputs[i].maxLength);
			} else if ( inputs[i].size != undefined ) {
				size = parseInt(inputs[i].size);
			} else {
				size = 30;
			}// /if
			
			//set width based on size
			if ( inputs[i].style != undefined && inputs[i].style.width != undefined ) {
				if ( size >= 60 ) {
					inputs[i].style.width = '300px';
				} else if ( size >= 30 ) {
					inputs[i].style.width = '200px';
				} else if ( size >= 10 ) {
					inputs[i].style.width = '150px';
				} else if ( size >= 4 ) {
					inputs[i].style.width = '50px';
				} else if ( size < 4 ) {
					inputs[i].style.width = '30px';
				} else {
					inputs[i].style.width = '200px';
				}// /if
			}// /if
		}// /if
	}// /for
	//change all selects to 300px-width
	for (i=0; i < selects.length; i++) {
		selects[i].style.width = '300px';
	}// /for
	//change all textareas to 300px-width
	for (i=0; i < textareas.length; i++) {
		textareas[i].style.width = '300px';
	}// /for
}
addEvent(window, 'load', resizeFields);