

function dbg(msg) {
	//document.getElementById('form_info').innerHTML = msg + '     ' + document.getElementById('form_info').innerHTML;
	return false;
}



function check_onfocus(field, text) {

	var thefield = document.getElementById(field);
	
	dbg('onfocus: ' + field);
	
	if (field == 'form_info') {
		
		if (thefield.innerHTML == text) {
		
			thefield.innerHTML = '';
			thefield.className = '';
			
		}
	
	} else {
	
		if (thefield.value == text) {
		
			thefield.value = '';
		
			if (thefield.className == 'float label required') {
				
				thefield.className = 'float required';
				
			} else if (thefield.className == 'label required') {
			
				thefield.className = 'required';
			
			}
		
		}
	
	}

}




function check_onblur(field, text) {

	var thefield = document.getElementById(field);
	
	dbg('onblur: ' + field);
	
	if (field == 'form_info') {
	
		if (thefield.innerHTML == '') {
		
			thefield.innerHTML = text;
			thefield.className = 'label';
		
		}
	
	} else {
	
		if (thefield.value == '') {
		
			if (thefield.className == 'float required') {
			
				thefield.className = 'float label required';
			
			} else if (thefield.className == 'required') {
			
				thefield.className = 'label required';
				
			}
			
			thefield.value = text;
		
		}
	
	}

}