// for Cool Menus
if(window.event + "" == "undefined") event = null;
function showMenu(){return false};
function mout(){return false};
function dummyObject() {this.mout=mout};
oM = new dummyObject();

//window.onerror = function(){ return true; }

function target_blank(url){
    tmp = window.open(url);
    tmp = null;
}

function makeNavImage(name,width,height){
this.name_on="nav-" + name +"-on.gif";
this.name_off="nav-" + name +"-off.gif";
this.width=width;
this.height=height;
this.newimage_on = new Image(width,height);
this.newimage_on.src = dir + '/images/' + this.name_on;
this.newimage_off = new Image(width,height);
this.newimage_off.src = dir + '/images/' + this.name_off;
}

function img_act(imgName){
document[imgName].src =  navitems[imgName].newimage_on.src;
}

function img_inact(imgName){
window.status = "";
document[imgName].src =  navitems[imgName].newimage_off.src;
}

document.write('<img src="'+dir+'/images/wcscreenrez.gif?width='+screen.width+'&height='+screen.height+'" width="1" height="1">'); 

function wcInternalPopup(url, height, width){
    var wide=width;
    var tall=height;
    var halfwide = (wide/2);
    var halftall = (tall/2);
    var pWidth = ( ((parseInt(screen.width) / 2)) - halfwide);
    var pHeight = (((parseInt(screen.height) / 2)) - halftall);
    var features = 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+wide+',height='+tall+',top='+pHeight+',left='+pWidth;
    window.open(url,'internalpopup',features);
} 

function wcPopup(url, height, width, disclaimer){
    var wide=width;
    var tall=height;
    var halfwide = (wide/2);
    var halftall = (tall/2);
    var pWidth = ( ((parseInt(screen.width) / 2)) - halfwide);
    var pHeight = (((parseInt(screen.height) / 2)) - halftall);
    var features = 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width='+wide+',height='+tall+',top='+pHeight+',left='+pWidth;
    window.open(url,'externalpopup',features);
}

function open_apps(nameofapp)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
aWindow = window.open(nameofapp,'application',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=900,height=600,top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=1,status=1");
}

function openPDF(page){
	bWindow = window.open(fiDocs+"/"+page);
	bWindow = null;
}

function openDisc(page)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 300)
var pHeight = (((parseInt(screen.height) / 2)) - 400)
bWindow = window.open(page,'discwin',"scrollbars=1,toolbar=0,location=0,directories=0,status=0,menubar=0,width=600,height=600,top=" + pHeight + ",left=" + pWidth);
	bWindow = null;
}

/************************************************************************************************************
* This function is used in the onclick of the a tag to display the external site warning. 
* @param msg - Integer specifying the which message to display.
* @param lk - The a link object
* Usage: <a href="http://wwww.mysite.com" onclick="return displayThirdPartyAlert(1,this);">My Site</a>
**************************************************************************************************************/
function displayThirdPartyAlert(msg,lk){
	var description = lk.innerHTML;
	if(description.indexOf('alt="') != -1){
		var x = description.indexOf('alt="')+5;
		var temp = description.substring(x);
		description = temp.substring(0,temp.indexOf("\""));
	}
	showWarning(lk.href, description, lk.target, msg)
	return false;
}

/************************************************************************************************************
* This function is used in the href of the a tag to display the external site warning. 
* @param lk - The url of the site to be opened
* @param desc - The description of the site to be opened, i.e. the name of the site.
* @param target - Allows for the window to opened in a new window
* @param msg - Integer specifying the which message to display.
* Usage: <a href="javascript:('http://wwww.mysite.com');">My Site</a>
**************************************************************************************************************/

function showWarning(lk, desc, target, msg){
	desc = (desc) ? desc : "Third Party Site";
	target = (target) ? target : "_self";
	msg = (msg) ? msg : 0;
	
	var messages = new Array(6);
	messages[0] = '<h2>Third Party Site Warning</h2>As part of our commitment to customer service, Security Savings Bank provides links from this web site to web sites operated by third parties solely for your convenience and information. Security Savings Bank does not recommend or endorse any products or services appearing on such sites; does not guarantee the products, services or information provided by such sites; and is not liable for any failure of products or services advertised on such sites. We are not responsible for nor can we control or manage the content, privacy or security practices of third parties. Security Savings Bank does not represent our customers or third parties should such parties enter into a transaction or agreement. We recommend that you review the products or services and the privacy and security policies of such third-party web sites, and questions as to the content, availability or maintenance of these web sites should be directed to such third parties.';
	messages[1] = '<h2>Third Party Site Warning</h2>As part of our commitment to customer service, Security Savings Bank provides links from this web site to web sites operated by third parties solely for your convenience and information. Security Savings Bank does not recommend or endorse any products or services appearing on such sites; does not guarantee the products, services or information provided by such sites; and is not liable for any failure of products or services advertised on such sites. We are not responsible for nor can we control or manage the content, privacy or security practices of third parties. Security Savings Bank does not represent our customers or third parties should such parties enter into a transaction or agreement. We recommend that you review the products or services and the privacy and security policies of such third-party web sites, and questions as to the content, availability or maintenance of these web sites should be directed to such third parties.';
	messages[2] = '<h2>Third Party Site Warning</h2>As part of our commitment to customer service, Security Savings Bank provides links from this web site to web sites operated by third parties solely for your convenience and information. Security Savings Bank does not recommend or endorse any products or services appearing on such sites; does not guarantee the products, services or information provided by such sites; and is not liable for any failure of products or services advertised on such sites. We are not responsible for nor can we control or manage the content, privacy or security practices of third parties. Security Savings Bank does not represent our customers or third parties should such parties enter into a transaction or agreement. We recommend that you review the products or services and the privacy and security policies of such third-party web sites, and questions as to the content, availability or maintenance of these web sites should be directed to such third parties.';	
	messages[3] = '<h2>Third Party Site Warning</h2>As part of our commitment to customer service, Security Savings Bank provides links from this web site to web sites operated by third parties solely for your convenience and information. Security Savings Bank does not recommend or endorse any products or services appearing on such sites; does not guarantee the products, services or information provided by such sites; and is not liable for any failure of products or services advertised on such sites. We are not responsible for nor can we control or manage the content, privacy or security practices of third parties. Security Savings Bank does not represent our customers or third parties should such parties enter into a transaction or agreement. We recommend that you review the products or services and the privacy and security policies of such third-party web sites, and questions as to the content, availability or maintenance of these web sites should be directed to such third parties.';
	messages[4] = '<h2>Third Party Site Warning</h2>As part of our commitment to customer service, Security Savings Bank provides links from this web site to web sites operated by third parties solely for your convenience and information. Security Savings Bank does not recommend or endorse any products or services appearing on such sites; does not guarantee the products, services or information provided by such sites; and is not liable for any failure of products or services advertised on such sites. We are not responsible for nor can we control or manage the content, privacy or security practices of third parties. Security Savings Bank does not represent our customers or third parties should such parties enter into a transaction or agreement. We recommend that you review the products or services and the privacy and security policies of such third-party web sites, and questions as to the content, availability or maintenance of these web sites should be directed to such third parties.';
	messages[5] = '<h2 align="center">Email Disclosure</h2>Email messages sent over the Internet are not secure. Please do not include any account or personal information such as social security numbers in the message.';

	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="'+lk+'" target="'+target+'" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&#160;&#160;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Decline</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0);
}

function getUrl(){
	var url = document.location.href;
	var urlstart = url.indexOf("newUrl=") + 7;
	var urlToReturn = url.substring(urlstart);
	return urlToReturn;
}

function goToOptin()
{
	var email = document.getElementById("emailAddress").value;
	var url= "http://www.securitysb.com/Forms/OnlineForm.cgi?form=wc_promo_optin_app&emailAddress=" + email;
	wcInternalPopup(url,400,600);
}
//end of file