 
function Includes(section,addpic){
	this.makeHeader = makeHeader;
	this.makeFooter = makeFooter;
	section ? this.section = section : this.section = "home";
	this.pic = "photo-" + Math.ceil((Math.random()* 8))+ ".jpg";
	addpic ? this.addpic = false : this.addpic = true;
}

function makeHeader(){
	var index = 0;
	var header=new Array();
	header[index++]='<div id="ex_dis" style="display:none; width:40%; padding:10px; background-color:#FFFFFF; position:absolute; z-index:10000; border:2px solid #EB4D0C; top: 100px; left: 30%; overflow: hidden; margin-top: 0; text-align: center;"></div>';
	header[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr valign="top">';
	header[index++]='<td width="657"><img src="'+imgdir+'logo.gif" width="501" height="84" alt="State Investors Bank" border="0" /><img src="'+imgdir+'login-image.gif" width="156" height="84" alt="" border="0" /></td>';
	header[index++]='<td width="103">';
	header[index++]='<table width="103" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr valign="top">';
	header[index++]='<td width="103"><img src="'+imgdir+'login-olb.gif" width="103" height="20" alt="Online Banking" border="0" /><br />';
	header[index++]='<a href="javascript:openIB();"><img src="'+imgdir+'login-button.gif" width="103" height="21" alt="Login" border="0" /></a><br />';
	header[index++]='<a href="javascript:openIB(\'demo\');"><img src="'+imgdir+'login-demo.gif" width="103" height="16" alt="Demo" border="0" /></a><br />';
	header[index++]='<a href="'+sitedir+'more.html"><img src="'+imgdir+'login-moreinfo.gif" width="103" height="27" alt="More Info" border="0" /></a><br /></td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='</td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr valign="top">';
	header[index++]='<td width="760"><img src="'+imgdir+'logo-bottom.gif" width="256" height="53" alt="State Investors Bank" border="0" /><img src="'+imgdir+'hed-'+this.section+'.gif" width="504" height="53" alt="Welcome to State Investors Bank Online" border="0" /><br /></td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0" background="'+imgdir+'header-datestamparea.gif">';
	header[index++]='<tr valign="top">';
	header[index++]='<td width="743" valign="middle" align="right" class="date">';
	header[index++]=day[total.getDay()] + ", " + month[total.getMonth()] + " " + total.getDate() + ", " + total.getYear();
	header[index++]='</td>';
	header[index++]='<td width="17"><img src="'+imgdir+'datestamparea-spacer.gif" width="17" height="30" alt="" border="0" /></td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="White">';
	header[index++]='<tr valign="top">';
	header[index++]='<td width="162" bgcolor="#F4E4AC">';
	header[index++]='<table width="162" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr valign="top">';
	header[index++]='<td width="162"><a href="'+homedir+'home.html" onmouseover="img_act(\'home\'); window.status=\'Home\'; return true" onmouseout="img_inact(\'home\');"><img src="'+imgdir+'nav-home-off.gif" width="162" height="25" alt="Home" border="0" name="home" /></a><br />';
	header[index++]='<a href="javascript:openIB();" onmouseover="img_act(\'olb\'); showMenu(\'menu1\'); window.status=\'Online Banking\'; return true" onmouseout="img_inact(\'olb\');"><img src="'+imgdir+'nav-olb-off.gif" width="162" height="25" alt="Online Banking" border="0" name="olb" /></a><br />';
	header[index++]='<a href="'+sitedir+'products.html" onmouseover="img_act(\'products\'); showMenu(\'menu2\'); window.status=\'Products\'; return true" onmouseout="img_inact(\'products\');"><img src="'+imgdir+'nav-products-off.gif" width="162" height="25" alt="Products" border="0" name="products" /></a><br />';
	header[index++]='<a href="'+sitedir+'other.html" onmouseover="img_act(\'otherservices\'); window.status=\'Other Services\'; return true" onmouseout="img_inact(\'otherservices\');"><img src="'+imgdir+'nav-otherservices-off.gif" width="162" height="25" alt="Other Services" border="0" name="otherservices" /></a><br />';
	header[index++]='<a href="'+sitedir+'bancorp.html" onmouseover="img_act(\'investorrelations\'); window.status=\'Investor Relations\'; return true" onmouseout="img_inact(\'investorrelations\');"><img src="'+imgdir+'nav-investorrelations-off.jpg" width="162" height="25" alt="Investor Relations" border="0" name="investorrelations" /></a><br />';
	header[index++]='<a href="'+sitedir+'rates.html" onmouseover="img_act(\'rates\'); showMenu( \'menu3\'); window.status=\'Rates\'; return true" onmouseout="img_inact(\'rates\');"><img src="'+imgdir+'nav-rates-off.gif" width="162" height="25" alt="Rates" border="0" name="rates" /></a><br />';
	header[index++]='<a href="'+sitedir+'about.html" onmouseover="img_act(\'aboutus\'); showMenu(\'menu4\'); window.status=\'About Us\'; return true" onmouseout="img_inact(\'aboutus\');"><img src="'+imgdir+'nav-aboutus-off.gif" width="162" height="25" alt="" border="0" name="aboutus" /></a><br />';
	header[index++]='<a href="'+sitedir+'help.html" onmouseover="img_act(\'help\'); showMenu(\'menu5\'); window.status=\'Help\'; return true" onmouseout="img_inact(\'help\');"><img src="'+imgdir+'nav-help-off.gif" width="162" height="25" alt="Help" border="0" name="help" /></a><br />';
	header[index++]='</td>';
	header[index++]='</tr>';  
	header[index++]='</table>';
	header[index++]='</td>';
	header[index++]='<td width="40"><img src="'+imgdir+'clearpix.gif" width="40" height="1" alt="" border="0" /></td>';
	header[index++]='<td width="558" class="ficontent">';
	if(this.section != "home" && this.addpic)header[index++]='<img src="'+imgdir+this.pic+'" width="254" height="171" alt="" border="0" align="right" /><br />';

	document.open("text/html","replace");
	document.writeln(header.join(""));
	document.close();
	return;
}


function makeFooter(){
	var index = 0;
	var footer=new Array();
	footer[index++]='</td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="#003879">';
	footer[index++]='<tr valign="top">';
	footer[index++]='<td width="760"><img src="'+imgdir+'footer-tan.gif" width="760" height="30" alt="" border="0" /><br />';
	footer[index++]='<a href="javascript:scrollTo(0,0);"><img src="'+imgdir+'footer-top.gif" width="50" height="51" alt="TOP" border="0" /></a><img src="'+imgdir+'footer-address.gif" width="710" height="51" alt="1041 Veterans Boulevard &#8211; Metairie, LA 70005 &#8211; 504.832.9400" border="0" /><br />';
	footer[index++]='<img src="'+imgdir+'clearpix.gif" width="255" height="50" alt="" border="0" /><a href="http://www.hud.gov" onclick="return displayThirdPartyAlert(1,this)"><img src="'+imgdir+'footer-ehl.gif" width="71" height="50" alt="Equal Housing Lender" border="0" /></a><a href="http://ifs.intuit.com" target="_blank" onclick="return displayThirdPartyAlert(1,this)"><img src="/mstinc/web/images/logo_140x34.png" width="140" height="34" border="0" alt="" style="margin-bottom: 15px" /></a><img src="'+imgdir+'clearpix.gif" width="30" height="50" alt="" border="0" /><a href="http://www.fdic.gov" onclick="return displayThirdPartyAlert(1,this)"><img src="'+imgdir+'footer-fdic.gif" width="57" height="50" alt="Member FDIC" border="0" /></a><img src="'+imgdir+'clearpix.gif" width="255" height="50" alt="" border="0" />';
	footer[index++]='<br /></td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';

	document.open("text/html","replace");
	document.writeln(footer.join(""));
	document.close();
	return;
}


/************************************************************************************************************
* 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:showWarning('http://wwww.mysite.com');">My Site</a>
**************************************************************************************************************/

function showWarning(lk, desc, target, msg){
	desc = (desc) ? desc : "Third Party Site";
	target = (target) ? target : "_blank";
	msg = (msg) ? msg : 0;
	
	var messages = new Array(7);
	// Standard 3rd Party Warning
	messages[0] = messages[1] = '<img src="' + imgdir + 'SIBbankLOGO.jpg" alt="State Investors Bank" title="" border="0" /><h2 style="text-align:center">Warning</h2><p>The link you have clicked is an external link</p><p>State Investors Bank is not responsible for any content on this site.</p>';
	// Standard Partner Warning
	messages[2] = '<h2 style="text-align:center">Partner Site Disclaimer</h2><p>By accessing the noted link you will be leaving our website and entering a partner site which is hosted by another party. Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of our website. We encourage you to read and evaluate the privacy and security policies of the site which you are entering, which may be different than those of ours.</p>';
	// Standard Affiliate Warning
	messages[3] = '<h2 style="text-align:center">Affiliate Site Disclaimer</h2><p>By accessing the noted link you will be leaving our website and entering an affiliate site located which is hosted by another party. Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of our website. We encourage you to read and evaluate the privacy and security policies of the site which you are entering, which may be different than those of ours.</p>';
	// Customize if requested
	messages[4] = messages[0];
	// Standard mailto: Insecure Warning
	messages[5] = '<h2 style="text-align:center">Email Disclaimer</h2><p>This is <strong>NOT</strong> a secured e-mail transmission. Please <strong>do not send personal/financial information</strong> via this method.</p>';
	
	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<divmargin-top:1em;text-align:center"><a href="'+lk+'"'+(target?' target="'+target+'"':'')+' onclick="$(\'#ex_dis\').hide()">Continue</a>&#160;&#160;<a href="#" onclick="$(\'#ex_dis\').hide();return false;">Decline</a></div>';	
	$("#ex_dis").html(content.join("")).show();
}


//end file

