﻿// JScript File
// popup.js

// *****************************************************************************************
// Function that are imbedded into FLASH intro pieces
// NOTE: The intent is to not embed details of the page being opened inside the Flash pieces
// 		 therefore, the details can be changed and controled with these methods.
function playFLASH_ourservices()
{
	return openFLASH('flash/bundled_services.html', 665, 585);
}
function playFLASH_etm()
{
	return openFLASH('flash/tuitionmgt.html', 665, 585);
}
function playFLASH_emp()
{
	return openFLASH('flash/enrollmgt.html', 665, 585);
}
function playFLASH_tops()
{
	return openFLASH('WebContentController?content_id=64', 680, 500);
}
function playFLASH_fgaa()
{
	return openFLASH('flash/grantaid.html', 665, 585);
}
function playFLASH_dmgt()
{
	return openFLASH('/flash/Donor_mgt.html', 665, 585);
}
// ******************************************************************************************


// openNewWindow
function openFLASH(page, width, height) {
	var flashWin=open('', 'FLASH', 'height=100,width=100,location=no,status=no,toolbar=no,resizable=no,scrollbars=no,dependent=yes'); 
	flashWin.resizeTo(width,height);
	flashWin.focus();
	window.open(page, target='FLASH');
}

function openBusinessCard(page)
{
	var businessCardWin=window.open(page, 'BusinessCardWindow', 'height=165,width=385,location=no,status=no,toolbar=no,resizable=no,scrollbars=no,dependent=yes');
	//businessCardWin.focus(); -- not needed!
	return false;
}

function openGrantandAidAssessment()
{	
	return openApplication("https://www.factstuitionaid.com/FACTS/gaapp","gaapp");	
}

function openGrantandAidAssessment_Administrators()
{	
	return openApplication("https://www.factstuitionaid.com/FACTS/gainst","gainst");	
}

function openMyFACTSAccount()
{	
	return openApplication("https://secure.factstuition.com/facts/myfacts","myfacts");	
}

function openInstaFACTS()
{	
	return openApplication("https://secure.factstuition.com/facts/ifins","ifins");
}

function openApplication (applURL, applName)
{	
	var winleft = 0;
	var wintop = 0;
	var wdwctl="toolbar=no,location=no,directories=no,status=yes,menubar=no,width=600,height=500,resizable=yes,scrollbars=yes,screenx=0,screeny=0,left=" + winleft + ",top=" + wintop;
	applWin=window.open(applURL,applName,wdwctl);
	applWin.focus();
	return false;
}

function openHelp(url, name, width, height)
{
	return popup(url, name, width, height, 'yes', 'yes');
}// end openHelp

//popup
function popup(url,title,width,height,isResizable,hasScrollbars,hasMenubar,hasToolbar,otherAttributes) 
{	
	//if vars aren't provided, use these defaults
	if (typeof title == "undefined" || title == null || title.length <= 0) 
	{
		title = 'popup';
	} 
	
	if (typeof width == "undefined" || width == null) 
	{
		width=600;
	} 
	
	if (typeof height == "undefined" || height == null) 
	{
		height=400;
	} 
	
	if (typeof isResizable == "undefined" || isResizable == null || isResizable.length <= 0) 
	{
		isResizable='yes';
	} 
	
	if (typeof hasScrollbars == "undefined" || hasScrollbars == null || hasScrollbars.length <= 0) 
	{
		hasScrollbars='yes';
	} 
	
	if (typeof hasMenubar == "undefined" || hasMenubar == null || hasMenubar.length <= 0) 
	{
		hasMenubar='no';
	} 
	
	if (typeof hasToolbar == "undefined" || hasToolbar == null || hasToolbar.length <= 0) 
	{
		hasToolbar='no';
	}
	
	if (typeof otherAttributes == "undefined" || otherAttributes == null || otherAttributes.length <= 0)
	{
		otherAttributes='';
	}
	else
	{
		otherAttributes=','+otherAttributes
	}
	
	vars = 'width='+width+',height='+height+',resizable='+isResizable+',scrollbars='+hasScrollbars+',menubar='+hasMenubar+',toolbar='+hasToolbar+otherAttributes;
	var newWin = window.open(url,title,vars);
	newWin.focus();
	return false;
}// end popup

