
var rightCaret = String.fromCharCode (62);

function openWin( windowURL, windowName, windowFeatures )
{return window.open( windowURL, windowName, windowFeatures );}
 
 function openLink( windowURL, windowName) {
	if (!windowName)
		windowName = "DECNet"; 
	newWindow = window.open( windowURL, windowName, 'width=295,height=300,toolbar=1,location=1,directories=0,status=1,menuBar=1,scrollBars=1,resizable=1' ); 
	newWindow.focus();
} 

function SubmitRec(frm){frm.submit();}

function displayChildren(sMenu){
   var d = document.getElementById(sMenu);
   if (d.className == "clsHiddenMenu")
      d.className = "clsVisibleMenu";
   else
      d.className = "clsHiddenMenu";
}
function LaunchImageManager(){
   window.showModalDialog("/admin/imageManager.asp", "select:no", "resizable:no; help:no; status:no; scroll:no; font-size:14px; dialogWidth:850px; dialogHeight:520px;");
}  
function LaunchResourceManager(){ 
   window.showModalDialog("/admin/resourceManager.asp", "select:no", "resizable:no; help:no; status:no; scroll:no; font-size:14px; dialogWidth:850px; dialogHeight:450px;");
}  
function pickImageFile(el){
   var sResult = window.showModalDialog("/admin/imageManager.asp", "value:" + el.value, "resizable:no; help:no; status:no; scroll:no; font-size:14px; dialogWidth:850px; dialogHeight:520px;");
   if (sResult != "cancel") el.value = sResult;
}   
function pickResourceFile(el){
   var sResult = window.showModalDialog("/admin/resourceManager.asp", "value:" + el.value, "resizable:no; help:no; status:no; scroll:no; font-size:14px; dialogWidth:850px; dialogHeight:520px;");
   if (sResult != "cancel") el.value = sResult;
}
function viewFile(el){
   if (el.value != "")
      window.open(el.value);
   else
      alert("Please select a file first.");
}
function clearSetting(el){
   el.value = "";
}


function checkLogin(){
	var userName = inputForm.userName.value;
	var passWord = inputForm.passWord.value;
	var bValid = true;
	if (userName.length ==0) bValid = false;
	if (passWord.length ==0) bValid = false;
	if (!bValid) {
		alert("You must enter a username and password to continue!");
		return(false);
	}
	else{
		return(true);
	}
}


function checkRegister(){
	var lastName = inputForm.lastName.value;
	var firstName = inputForm.firstName.value;
	var title = inputForm.title.value;
	var org = inputForm.org.value;
	var eMail = inputForm.eMail.value;
	var pass1 = inputForm.pass1.value;
	var pass2 = inputForm.pass2.value;
	var bValid = true;
	var msg = "";
	if (lastName.length ==0) {
		bValid = false;
		msg = msg+"\nYou must enter your last name.";
	}
	
	if (firstName.length ==0) {
		bValid = false;
		msg = msg+"\nYou must enter your first name.";
	}
	
	if (title.length ==0) {
		bValid = false;
		msg = msg+"\nYou must enter your title.";
	}
	
	if (org.length ==0) {
		bValid = false;
		msg = msg+"\nYou must enter your Organization.";
	}

	if (eMail.length ==0) {
		bValid = false;
		msg = msg+"\nYou must enter your email.";
	}

	if (pass1.length ==0) {
		bValid = false;
		msg = msg+"\nYou must enter your password.";
	}
	
	if (pass1!=pass2) {
		bValid = false;
		msg = msg+"\nYour passwords do not match.";
	}
	
	if (!bValid) {
		alert("The following errors occured:"+msg);
		return(false);
	}
	else{
		return(true);
	}
}

