//window.onresize=resize;
function resize(){self.location.href=self.location.href;}

//CALL TO CORRECT DIRECTORY BELOW - if you are on homepage you need <script> var homepage = "yes";</script> to make codework properly
var imgdir = "../images/";
var sitedir = "";
var securedir = "";
var homedir = "../";
if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolute)
{
imgdir="http://www.shellcuonline.org/images/"
sitedir="http://www.shellcuonline.org/site/"
securedir="http://www.shellcuonline.org/site/"
homedir="http://www.shellcuonline.org/"
}
else if(window.secure)
{
imgdir="https://www.shellcuonline.org/images/"
sitedir="http://www.shellcuonline.org/site/"
securedir="https://www.shellcuonline.org/site/"
homedir="http://www.shellcuonline.org/"
}
//CALL TO CORRECT DIRECTORY ABOVE

// ROLLOVER CODE BELOW
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 = imgdir + this.name_on;
this.newimage_off = new Image(width,height);
this.newimage_off.src = imgdir + this.name_off;
}

var nav_widths=150;
var nav_heights=20;

var navitems = new Array();
navitems["onlinebanking"] = new makeNavImage("onlinebanking",nav_widths,nav_heights);
navitems["products"] = new makeNavImage("products",nav_widths,35);
navitems["privacy"] = new makeNavImage("privacy",80,18);

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;
}
// ROLLOVER CODE ABOVE


// OTHER FUNCTIONS BELOW
function openWin(url,name,width,height,options){
var n = name;
var w = width;
var h = height;
var o = options;
n = (n==null)?"_blank":n;
w = (isNaN(w) || w==null)?700:w;
h = (isNaN(h) || h==null)?600:h;
o = (o==null)?o:(o.indexOf(",")!=0)?","+o:o;

var posX = Math.ceil((parseInt(screen.width) - w) / 2);
var posY = Math.ceil((parseInt(screen.height) - h) / 2);
aWindow = window.open(url,n,"width=" + w + ",height=" + h + ",left=" + posX + ",top=" + posY + o);
}

function showCalc(calc){
openWin(calc,"calc",550,480,"resizable=1,scrollbars=1");
}

function open_apps(nameofapp){
openWin("https://www.shellcuonline.org/Forms/OnlineForm.cgi?form=" + nameofapp,"application",700,600,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,status=1");
}
// OTHER FUNCTIONS ABOVE

  function showWarning(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<h1>Third Party Site Disclaimer</h1><p align="left">By accessing the noted link you will be leaving  Shell Community Federal Credit Union\'s website and entering a website hosted by another party. Shell Community Federal Credit Union has not approved this as a reliable partner site.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of Shell Community Federal Credit Union\'s website. We encourage you to read and evaluate the privacy and security policies of the site you are entering, which may be different than those of Shell Community Federal Credit Union\'s.</p>';
	content[index++] = '<br>';
	content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="window.open(\''+url+'\');document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Continue</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Decline</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0, 0);

}

// Blinking text

var b_timer = null; // blink timer
var b_on = true; // blink state
var blnkrs = null; // array of spans

function blink() {
	var tmp = document.getElementsByTagName("span");
	if (tmp) {
		blnkrs = new Array();
		var b_count = 0;
		for (var i = 0; i < tmp.length; ++i) {
			if (tmp[i].className == "blink") {
				blnkrs[b_count] = tmp[i];
				++b_count;
			}
		}
		// time in m.secs between blinks
		// 500 = 1/2 second
		blinkTimer(700);
	}
}

function blinkTimer(ival) {
	if (b_timer) {
		window.clearTimeout(b_timer);
		b_timer = null;
	}
	blinkIt();
	b_timer = window.setTimeout('blinkTimer(' + ival + ')', ival);
}

function blinkIt() {
	for (var i = 0; i < blnkrs.length; ++i) {
		if (b_on == true) {
			blnkrs[i].style.visibility = "hidden";
		}
		else {
			blnkrs[i].style.visibility = "visible";
		}
	}
	b_on =!b_on;
}

document.write('<div id="ex_dis" style="background-color: #ffffff; font-family: arial, verdana, sans-serif; font-size: 9pt; font-weight: normal; color: #000000; text-align: center; position:absolute; left:200px; top:50px; margin:5% 5% 5% 5%; border: thin solid #003A84; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=#A1BDE0,offX=7,offY=8,positive=true); "></div>');