<!--

function ScrollToBottom()
{
	var objDiv = document.getElementById("right_col");
	objDiv.scrollTop = objDiv.scrollHeight;
}
function tempChange(RandomPassword) {
   var form = document.forms["form1"];
   var holdAction = form.action;
   var holdMethod = form.method;
   var holdTarget = form.target;

   form.action = "http://www.schoolperceptions.com/spApp/surveyAdmin/DoAdminLogin?sc=" + RandomPassword;
   form.method = "post";
   form.target = "_blank";
   form.submit();

   form.action = holdAction;
   form.method = holdMethod;
   form.target = holdTarget;

}

function UploadGraphic(Enctype) {
   var form = document.forms["form1"];
   var holdMethod = form.method;
   var holdEnctype = form.enctype;

   form.enctype = Enctype;
   form.method = "post";
   form.submit();

   form.method = holdMethod;
   form.enctype = holdEnctype;
}

<!--
//--------------------------------
// This code compares two fields in a form and submit it
// if they're the same, or not if they're different.
//--------------------------------
function checkEmail(theForm) {
	if (theForm.Email.value != theForm.ConfirmEmail.value)
	{
		alert('The email address and confirm email don\'t match. Please enter the same email address');
		theForm.ConfirmEmail.value = "";
		return false;
	} else {
		return true;
	}
}
//-->

<!--
//--------------------------------
// This code compares two fields in a form and submit it
// if they're the same, or not if they're different.
//--------------------------------
function checkPassword(theForm) {
	if (theForm.NTPassword.value != theForm.NTConfirmPassword.value)
	{
		alert('The password and confirm password don\'t match. Please enter the same password in both fields');
		theForm.NTConfirmPassword.value = "";
		return false;
	} else {
		return true;
	}
}
//-->

function SubmitForm(form)
{
	form.submit();
}

function SubmitSaveChanges(form) // Added to menus and checkboxes as: onchange="SubmitSaveChanges(this.form)"
{
	form.SaveChanges.value = 1;
	form.submit();
}

function SubmitConfirmTest($Message)
{
	document.write("Hello World!!");
	var answer = confirm($Message)
	if (answer)
	{
		document.write("Hello World true");
		document.form1.SaveChanges.value = 1;
		document.form1.submit();
	}
	else 
	{
		document.write("Hello World false");
		document.form1.ConfirmResult.value = 0;
	}
}

function ConfirmSubmit($Message,$ItemId) {
	if (confirm($Message)) 
	{
		document.form1.ConfirmDeleteId.value = $ItemId;
		document.form1.submit();
	}
	else 
	{
		alert("Delete canceled...");
	}
}


function SubmitForm1()
{
		document.form1.submit(); 
}

function SetFocus() {
      var loginForm = document.getElementById("form1");
      if (loginForm) {
        loginForm["School"].focus();
      }
}

function removeMSWordChars(str) {
    var myReplacements = new Array();
    var myCode, intReplacement;
    myReplacements[8216] = 39;
    myReplacements[8217] = 39;
    myReplacements[8220] = 34;
    myReplacements[8221] = 34;
    myReplacements[8212] = 45;
    for(c=0; c<str.length; c++) {
        var myCode = str.charCodeAt(c);
        if(myReplacements[myCode] != undefined) {
            intReplacement = myReplacements[myCode];
            str = str.substr(0,c) + String.fromCharCode(intReplacement) + str.substr(c+1);
        }
    }
    return str;
}

//-->
