function cancelRefresh() {
var	i;
 //	keycode	for	F5 function	
if (window.event &&	window.event.keyCode ==	116) {
  window.event.keyCode = 8;
}
// keycode for backspace
if (window.event &&	window.event.keyCode ==	8) {
		if (
			window.event.srcElement.type == 'file' ||
			window.event.srcElement.type == 'text' ||
			window.event.srcElement.type == 'select-one' ||
			window.event.srcElement.type == 'password' ||
			window.event.srcElement.type == 'textarea'
			){
					window.event.cancelBubble =	false;
					window.event.returnValue = true;
					return true;
			}//Type
			else{
					window.event.cancelBubble =	true;
					window.event.returnValue = false;
					return false;
				}
	}
}
function disableControl(name)
{
	var myControl;
	myControl = document.getElementsByName(name).item(0);
	myControl.disabled = true;
}

function disableOnValidSubmit(name)
{
var myButton = document.getElementsByName(name).item(0);
if (Page_IsValid){
	myButton.disabled = true;
	
	ValidatorOnSubmit();
	}
else{
		myButton.disabled = false;
		}
}

function addStudentToProspect(studentname)
{
	var agree;
	agree = confirm(studentname + ' will be added to your Prospects.');
	if(agree)
		return true;
	else
		return false;
}

function MyPopUp(URL, h,w)
{
popWin=this.open(URL,'Image','height = ' + h + ', width = ' + w + ',toolbar=no,resizable=yes,menubar=no,location=no,scrollbars=yes,screenX=0,screenY=0');
if (popWin.opener == null) popWin.opener = self;
		popWin.focus();
}



function PicPopUp(sURL, h, w)
{ 
popWin=this.open(sURL,'Image','height = ' + h + ', width = ' + w + ',toolbar=no,resizable=no,menubar=no,location=no,scrollbars=no,screenX=0,screenY=0');
if (popWin.opener == null) popWin.opener = self;
      popWin.focus();
}

function ConfirmIgnore(name)
{
var cont;
var myControl = document.getElementsByName(name).item(0);
if (myControl.options[myControl.selectedIndex].text == 'Ignored')
	{
	cont = confirm('Are you sure you want to ignore this student?' + 
	' The student will be removed from the list for your school ' + 
	' and you will not get any messages from the student.');
	}
else
	{
	cont = true;
	}
	if (cont)
	{
		__doPostBack(name,'');
	}
	else
	{
	myControl.options[0].selected = true;
	
	for (i = 0; i < myControl.options.length -1; i++)
	{
		if(myControl.options[i].defaultSelected == true)
		{
			myControl.options[i].selected = true;
		
		}
	
	}
	
	}
	
}