function IsClientValidationEnabled()
{
	if (typeof(Page_ClientValidate) == 'function')
	{
		return true;
	}
	else
	{
		return false;
	}
}

function EnableValidator(validator, enable)
{
	if (IsClientValidationEnabled())
	{
		ValidatorEnable(validator, enable);
	}
}
function showhello(college)
{
   //alert(college);
   document.getElementById("txtCollege1").value = collegeName;
   
}

function ValidateValidator(validator)
{
	if (IsClientValidationEnabled())
	{
		ValidatorValidate(validator);
	}
}

function UpdateValidatorDisplay(validator)
{
	if (IsClientValidationEnabled())
	{
		ValidatorUpdateDisplay(validator);
	}
}

function GetControlById(controlId)
{
	var ctr = document.getElementById(controlId);
	
	if ((ctr == null) || (ctr == 'undefined'))
	{
		for(var i = 0; i < document.forms.length; i++)
		{
			ctr = document.forms[i].elements[controlId];
			
			if (ctr != null)
			{
				break;
			}
		}
	}
	
	return ctr;
}

function ChangeToUpperCase(control)
{
	control.value = Trim(control.value.toUpperCase());
}

function ChangeToLowerCase(control)
{
	control.value = Trim(control.value.toLowerCase());
}

function LTrim(text)
{
	while (text.substring(0, 1) == ' ')
	{
		text = text.substring(1, text.length);
	}
	
	return text;
}

function RTrim(text)
{
	while (text.substring(text.length-1, text.length) == ' ')
	{
		text = text.substring(0, text.length-1);
	}
	
	return text;
}

function Trim(text)
{
	return LTrim(RTrim(text));
}

function ReplaceCharacters(text, findChar, replaceChar)
{
	var replacedText = text.split(findChar);
	replacedText = replacedText.join(replaceChar);
	
	return replacedText;
}

function FormatDecimal(control)
{
	if (isNaN(control.value))
	{
		return;
	}
	else
	{
		var result = (Math.round((parseFloat(control.value) * 100))/100).toString();
		
		if (!isNaN(result))
		{
			var digitPosition = result.indexOf('.');
			
			if (digitPosition < 0)
			{
				result += '.00';
			}
			else
			{					
				if ((result.length - digitPosition) < 3)
				{
					result += '0';
				}
			}
			
			control.value = result;			
		}
	}
}

function FormatDecimal(value)
{
	if (isNaN(value))
	{
		value = 0;
	}
		
	var result = (Math.round((parseFloat(value) * 100))/100).toString();
	
	var digitPosition = result.indexOf('.');
	
	if (digitPosition < 0)
	{
		result += '.00';
	}
	else
	{					
		if ((result.length - digitPosition) < 3)
		{
			result += '0';
		}
	}
	
	return result;
}

function ShowHelp(folder, page, section, height, width)
{
    if(isNaN(height) || height <= 0 || height == "")
    {
		var Height = 300;
    }
    else
    {
		var Height = height + 20;
    }
    
    if(isNaN(width) || width <= 0 || width == "")
    {
		var Width = 300;
    }
    else
    {
		var Width = width + 20;
    }
   
    if(folder == 'forg')
    {
   
		HelpWindow = window.open("HelpMenu.aspx?folder=" + folder + "&page=" + page + "&section=" + section, "", "width = " + Width + ", height = " + Height + ", top=150, left=250, toolbar = no, location = no, directories= no , status= no , menubar = no, scrollbars = yes, resizable = yes");            
		//HelpWindow.moveTo(200, 100);
	}else  if(folder != '')
    {
		HelpWindow = window.open("../HelpPopup.aspx?folder=" + folder + "&page=" + page + "&section=" + section, "", "width = " + Width + ", height = " + Height + ", top=150, left=250, toolbar = no, location = no, directories= no , status= no , menubar = no, scrollbars = yes, resizable = yes");            
		//HelpWindow.moveTo(200, 100);
	}
	else
	{
		HelpWindow = window.open("HelpPopup.aspx?folder=" + folder + "&page=" + page + "&section=" + section, "", "width = " + Width + ", height = " + Height + ", top=150, left=250, toolbar = no, location = no, directories= no , status= no , menubar = no, scrollbars = yes, resizable = yes");
		//HelpWindow.moveTo(200, 100);
	}
}

var popUpWin = 0;

function ShowPopUpWindow(URLStr, width, height, scrollbar)
{	
	if(!isNaN(width))
    {
		var width = width + 20;
    }
    else
    {
		var width = 300;
    }
	
	if(!isNaN(height))
    {
		var height = height + 20;
    }
    else
    {
		var height = 300;
    }    
    
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=' + scrollbar + ', resizable=no, copyhistory=yes, width = ' + width + ', height = ' + height + ', left = ' + 300 + ', top = ' + 150 + ', screenX = ' + 300 + ', screenY = ' + 150 + '');  		
  	popUpWin.focus();
}

function ShowPopUpAgreementWindow(URLStr, width, height, scrollbar)
{	
	if(!isNaN(width))
    {
		var width = width + 20;
    }
    else
    {
		var width = 850;
    }
	
	if(!isNaN(height))
    {
		var height = height + 20;
    }
    else
    {
		var height = 500;
    }    
    
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=' + scrollbar + ', resizable=no, copyhistory=yes, width = ' + width + ', height = ' + height + ', left = ' + 300 + ', top = ' + 150 + ', screenX = ' + 300 + ', screenY = ' + 150 + '');  		
  	popUpWin.focus();
}
function OpenCollegeSearchWindowForApplicant()
{	
	var width = 450;
	var height = 600;
	var url = "../Scholar/CollegeSearchForScholar.aspx?r=" + Math.random();
	
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(url, 'popUpWin', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width = ' + width + ', height = ' + height + ', left = ' + 0 + ', top = ' + 0 + ', screenX = ' + 0 + ', screenY = ' + 0 + '');  		
  	popUpWin.focus();
}
function OpenCollegeSearchWindow()
{	
  
	var width = 600;
	var height = 600;
	var url = "CollegeSearchForTranscript.aspx?r=" + Math.random();
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(url, 'popUpWin', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width = ' + width + ', height = ' + height + ', left = ' + 0 + ', top = ' + 0 + ', screenX = ' + 0 + ', screenY = ' + 0 + '');  		
  	popUpWin.focus();
}
function ShowSchoolCodeSearchWindow(url)
{	
	var width = 600;
	var height = 600;
	
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(url, 'popUpWin', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width = ' + width + ', height = ' + height + ', left = ' + 0 + ', top = ' + 0 + ', screenX = ' + 0 + ', screenY = ' + 0 + '');  		
  	popUpWin.focus();
}
function OpenAutoFillHelpWindow()
{	
	var width = 450;
	var height = 305;
	var url = "AutoFillHelp.aspx?r=" + Math.random();
	
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(url, 'popUpWin', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width = ' + width + ', height = ' + height + ', left = ' + 300 + ', top = ' + 100 + ', screenX = ' + 300 + ', screenY = ' + 100 + '');  		
  	popUpWin.focus();
}
function OpenFAFSACollegeCodeSearchWindow(url)
{	
	var width = 600;
	var height = 600;
	
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(url, 'popUpWin', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width = ' + width + ', height = ' + height + ', left = ' + 0 + ', top = ' + 0 + ', screenX = ' + 0 + ', screenY = ' + 0 + '');  		
  	popUpWin.focus();
}
function OpenCommonApplicationForm()
{	
	var width = screen.width-12;
	var height = screen.height-91;	
	
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open("../scholar/PrintCommonApplicationForm.aspx", 'popUpWin', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width = ' + width + ', height = ' + height + ', left = ' + 0 + ', top = ' + 0 + ', screenX = ' + 0 + ', screenY = ' + 0 + '');  		
  	popUpWin.focus();
}
function SetDropDownListValue(control, value)
{
	totalOptions = control.options.length;
	for(i = 0; i < totalOptions; i++)
	{
		if(control.options[i].value == value)
		{
			control.options.selectedIndex = i;
			return;
		}
	}
}

var sc_project=1457625; 
var sc_invisible=1; 
var sc_partition=13; 
var sc_security="75e7ce44";


var favicon = {
change: function(iconURL) {
  if (arguments.length==2) {
	document.title = optionalDocTitle;
  }
  this.addLink(iconURL, "icon");
  this.addLink(iconURL, "shortcut icon");
},
addLink: function(iconURL, relValue) {
  var link = document.createElement("link");
  link.type = "image/x-icon";
  link.rel = relValue;
  link.href = iconURL;
  this.removeLinkIfExists(relValue);
  this.docHead.appendChild(link);
},
removeLinkIfExists: function(relValue) {
  var links = this.docHead.getElementsByTagName("link");
  for (var i=0; i<links .length; i++) {
	var link = links[i];
	if (link.type=="image/x-icon" && link.rel==relValue) {
	  this.docHead.removeChild(link);
	  return; // Assuming only one match at most.
	}
  }
},
docHead:document.getElementsByTagName("head")[0]
}