function confirmDelete(){
  if (confirm('Are you sure?') == false){
	return false;
  }
}

function displayNone(id){
	document.getElementById(id).style.display="none";
}
function displayBlock(id){
	document.getElementById(id).style.display="block";
}

function validEmail(email) {
	if ((email == "") || (email.indexOf ('@', 1) == -1) || (email.indexOf ('.', 3) == -1)){
		return false;  
	}
	else {
		return true;
	}
}   

function openWindow(newName, newURL, newWidth, newHeight, resize) {
	// Declare and initialize top and left variables
	var calcLeft = 100;
	var calcTop = 100;
        
	// Update properties if comp. browser
	if (parseInt(navigator.appVersion) >= 4) {
		calcTop = screen.availHeight /2 - newHeight / 2;
		calcLeft = screen.availWidth / 2 - newWidth / 2;
	}
 
	// Open the new window using top and left properties
	if (resize) {
		remoteWindow = window.open(newURL, newName, 'status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,width=' + newWidth + ',height=' + newHeight + ',left=' + calcLeft + ',top=' + calcTop + ',resizable=yes');
	} 
	else {
		remoteWindow = window.open(newURL, newName, 'status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,width=' + newWidth + ',height=' + newHeight + ',left=' + calcLeft + ',top=' + calcTop + ',resizable=no');
	}
	remoteWindow.focus();
}

/*
function holdTo(what,n,showMessage){
	if(!n) var n=2000;
	if(showMessage == ''){
	  showMessage=false;
	}  
	
	document.getElementById(what.name + 'Count').innerHTML=what.value.length;
	if (what.value.length >= n){
		if (showMessage == true) {
			//You have exceeded the maximum number of characters
			<cfmodule template="/Recovery/ESRF/customtags/GetPhrase.cfm" Phrase_ID="155" Output="vOutput">
			alert('<cfoutput>#vOutput#</cfoutput>');
			what.focus();
			setCursorToEnd(what);
		}
		return false;
	}
}

function setCursorToEnd(el) {
  if (el.createTextRange) {
    var v = el.value;
    var r = el.createTextRange();
    r.moveStart('character', v.length);
    r.select();
  }
}
*/
