<!--
	/*
	 * Appends Page Name To Dynamic URL
	 */
	function buildUrl(page, isSecure) {
		var protocol = ((isSecure == true) ? "https" : "http") + "://";
		var devPortNumber = ((isSecure == true) ? "4431" : port);
		var portNumber = ((port != '') ? (":" + devPortNumber) : '');
		
		return (protocol + host + portNumber + page);
	}
	
	/*
	 * Appends Page Name To Dynamic URL (Assumes Same Protocol As Calling Function)
	 */
	function buildSameProtocolURL(page) {
		var portNumber = ((port != '') ? (":" + port) : '');
		
		return (protocol + "//" + host + portNumber + page);
	}
	
	/*
	 * Opens Documents Based On URL
	 */
	function openUrlBasedDocument(url) {
		window.location.href = url;
	}
	
	/*
	 * Opens the Sallie Mae Loan Cons Application
	 */
	function openSMLoanCons() {
		
  		var host = window.location.hostname
  		if (host != 'www.sssc.com')
  		{ 
    		actualurl = "https://testloancons.salliemae.com/lcw/aca.aspx?BRAND=SW_12";
  		}else{  
    		actualurl = "https://loanconsolidation.salliemae.com/lcw/aca.aspx?BRAND=SW_12";
  		}  		
		openUrlBasedDocument(actualurl);
	}
	
	/*
	 * Opens Windows Based On URL
	 */
	function openUrlBasedWindow(url) {
		openStandardWindow(url);
	}
	
	/*
	 * Opens Documents Based On Page Name (Implied "SSSC" URL)
	 */
	function openPageBasedDocument(page, isSecure) {
		window.location.href = buildUrl(page, isSecure);
	}
	
	/*
	 * Opens Windows Based On Page Name And Matching Protocol (Implied "SSSC" URL)
	 */
	function openPageBasedSameProtocolWindow(page) {
		openCustomWindow(buildSameProtocolURL(page), 'SSSC', 0.75, 0.75, false, false, false, false, false, true, true);
	}
	
	/*
	 * Opens Windows Based On Page Name (Implied "SSSC" URL)
	 */
	function openPageBasedWindow(page, isSecure) {
		openCustomWindow(buildUrl(page, isSecure), 'SSSC', 0.75, 0.75, false, false, false, false, false, true, true);
	}
	
	/*
	 * Opens Standardized Windows (Default Settings)
	 */
	function openStandardWindow(url) {
		openCustomWindow(url, 'SSSC', 0.75, 0.75, true, true, true, true, true, true, true);
	}
	
	/*
	 * Opens Centered, Customized Windows (Supports Percentages In Decimal-Format)
	 * 
	 * Note:	Centers New Child Windows In The Browser
	 * 		Supports Decimal-Formated Percentages (50% = 0.5)
	 */
	function openCustomWindow(url, name, width, height, isMenuBar, isToolBar, isLocationBar, isDirectories, isStatusBar, isScrollBars, isResizable) {
		height = ((height <= 1) ? Math.floor(screen.height * height) : height);
		width = ((width <= 1) ? Math.floor(screen.width * width) : width);
		
		var parameters = "top=" + Math.floor((screen.height - height) / 2) +
			",left=" + Math.floor((screen.width - width) / 2) +
			",height=" + height +
			",width=" + width +
			(isMenuBar == true ? ",menubar" : "") +
			(isToolBar == true ? ",toolbar" : "") +
			(isLocationBar == true ? ",location" : "") +
			(isDirectories == true ? ",directories" : "") +
			(isStatusBar == true ? ",status" : "") +
			(isScrollBars == true ? ",scrollbars" : "") +
			(isResizable == true ? ",resizable=1" : "");
								
		var win = window.open(url, name, parameters);
		
		if (parseInt(navigator.appVersion) >= 4)
			win.window.focus();
	}
	
	/*
	 * Closes Windows
	 */
	function closeWindow() {
		window.close();
	}
	
	/*
	 * Prints The Current Page
	 */
	function printPage() {
		self.print();
	}
	
	/*
	 * Opens A Printer-Friendly Version In A New Window
	 * New version allows for nesting of folders under pages & print
	 * For an example, see the press release section.
	 */
	function printVersion() {
		var path = pathname.replace("/pages/", "/print/");
		var isSecure = ((protocol == "https:") ? true : false);
		openPageBasedWindow(path, isSecure);
	}
	
	/*
	 * DEPRECATED Opens A Printer-Friendly Version In A New Window
	 */
	function printVersion_ORIGINAL() {
		var path = pathname.substring(0, pathname.lastIndexOf("/pages/"));
		var name = pathname.substring(pathname.lastIndexOf('/') + 1);
		var isSecure = ((protocol == "https:") ? true : false);
		
		openPageBasedWindow((path + "/print/" + name), isSecure);
	}
	
	/*
	 * Validates A Given Field Against A User-Specified Value
	 */
	function validateField(fieldValue, checkValue, errorMsg, isFocused) {
		if (fieldValue == checkValue) {
			alert(errorMsg);
			
			return false;
		}
		
		return true;
	}
	
	/*
	 * Submits A Form From A Hyperlink
	 */
	function submitFormHyperlink() {
		document.forms[0].submit();
	}
	
	/*
	 * Disables A "Link" When Explicitely Called Through An Event Handler
	 */
	function cancelLink() {
		return false;
	}
	
	/*
	 * Disables A "Specific Link" Within A Document
	 */
	function disableLink(link) {
		if (link.onclick)
			link.oldOnClick = link.onclick;
		
		link.onclick = cancelLink;
		
		if (link.style)
			link.style.cursor = 'default';
	}
	
	/*
	 * Disables "All Links" Within A Document
	 */
	function disableAllLinks(exceptionLinksArray) {
		for (i = 0; i < document.links.length; i++) {
			disableLink(document.links[i]);
			
			// Undo Exception Links
			for (var j = 0; j < exceptionLinksArray.length; j++) {
				if (document.links[i].href == exceptionLinksArray[j])
					enableLink(document.links[i]);
			}
		}
	}
	
	/*
	 * Enables A "Specific Link" Within A Document
	 */
	function enableLink(link) {
		link.onclick = (link.oldOnClick ? link.oldOnClick : null);
		
		if (link.style)
			link.style.cursor = (document.all ? 'hand' : 'pointer');
	}
	
	/*
	 * Enables "All Links" Within A Document
	 */
	function enableAllLinks() {
		for (i = 0; i < document.links.length; i++) {
			enableLink(document.links[i]);
		}
	}
	
	/*
	 * Enables/Disables A "Specific Link" Within A Document
	 */
	function toggleLink(link) {
		if (link.disabled) 
			enableLink(link);
		else 
			disableLink(link);
			
		link.disabled = !link.disabled;
	}
	
	

//-->