// *******************************************************************
// round2
// *******************************************************************
function round2(n) {
  n = Math.round(n * 100) / 100;
  n = (n + 0.001) + '';
	return n.substring(0, n.indexOf('.') + 3);
}

// *******************************************************************
// validateEmail
// *******************************************************************
function validateEmail(email){	
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/.test(email)){
		return true;
	}else{
		return false;
	}
	
}

// *******************************************************************
// moveItem
// *******************************************************************
function moveItem(toBox,fromBox){
	var selectedItemLabel, selectedItemValue, toBoxLength;
	
	selectedItemLabel = fromBox.options[fromBox.selectedIndex].text;
	selectedItemValue = fromBox.options[fromBox.selectedIndex].value;
	toBoxLength = toBox.options.length;
	
	// add item to chosen
	toBox.options[toBoxLength] = new Option(selectedItemLabel,selectedItemValue);
	
	// remove item from unchosen
	fromBox.options[fromBox.selectedIndex] = null
}

// *******************************************************************
// collectChosen
// *******************************************************************
function collectChosen(chosenBox){
	var collStr, chosenBoxLength;
	
	collStr = "";
	chosenBoxLength = chosenBox.length;
	
	for(i=0;i<chosenBoxLength;i++){
		collStr += chosenBox.options[i].value + ",";
	}
	
	return collStr;
}