function getSSL(page) {
	return "https://" + window.location.hostname + page;
}

//BEGIN LINK DISCLOSURE ALERT
function siteDisclosure( linktype, ourSite, newSite, newSiteURL, newWindow ){
	switch ( linktype ) {
		// Linking to an FNNI family site
		case "website":
			confirmValue = confirm( "You are now leaving " + ourSite + "'s web site.  Any products and services accessed through this web site are not provided by " + ourSite + ".  " + newSite + " may have a privacy policy and security policy that are different than " + ourSite + ".  Please review " + newSite + "'s privacy and security policies." );
			break;
		case "affiliate":
			confirmValue = confirm( "You are now leaving " + ourSite + "'s web site.  Any products and services accessed through this web site are not provided by " + ourSite + ".  " + newSite + " may have a privacy policy and security policy that are different than " + ourSite + ".  Please review " + newSite + "'s privacy and security policies." );
			break;
		case "bankcard":		
			confirmValue = confirm( "You are now leaving " + ourSite + "'s web site.  Any products and services accessed through this web site are not provided by " + ourSite + ".  " + newSite + " may have a privacy policy and security policy that are different than " + ourSite + ".  Please review " + newSite + "'s privacy and security policies." );
			break;
		// e.g., Microsoft, Adobe, Netscape
		case "nonaffiliate":
			confirmValue = confirm( "You are now leaving " + ourSite + "'s web site.  Any products and services accessed through this web site are not provided by " + ourSite + ".  " + newSite + " may have a privacy policy and security policy that are different than " + ourSite + ".  Please review " + newSite + "'s privacy and security policies." );
			break;
		// e.g., Visa
		case "strategicaffiliate":
			confirmValue = confirm( "You are now leaving " + ourSite + "'s web site.  Any products and services accessed through this web site are not provided by " + ourSite + ".  " + newSite + " may have a privacy policy and security policy that are different than " + ourSite + ".  Please review " + newSite + "'s privacy and security policies." );
			break;
	}//end switch
	
	if ( confirmValue ) {
		if (newWindow != "yes") {
			document.location=newSiteURL;
		}//end nested if
		else {
			window.open(newSiteURL);
		}//end else
	}//end if

}//end siteDisclosure

function spawnNewWindowOneOfaCard()
{
	open ("http://www.oneofacard.com/generalinfo.asp","", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=720,height=520");
}
function spawnSecondOneOfaCard()
{
	open ("http://www.oneofacard.com/generalinfo2.asp","", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=720,height=520");
}
function spawnNewWindowCheck21()
{
	open ("/iws_help/substitutecheck_disclosure.htm","", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=420,height=500");
}
function spawnNewCCWindow(bank, jumpto, applynow, customCard, plasticCode)
{
	open ("/welcome/DynamicApp?bank=" + bank + "&jumpto=" + jumpto + "&applynow_=" + applynow + "&Custom_Card=" + customCard + "&Plastic_Indicator=" + plasticCode,"", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=600,height=450");
}
function popWin(url,width,height) {
	open (url,"", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=" + width + ",height=" + height);
}
function spawnTerm(product, siteID){
	var location = "https://" + window.location.hostname + "/welcome/DynamicApp?jumpto=" + product + "&goterms=Y&bank=" + siteID;
	open (location, "", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=800,height=600");
}
function formHandler(form) {
var windowprops = "height=500,width=500,location=no,"
+ "scrollbars=no,menubars=no,toolbars=no,resizable=yes";

var URL = form.site.options[form.site.selectedIndex].value;
	if (URL != 0){
	popup = window.open(URL,"MenuPopup",windowprops);
	}
}

var whereat = location.hostname
function doit(){
	window.open('https://' + whereat + '/welcome/DynamicApp?bank=genericagents&agent=386&sub=000','application','width=640,height=500,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes');
}

function spawnNewWindowCU()
{
	open ("/mark/misc/contactus.html","", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=600,height=500");
}

function spawnNewWindowC()
{
	open ("/mark/misc/comments.html","", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=600,height=500");
}

function spawnNewWindowATM()
{
	open ("/welcome/jsp/banking/customerservice/deposits/locator/location.jsp?siteid=22","", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=600,height=500");
}

function spawnNewWindowHelp()
{
	open ("/054/html/en/personal/faqs/index.html","", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=600,height=500");
}

function footerSecurity(){
	open ("http://www.sibleystatebank.com/jcommon/policydocs/security.html", "SecurityStatment", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=575,height=600");
}

function footerPrivacy(){
	open ("http://www.sibleystatebank.com/jcommon/policydocs/privacypolicy.html", "PrivacyPolicy", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=575,height=600");
}

function footerOnlineAgreement(){
	open ("http://www.sibleystatebank.com/jcommon/policydocs/onlineagree.html", "OnlineAgreement", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=575,height=600");
}

function launchBillpayHelp(){
	open ("http://www.sibleystatebank.com/common/help/common/faqs/billpay.asp", "Billpay", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=450,height=350");
}

function FooterDate()
{
	var ftrDate=new Date();
	var ftrYear=ftrDate.getYear();
	if (ftrYear < 1000) {
	ftrYear = ftrYear + 1900;
}
	document.write(ftrYear);
}


function init()
      {
        // Microsoft Internet Explorer
        if (document.all)
        {
          document.all.loading.visibility="hidden";
          document.all.myapplet.visibility="visible";
          document.applets[0].repaint();
        }
        // Netscape Navigator
        else
        {
          document.loading.visibility="hide";
          document.myapplet.visibility="visible";
        }
      }
