//wait till form pre-fill options from toolbars have done their thing
	window.onload = setUpLabels;

	// all our functions will have access to this array
	var compactLabelArray = document.getElementsByTagName('label');

	function setUpLabels() { 
	
		var labels, labelsFor, check, i;
		for(i= 0; i < compactLabelArray.length; i++) {
			//first lets move the labels into place
			compactLabelArray[i].className = 'compactLabel';
			
			//each time through the loop 'labels' is the label your on, 
			//'labelsFor' gets the info in the 'for=' attribute
			//'labelPartner' uses labelFor to get the associated form field's value
			labels = compactLabelArray[i];			
			labelsFor = labels.getAttribute('for') || labels.getAttribute('htmlFor');			
			labelPartner = document.getElementById(labelsFor).value;
		
			//if the form field has a value..hide the label
			if (labelPartner !== '') labels.className = 'compactLabelShift';
		
			//the onfocus for this form field will get it's own id and pass
			//that and what it's visibility should be to the 'toggle' function
			document.getElementById(labelsFor).onfocus = function () {
				labelId = this.id;	
				toggleLabel(labelId,'hide');	
			}

			//the onblur for this form field will get it's own id and pass
			//that and what it's visibility should be to the 'toggle' function
			document.getElementById(labelsFor).onblur = function () {
				if (this.value === '') {
					labelId = this.id;	
					toggleLabel(labelId,'show');
			}}
		}	
	}

	function toggleLabel(ident,visibility) 
	{	
		var labelId = ident;
		var vis = visibility;
		for(i= 0; i < compactLabelArray.length; i++) {
			//loop through all of the labels till we find the one with the same id in it's 'for=' attribute
			//then either turn it to show or hide depending on the variable 'vis'
			labelTemp = compactLabelArray[i].getAttribute('for') || compactLabelArray[i].getAttribute('htmlFor');
			if(labelId == labelTemp)	{			
				if(vis == 'show') {
					compactLabelArray[i].className = 'compactLabel';				
				} else if(vis == 'hide')	{
					compactLabelArray[i].className = 'compactLabelShift';		
				}
			}
		}
	}