// Contains basic functions used across the concierge site

	function isServiceSelected( form ) {
		if ( form.ID.options[form.ID.selectedIndex].value == "" ) {
			window.alert( "You must select an option!" );
			return false;
		} else {
			return true;
		}
	}
	
	function serviceChanged( form ) {
		if ( form.ID.options[form.ID.selectedIndex].value == "" ) {
			return false;
		} else {
			form.submit();
			return true;
		}
	}
	
	function addFields( resultField, field1, field2 ) {
		var field1val = 0;
		var field2val = 0;
				
		if ( field1.value != "" ) {
			field1val = parseInt( field1.value );
		}
		if ( field2.value != "" ) {
			field2val = parseInt( field2.value );
		}

		if (isNaN(field1val) || isNaN(field2val))
			resultField.value = "";
		else
			resultField.value =  field1val + field2val;
				
		return true;
	}

	function notEmpty( field, msg ) {
		if ( field.value.length == 0 ) {
			alert( msg );
			return false;
		} else {
			return true;
		}
	}
	
	function showPopup(id)
	{	
		var h = 400;
		var w = 400;
		var x = (screen.width/2)-(w/2);
		var y = (screen.height/2)-(h/2);
			
		win = window.open("PopupWindow.asp?id=" + id, "PopupWindow", "toolbar=no,width=" + w + ",height=" + h + ",menubar=no,resizable=yes,status=no,scrollbars=yes,left=" + x + ",top=" + y);
		return;
	}
	
	function flowerPopup(src)
	{	
		var h = 500;
		var w = 500;
		var x = (screen.width/2)-(w/2);
		var y = (screen.height/2)-(h/2);
			
		win = window.open("FlowerPopup.asp?src=" + src, "FlowerPopup", "toolbar=no,width=" + w + ",height=" + h + ",menubar=no,resizable=yes,status=no,scrollbars=yes,left=" + x + ",top=" + y);
		return;
	}
