
function usure(message,url){
			if(confirm(message))
				location.href=url;
					else notShutDown = false;
			}

 


// function to load the calendar window.
function ShowCalendar(FormName, FieldName)
{
	window.open("CFDateSelectPopupWindow.cfm?FormName=" + FormName + "&FieldName=" + FieldName, "CalendarWindow", "width=200,height=200");

}	


// Basic Text Editing Functions
function setText(argStr){
	var theRange = document.selection.createRange();
	var theText =theRange.text;
	if(theText.length >0){
		theText ="<" + argStr + ">" + theText +"</" + argStr + ">";
		theRange.text = theText;
		}
}

function Bold_onclick() {
setText("b");
}

function Italic_onclick() {
setText("i");
}

function Underline_onclick() {
setText("u");
}

//error message
function fixElement(element, message) {
alert(message);
//in IE you can make the incorrect field name hilighted
	if (navigator.appName == "Microsoft Internet Explorer"){
	element.select();
		}
	else{
		element.focus();
		}

}

//checks to see that the user has entered something into the search box
function searchBoxCheck(){
var input = document.searchBox.searchText.value;
if(input==""){
				alert("please enter your search criteria");
				
				document.searchBox.searchText.focus();
				return false;
				
				
				
			 }
			else return true;
}

function checkEmail(){
	var a = document.feedback
	var msg = "Please include an email address \nin the format similar to name@yourcompany.com."
	
	if (a.email.value.indexOf("@") == -1 ||	a.email.value.indexOf(".") == -1){
	//alert user
	alert(msg);
	//bring focus to the email box
	a.email.focus();				
	//cancel the page from submitting					}
	return false;
	}	
		
	//validation successful	
	return true;
			
}

