// CALL TO CORRECT DIRECTORY BELOW
var imgdir = "../images/";
var sitedir = "";
var securedir = "";
var homedir = "../";
if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolutepage)
{
imgdir="http://www.sbpconline.com/images/"
sitedir="http://www.sbpconline.com/site/"
securedir="http://www.sbpconline.com/site/"
homedir="http://www.sbpconline.com/"
}
else if(window.securepage)
{
imgdir="https://www.sbpconline.com/images/"
sitedir="http://www.sbpconline.com/site/"
securedir="https://www.sbpconline.com/site/"
homedir="http://www.sbpconline.com/"
}
// 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 navitems = new Array();
navitems["ib"] = new makeNavImage("ib",155,30);
navitems["products"] = new makeNavImage("products",155,30);
navitems["ms"] = new makeNavImage("ms",155,30);
navitems["calcs"] = new makeNavImage("calcs",155,30);
navitems["links"] = new makeNavImage("links",155,30);
navitems["contact"] = new makeNavImage("contact",155,30);
navitems["help"] = new makeNavImage("help",155,30);
navitems["home"] = new makeNavImage("home",155,30);
navitems["login"] = new makeNavImage("login",50,17);
navitems["demo"] = new makeNavImage("demo",50,17);
navitems["moreinfo"] = new makeNavImage("moreinfo",50,17);

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)?"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1":(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 open_apps(nameofapp){
self.location.href = "https://www.sbpconline.com/Forms/OnlineForm.cgi?onweb=true&form=" + nameofapp;
}

function openIB(page){
if (page=="demo") self.location.href = homedir+"index.html?demo";
else self.location.href = homedir+"index.html";
//if (page=="demo") openWin("https://www.sbpconline.com/onlineserv/HB/demo.html");
//else openWin("https://www.sbpconline.com/onlineserv/HB/")
}

function showWarning(url){
var content = new Array();
var index = 0;
content[index++] = "<h2>Third Party Site Disclaimer</h2>The page link and information is provided solely for your convenience.  We are NOT responsible for the accuracy and completeness of information, typographical errors or errors of omission.  We do not assume any liability as a result of the use of misuse of the information.  By your use of this information, you recognize and agree to hold us, our employees, agents, successors, and/or assignees harmless from any liability as a result of your using this information, materials, products or services listed at this web site.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href='javascript:window.location=\""+url+"\";'>Continue</a>&nbsp;&nbsp;&nbsp;<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 ibWarning(url){
var content = new Array();
var index = 0;
content[index++] = "<h2 align='center'>AUTHORIZATION NOTICE</h2>This is a private computer network and is for authorized users only.  Unauthorized users, please be warned: entering this password-protected area without authorization can incur both criminal and civil liabilities under the provisions of the Computer Fraud and Abuse Act of 1986.  Individuals using this network without authority are subject to having all of their activity monitored and recorded by both system and security personnel.  In the course of recording, and system maintenance, all activities of authorized users will also be monitored.  Anyone using this private network consents to such monitoring and is advised that if such monitoring reveals possible evidence of criminal or other illegal or improper activity, then system and security personnel may provide such evidence to the appropriate law enforcement officials for prosecution to the full extent of the law.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href='javascript:window.location=\""+url+"\";'>Accept</a>&nbsp;&nbsp;&nbsp;<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);
}



document.write('<div id="ex_dis" style="background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; text-align: left; position:absolute; top:125px; left:300px; border: medium solid #670001; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');
// OTHER FUNCTIONS ABOVE

function mail_warning(url){
    url = "mailto:"+url;
   //content creation
   var content = new Array();
          var index = 0;
   content[index++] = '<h3>E-mail Disclaimer</h3><br />WARNING: E-mail is an unsecure method of communication.  Any information contained in your message could be viewed by a third party.  Sensitive information such as passwords or social security numbers should be omitted from e-mail messages.';
   content[index++] = '<br /><br /><br />';
   content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="window.open(\''+url+'\');document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&nbsp;&nbsp;<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);
  }
