// Display instruction text [str] if field is blank
// Clear instruction text if field is clicked
function resetField(obj,str){
	if(obj.value.length==0){
		obj.value=str;
		return;
	}
	if(obj.value==str){
		obj.value="";
	}
}

// Tab switcher
// container = ID of tab container, must be used if more than one tab module is used on page (optional usage if only one tab module is displayed on a page )
// tab = ID of tab (mandatory)
function showTab(tab, container){
	if(typeof(container)=='undefined') {
		container='';
	}
	var i=1;
	do{
		document.getElementById(container+"tab"+i).className = "tab";
		document.getElementById(container+"tab"+i+"content").style.display="none";
		i++;
	}
	while(document.getElementById(container+"tab"+i));
	document.getElementById(container+tab+"content").style.display="block";
	document.getElementById(container+tab).className = "activeTab";
}

