/*
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
*/

//if you are on homepage you need <script> var homepage = "yes";</script> to make codework properly

var imgdir;
var sitedir;
var securedir;
var homedir;

if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolutepage)
{
imgdir="http://www.southcoastalbank.com/images/"
sitedir="http://www.southcoastalbank.com/site/"
securedir="http://www.southcoastalbank.com/site/"
homedir="http://www.southcoastalbank.com/"
}
else if(window.signon)
{
imgdir="https://www.southcoastalbank.com/images/"
sitedir="https://www.southcoastalbank.com/site/"
securedir="https://www.southcoastalbank.com/site/"
homedir="https://www.southcoastalbank.com/"
}
else if(window.formpage)
{
imgdir="../images/"
sitedir="http://www.southcoastalbank.com/site/"
securedir="../site/"
homedir="http://www.southcoastalbank.com/"
}
else
{
imgdir="../images/";
sitedir="";
securedir="";
homedir="../";
}


// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW


browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (((browserName == "Netscape") && (browserVer >= 3)) || ((browserName =="Microsoft Internet Explorer") && (browserVer >= 4)))
{
version = "ok";
businessphoto_on = new Image(60,60);
businessphoto_on.src = imgdir + "nav-businessphoto-on.gif";

businessphoto_off = new Image(60,60);
businessphoto_off.src = imgdir + "nav-businessphoto-off.gif";

businessphotosplash_on = new Image(97,97);
businessphotosplash_on.src = imgdir + "nav-businessphotosplash-on.gif";

businessphotosplash_off = new Image(97,97);
businessphotosplash_off.src = imgdir + "nav-businessphotosplash-off.gif";

businesspointer_on = new Image(760,15);
businesspointer_on.src = imgdir + "nav-businesspointer-on.gif";

businesspointer_off = new Image(760,15);
businesspointer_off.src = "/images/clearpix.gif";

businesstext_on = new Image(97,38);
businesstext_on.src = imgdir + "nav-businesstext-on.gif";

businesstext_off = new Image(97,38);
businesstext_off.src = imgdir + "nav-businesstext-off.gif";

businesstextsplash_on = new Image(97,35);
businesstextsplash_on.src = imgdir + "nav-businesstextsplash-on.gif";

businesstextsplash_off = new Image(97,35);
businesstextsplash_off.src = imgdir + "nav-businesstextsplash-off.gif";

consumerphoto_on = new Image(60,60);
consumerphoto_on.src = imgdir + "nav-consumerphoto-on.gif";

consumerphoto_off = new Image(60,60);
consumerphoto_off.src = imgdir + "nav-consumerphoto-off.gif";

consumerphotosplash_on = new Image(97,97);
consumerphotosplash_on.src = imgdir + "nav-consumerphotosplash-on.gif";

consumerphotosplash_off = new Image(97,97);
consumerphotosplash_off.src = imgdir + "nav-consumerphotosplash-off.gif";

consumerpointer_on = new Image(760,15);
consumerpointer_on.src = imgdir + "nav-consumerpointer-on.gif";

consumerpointer_off = new Image(760,15);
consumerpointer_off.src = "/images/clearpix.gif";

consumertext_on = new Image(97,38);
consumertext_on.src = imgdir + "nav-consumertext-on.gif";

consumertext_off = new Image(97,38);
consumertext_off.src = imgdir + "nav-consumertext-off.gif";

consumertextsplash_on = new Image(97,35);
consumertextsplash_on.src = imgdir + "nav-consumertextsplash-on.gif";

consumertextsplash_off = new Image(97,35);
consumertextsplash_off.src = imgdir + "nav-consumertextsplash-off.gif";

supportphoto_on = new Image(60,60);
supportphoto_on.src = imgdir + "nav-supportphoto-on.gif";

supportphoto_off = new Image(60,60);
supportphoto_off.src = imgdir + "nav-supportphoto-off.gif";

supportphotosplash_on = new Image(97,97);
supportphotosplash_on.src = imgdir + "nav-supportphotosplash-on.gif";

supportphotosplash_off = new Image(97,97);
supportphotosplash_off.src = imgdir + "nav-supportphotosplash-off.gif";

supportpointer_on = new Image(760,15);
supportpointer_on.src = imgdir + "nav-supportpointer-on.gif";

supportpointer_off = new Image(760,15);
supportpointer_off.src = "/images/clearpix.gif";

supporttext_on = new Image(97,38);
supporttext_on.src = imgdir + "nav-supporttext-on.gif";

supporttext_off = new Image(97,38);
supporttext_off.src = imgdir + "nav-supporttext-off.gif";

supporttextsplash_on = new Image(97,35);
supporttextsplash_on.src = imgdir + "nav-supporttextsplash-on.gif";

supporttextsplash_off = new Image(97,35);
supporttextsplash_off.src = imgdir + "nav-supporttextsplash-off.gif";

calculatorsphoto_on = new Image(60,60);
calculatorsphoto_on.src = imgdir + "nav-calculatorsphoto-on.gif";

calculatorsphoto_off = new Image(60,60);
calculatorsphoto_off.src = imgdir + "nav-calculatorsphoto-off.gif";

calculatorsphotosplash_on = new Image(97,97);
calculatorsphotosplash_on.src = imgdir + "nav-calculatorsphotosplash-on.gif";

calculatorsphotosplash_off = new Image(97,97);
calculatorsphotosplash_off.src = imgdir + "nav-calculatorsphotosplash-off.gif";

calculatorspointer_on = new Image(760,15);
calculatorspointer_on.src = imgdir + "nav-calculatorspointer-on.gif";

calculatorspointer_off = new Image(760,15);
calculatorspointer_off.src = "/images/clearpix.gif";

calculatorstext_on = new Image(97,38);
calculatorstext_on.src = imgdir + "nav-calculatorstext-on.gif";

calculatorstext_off = new Image(97,38);
calculatorstext_off.src = imgdir + "nav-calculatorstext-off.gif";

calculatorstextsplash_on = new Image(97,35);
calculatorstextsplash_on.src = imgdir + "nav-calculatorstextsplash-on.gif";

calculatorstextsplash_off = new Image(97,35);
calculatorstextsplash_off.src = imgdir + "nav-calculatorstextsplash-off.gif";

pointer_on = new Image(760,15);
pointer_on.src = imgdir + "nav-pointer-on.gif";

pointer_off = new Image(760,15);
pointer_off.src = imgdir + "nav-pointer-off.gif";

olbdemo_on = new Image(43,12);
olbdemo_on.src = imgdir + "nav-olbdemo-on.gif";

olbdemo_off = new Image(43,12);
olbdemo_off.src = imgdir + "nav-olbdemo-off.gif";

olblogin_on = new Image(47,12);
olblogin_on.src = imgdir + "nav-olblogin-on.gif";

olblogin_off = new Image(47,12);
olblogin_off.src = imgdir + "nav-olblogin-off.gif";

olbmoreinfo_on = new Image(63,12);
olbmoreinfo_on.src = imgdir + "nav-olbmoreinfo-on.gif";

olbmoreinfo_off = new Image(63,12);
olbmoreinfo_off.src = imgdir + "nav-olbmoreinfo-off.gif";

loginpersonal_on = new Image(51,12);
loginpersonal_on.src = imgdir + "nav-loginpersonal-on.gif";

loginpersonal_off = new Image(51,12);
loginpersonal_off.src = imgdir + "nav-loginpersonal-off.gif";

loginbusiness_on = new Image(51,12);
loginbusiness_on.src = imgdir + "nav-loginbusiness-on.gif";

loginbusiness_off = new Image(51,12);
loginbusiness_off.src = imgdir + "nav-loginbusiness-off.gif";

depositpartner_on = new Image(81,12);
depositpartner_on.src = imgdir + "nav-depositpartner-on.gif";

depositpartner_off = new Image(81,12);
depositpartner_off.src = imgdir + "nav-depositpartner-off.gif";

}
else
version = "x";

document.write("<scr" + "ipt languate='JavaScript' src='"+ sitedir +"mailto_speedbump.js' type='text/javascript'><\/scr" + "ipt>");

function img_act(imgName)
{
if (version == "ok")
{
imgOn = eval(imgName + "_on.src");
document [imgName].src = imgOn;
}
}

function img_inact(imgName)
{
window.status = "";
 if (version == "ok")
{
imgOff = eval(imgName + "_off.src");
document [imgName].src = imgOff;
}
}

function home_rollovers_on(first , second , third)
{

document [first].src = imgdir + 'nav-' + first + '-on.gif';
document [second].src = imgdir + 'nav-' + second + '-on.gif';
document ["graypointer"].src = imgdir + 'nav-' + third + '-on.gif';

}

function home_rollovers_off(first , second)
{

document [first].src = imgdir + 'nav-' + first + '-off.gif';
document [second].src = imgdir + 'nav-' + second + '-off.gif';
document ["graypointer"].src = imgdir + 'nav-pointer-off.gif';

}

function back_rollovers_on(first , second)
{

document [first].src = imgdir + 'nav-' + first + '-on.gif';
document [second].src = imgdir + 'nav-' + second + '-on.gif';

}

function back_rollovers_off(first , second)
{

document [first].src = imgdir + 'nav-' + first + '-off.gif';
document [second].src = imgdir + 'nav-' + second + '-off.gif';

}


// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE

//style sheet writer
document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='"+securedir+"_style.js' TYPE='text/javascript'><\/SCR" + "IPT>");


function showCalc(calc)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 275)
var pHeight = (((parseInt(screen.height) / 2)) -240)
window.open(calc,"hello","width=550,height=480,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");

}


function open_apps(nameofapp)
{
 self.location.href = "https://www.southcoastalbank.com/Forms/OnlineForm.cgi?form="+nameofapp;
/*var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
aWindow = window.open('https://www.southcoastalbank.com/Forms/OnlineForm.cgi?form=' + nameofapp,'application',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=700,height=600,top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=1,status=1");*/
}


function openIB(demo){
	if(demo){
		self.location.href = "https://www.southcoastalbank.com/onlineserv/HB/demo.html";
		return true;
	}
	var pWidth = ( ((parseInt(screen.width) / 2)) - 175)
	var pHeight = (((parseInt(screen.height) / 2)) - 175)
	
		//bankingwin = window.open(sitedir+'blank.html','myname',"width=350,height=350,top=" + pHeight + ",left=" + pWidth);
		location.href="https://www.southcoastalbank.com/onlineserv/HB/Signon.cgi";	
}

function changetext(whichcontent){

    if (document.all)
    	{
        	descriptions.innerHTML=whichcontent;
    	}
    else if (document.layers)
    	{
        
        	document.d1.document.d2.document.write(whichcontent);
        	document.d1.document.d2.document.close();
    	}
    else
        {   
           //this is the Netscape 6 fix
            over = document.getElementById(["descriptions"]);
            
            range = document.createRange();
            range.setStartBefore(over);
            domfrag = range.createContextualFragment(whichcontent);
           
            while (over.hasChildNodes()) {
            over.removeChild(over.lastChild);
            }
            over.appendChild(domfrag);
         }
                       
}

//useage: <a href="javascript:show_warning('http://www.hotmail.com');">Test Link</a>
//needs images button_continue and button_cancel in the ../images folder (buttons are 109X28) 
function show_warning(URL)
{

	//page variables
	var page_bgcolor="#EFEFF7";
	var border_color="#5271AD";
	var table_bgcolor="#EFEFF7";
	var time_visible=30000; //automatically closes after this time

	//content creation
	var content=""
	content+='<html>';
	content+='<head>';
	content+='<title>3rd Party Disclaimer</title>';
	content+='</head>';
	content+='<body bgcolor="' + page_bgcolor + '" onload=javascript:setTimeout(\'self.close()\','  + time_visible + ')>';
	content+='<table bgcolor="' + border_color + '" align="center" width="360" cellspacing="2" cellpadding="0" border="0">';
	content+='	<tr>';
	content+='	    <td>';
	content+='		<table bgcolor="' + table_bgcolor +'" align="center" width="100%" cellspacing="1" cellpadding="6" border="0">';
	content+='			<tr>';
	content+='	    		<td><font face="Arial,Verdana,Helvetica" size="-1">';                           
	content+='<div align="center">Caution!</div>';
	content+='You are leaving South Coastal Bank\'s website.  Please note that by clicking on the link below, you will enter a privately owned website created, operated and maintained by a private business or organization.<br>South Coastal Bank takes no responsibility for any products or services offered by this site, nor do we endorse or sponsor the information it contains.  Deposit products that may be described in any other website are not covered by South Coastal Bank\'s FDIC or DIF insurance.  The privacy policy of South Coastal Bank does not apply to any other website you visit.  We recommend you review that website\'s privacy policy.<br>Internet sites change locations frequently.  South Coastal Bank is not responsible for the accessibility of this link.';
	content+='				<br><br>';
	content+='				<br><br>';
	//content+='				 <div align="center"><a href="'+URL+'" target="_blank" onClick="setTimeout(\'self.close()\',3000)"><img src="images/button_continue.gif" border="0" WIDTH="109" HEIGHT="28" alt="continue"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:self.close();"><img src="images/button_cancel.gif" border="0" WIDTH="109" HEIGHT="28" alt="cancel"></a></div>';
	content+='				 <div align="center"><a href="'+URL+'" target="_blank" onClick="setTimeout(\'self.close()\',3000)">OK</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:self.close();">CANCEL</a></div>';	
	content+='				</td>';
	content+='			</tr>';
	content+='		</table>';
	content+='		</td>';
	content+='	</tr>';
	content+='</table>';
	content+='</body>';
	content+='</html>';

	//actual centering popup code
	outsideURL=URL;
	var pWidth = ((parseInt(screen.width) - 400) / 2); 
	var pHeight = ((parseInt(screen.height) - 380) / 2);
     newwin = window.open("","newwin", "width=400,height=380,left="+pWidth+",top="+pHeight+", scrollbars=0");
 	newwin.document.open();
	newwin.document.write(content);
	newwin.document.close();
}









if(!window.homepage){
document.open('text/html',"replace");
document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='"+securedir+"_include.js' TYPE='text/javascript'><\/SCR" + "IPT>");
document.close();
}

