if (!window.imgdir)
{
    var imgdir="http://www.sdmfcu.org/images/"
    var sitedir="http://www.sdmfcu.org/site/"
    var securedir="http://www.sdmfcu.org/site/"
    var homedir="http://www.sdmfcu.org/"
}

if (window.location.href.indexOf("secureidentity")>0) {
    var imgdir="https://www.sdmfcu.org/images/"
    var sitedir="http://www.sdmfcu.org/site/"
    var securedir="http://www.sdmfcu.org/site/"
    var homedir="http://www.sdmfcu.org/"
}

function Include()
{
this.domain = "sdmfcu";
this.friendly = "San Diego Medical Federal Credit Union";
this.ib = "https://www.sdmfcu.org/onlineserv/HB";
this.ib_demo = "https://www.sdmfcu.org/onlineserv/HB/demo.html";
this.ib_open_window = true;
this.cm_open_window = true;
this.ib_register = "https://www.sdmfcu.org/onlineserv/HB/OnlineForm.cgi?form=enhancedNDB";
this.cm = "https://www.sdmfcu.org/onlineserv/CM/";
this.headergraphic = "";
this.contentgraphic = "";
this.photocontentgraphic = "";
this.pagetitle = "";

this.setHeaderGraphic = setHeaderGraphic;
this.setPhotoContentGraphic = setPhotoContentGraphic;
this.setPageTitle = setPageTitle;
this.makeHeader = makeHeader;
this.makeHeaderSpecial = makeHeaderSpecial;
this.makeRandomImages = makeRandomImages;
this.makeTopNav = makeTopNav;
this.makeMainNav = makeMainNav;
this.makeLogin = makeLogin;
this.makeFooter = makeFooter;
this.openIB = openIB;
this.openIBRegister = openIBRegister;
this.openCM = openCM;

}


//-------------------------------------------BEGIN HEADER FUNCTIONS---------------------------------
//-------------------------------------------BEGIN HEADER FUNCTIONS---------------------------------
//-------------------------------------------BEGIN HEADER FUNCTIONS---------------------------------


function makeHeader()
{
var content = new Array();
var index = 0;
content[index++] = '<a name="top"></a> ';
content[index++] = inc.makeTopNav();
content[index++] = '<table width="760" border="0" cellspacing="0" cellpadding="0">';
content[index++] = '  <tr valign="top"> ';
content[index++] = '    <td width="162">';
content[index++] = '<!-- LOGIN AREA -->';
content[index++] = inc.makeLogin();
content[index++] = '      <img src="' + imgdir + 'clearpix.gif" width="1" height="12"><!--<div style="display: block; height: 12px; width: 1;">--><!-- spacer --><!--</div>-->';
content[index++] = '<!-- START MAIN NAVIGATION -->';
content[index++] = inc.makeMainNav();
content[index++] = '    </td>';
content[index++] = '    <td width="598" align="center">' + inc.headergraphic + '';
content[index++] = '      <table width="598" border="0" cellspacing="0" cellpadding="0">';
content[index++] = '        <tr> ';
content[index++] = '          <td width="21"><img src="' + imgdir + 'clearpix.gif" width="21" height="1"></td>';
//content[index++] = '          <td width="547" valign="top" class="ficontent" style="padding-right: 23px;"> ';
content[index++] = '          <td width="547" valign="top" class="ficontent"> ';
content[index++] = '            ' + inc.photocontentgraphic + '<br />';
content[index++] = '            ' + inc.pagetitle + '';
return (content.join(""));
}


function makeHeaderSpecial()
{
var content = new Array();
var index = 0;
content[index++] = '<a name="top"></a> ';
content[index++] = inc.makeTopNav();
content[index++] = '<table width="760" border="0" cellspacing="0" cellpadding="0">';
content[index++] = '  <tr valign="top"> ';
content[index++] = '    <td width="162">';
content[index++] = '<!-- LOGIN AREA -->';
content[index++] = inc.makeLogin();
content[index++] = '      <img src="' + imgdir + 'clearpix.gif" width="1" height="12"><!--<div style="display: block; height: 12px; width: 1;">--><!-- spacer --><!--</div>-->';
content[index++] = '<!-- START MAIN NAVIGATION -->';
content[index++] = inc.makeMainNav();
content[index++] = '    </td>';
content[index++] = '    <td width="598" align="center">' + inc.headergraphic + '';
content[index++] = '      <table width="598" border="0" cellspacing="0" cellpadding="0">';
content[index++] = '        <tr> ';
//content[index++] = '          <td width="21"><img src="' + imgdir + 'clearpix.gif" width="21" height="1"></td>';
content[index++] = '          <td width="547" valign="top" class="ficontent"> ';
content[index++] = '          <td width="547" valign="top" class="ficontent"> ';
//content[index++] = '            ' + inc.photocontentgraphic + '<br />';
//content[index++] = '            ' + inc.pagetitle + '';
return (content.join(""));
}




function makeTopNav()
{
var content = new Array();
var index = 0;

//CODE GOES HERE
content[index++] = '<table width="760" border="0" cellspacing="0" cellpadding="0">';
content[index++] = '  <tr>';
content[index++] = '    <td width="275"><img src="' + imgdir + 'logo.gif" width="275" height="100" alt="SD Medical Federal Credit Union"></td>';
content[index++] = '    <td background="' + imgdir + 'hed-subnav-bg.jpg" width="216" align="center" valign="top" id="subnav"><img src="' + imgdir + 'clearpix.gif" width="1" height="3" alt="SD Medical Federal Credit Union"><br /><a href="' + homedir + 'home.html" class="subnav">Home</a> ';
content[index++] = '      &nbsp;<span class="subnav">|</span>&nbsp; <a href="' + sitedir + 'contact.html" class="subnav">Contact Us</a> &nbsp;<span class="subnav">|</span>&nbsp; <a href="' + sitedir + 'privacy.html" class="subnav">Privacy</a></td>';
content[index++] = inc.makeRandomImages();
content[index++] = '  </tr>';
content[index++] = '</table>';
content[index++] = '<div style="position:absolute;left:320px;top:30px;z-index:10000;"><a href="' + sitedir + 'switch.html"><img src="' + imgdir + 'openaccount.jpg" border="0"></a></div>';
return (content.join(""));
}

function makeMainNav()
{
var content = new Array();
var index = 0;

//CODE GOES HERE
content[index++] = '      <a href="' + sitedir + 'prodserv.html" onMouseOver="img_act(\'products\'); popUp(\'HM_Menu1\',event); window.status=\'Products and Services\'; return true" onMouseOut="img_inact(\'products\'); popDown(\'HM_Menu1\');"><img src="' + imgdir + 'nav-products-off.gif" width="162" height="24" name="products" border="0" alt="Products and Services"></a><br>';
content[index++] = '      <a href="' + sitedir + 'onlineserv.html" onMouseOver="img_act(\'onlineserv\'); popUp(\'HM_Menu2\',event); window.status=\'Online Services\'; return true" onMouseOut="img_inact(\'onlineserv\'); popDown(\'HM_Menu2\');"><img src="' + imgdir + 'nav-onlineserv-off.gif" width="162" height="24" name="onlineserv" border="0" alt="Online Services"></a><br>';
content[index++] = '      <a href="' + sitedir + 'ratesfees.html" onMouseOver="img_act(\'rates\'); popUp(\'HM_Menu3\',event); window.status=\'Rates and Fees\'; return true" onMouseOut="img_inact(\'rates\'); popDown(\'HM_Menu3\');"><img src="' + imgdir + 'nav-rates-off.gif" width="162" height="24" name="rates" border="0" alt="Rates and Fees"></a><br>';
content[index++] = '      <a href="' + sitedir + 'ocu.html" onMouseOver="img_act(\'ourcreditunion\'); popUp(\'HM_Menu4\',event); window.status=\'Our Credit Union\'; return true" onMouseOut="img_inact(\'ourcreditunion\'); popDown(\'HM_Menu4\');"><img src="' + imgdir + 'nav-ourcreditunion-off.gif" width="162" height="24" name="ourcreditunion" border="0" alt="Our Credit Union"></a><br>';
content[index++] = '      <a href="' + sitedir + 'locations.html" onMouseOver="img_act(\'locations\'); popUp(\'HM_Menu5\',event); window.status=\'Locations and Hours\'; return true" onMouseOut="img_inact(\'locations\'); popDown(\'HM_Menu5\');"><img src="' + imgdir + 'nav-locations-off.gif" width="162" height="24" name="locations" border="0" alt="Locations and Hours"></a><br>';
content[index++] = '      <a href="' + sitedir + 'contact.html" onMouseOver="img_act(\'contact\'); window.status=\'Contact Us\'; return true" onMouseOut="img_inact(\'contact\');"><img src="' + imgdir + 'nav-contact-off.gif" width="162" height="24" name="contact" border="0" alt="Contact Us"></a><br>';
content[index++] = '      <div align="center"><a href="' + sitedir + 'quickfind.html" onMouseOver="img_act(\'quickfind\'); popUp(\'HM_Menu6\',event); window.status=\'Quick Links\'; return true" onMouseOut="img_inact(\'quickfind\'); popDown(\'HM_Menu6\');"><img src="' + imgdir + 'nav-quickfind-off.gif" width="112" height="32" name="quickfind" border="0" alt="Quick Links"></a></div> ';
content[index++] = '      <br><div align="center"><a href="http://www.loans24.net/atl/clientSelect.do?clientID=7476" target="_blank"><img src="' + imgdir + 'promo-instantloan.gif" width="162" height="103" name="Instant Loan Information" border="0" alt="Quick Links"></a></div> ';
return (content.join(""));
}

function makeLogin()
{
var content = new Array();
var index = 0;

//CODE GOES HERE.
content[index++] = '    <a href="https://www.sdmfcu.org/onlineserv/HB" target="_blank"><img src="' + imgdir + 'login-text.gif" width="162" height="30" alt="I.C.U Internet Credit Union" border="0"></a><br>';
// <a href="javascript:window.open(\'https://www.sdmfcu.org/onlineserv/HB\');">
//content[index++] = '      <a href="javascript:void(0)" onclick="window.open(\'https://www.sdmfcu.org/onlineserv/HB\',\'newWin\',\'location=1,status=1,scrollbars=1,resizable=1,toolbar=1\');"><img src="' + imgdir + 'login-login.gif" width="43" height="29" border="0" alt="Login"></a><a href="https://www.sdmfcu.org/onlineserv/HB/demo.html" target="_blank"><img src="' + imgdir + 'login-demo.gif" width="49" height="29" border="0" alt="Demo"></a><a href="' + sitedir + 'onlineserv_icu.html"><img src="' + imgdir + 'login-moreinfo.gif" width="70" height="29" border="0" alt="More Info"></a><br>';
content[index++] = '      <a href="https://www.sdmfcu.org/onlineserv/HB" target="_blank"><img src="' + imgdir + 'login-login.gif" width="43" height="29" border="0" alt="Login"></a><a href="https://www.sdmfcu.org/onlineserv/HB/demo.html" target="_blank"><img src="' + imgdir + 'login-demo.gif" width="49" height="29" border="0" alt="Demo"></a><a href="' + sitedir + 'onlineserv_icu.html"><img src="' + imgdir + 'login-moreinfo.gif" width="70" height="29" border="0" alt="More Info"></a><br>';
return (content.join(""));
}

function setHeaderGraphic(graphic , alt_tag)
{
if (!alt_tag)
var alt_tag = "";

if (graphic == null)
    {
    this.headergraphic = "";
    }
else
    {
    this.headergraphic = '<img src="' + imgdir + 'hed-' + graphic + '.gif" width="598" height="59" alt="' + alt_tag + '">';
    }
}

function setPhotoContentGraphic(graphic , alt_tag)
{
if (!alt_tag)
var alt_tag = "";

if (graphic == null)
    {
    this.photocontentgraphic = "";
    }
else
    {
    this.photocontentgraphic = '<img src="' + imgdir + 'pic-' + graphic + '.jpg" width="225" height="150" align="right" alt="' + alt_tag + '">';
    }
}

function setPageTitle(title)
{
if (title == null)
    {
    this.pagetitle = "";
    }
else
    {
    this.pagetitle = '<span class="pageheader">' + title + '</span>';
    }
}

function makeRandomImages()
{
var content = new Array();
var index = 0;
content[index++] = '<td width="269"><img src="' + imgdir + 'hed-photo' + rand(7) + '.jpg" width="269" height="100"></td>';

return (content.join(""));
}

//---------------------------------------------END HEADER FUNCTIONS---------------------------------
//---------------------------------------------END HEADER FUNCTIONS---------------------------------
//---------------------------------------------END HEADER FUNCTIONS---------------------------------



//-------------------------------------------BEGIN FOOTER FUNCTIONS---------------------------------
//-------------------------------------------BEGIN FOOTER FUNCTIONS---------------------------------
//-------------------------------------------BEGIN FOOTER FUNCTIONS---------------------------------




function makeFooter()
{
var content = new Array();
var index = 0;

//CODE GOES HERE
content[index++] = '            </td>';
content[index++] = '          <td width="30"><img src="' + imgdir + 'clearpix.gif" width="30" height="1"></td>';
content[index++] = '        </tr>';
content[index++] = '      </table>';
content[index++] = '      <br>';
content[index++] = '      <br>';
content[index++] = '      <br>';
content[index++] = '      <div class="footer"><!--[if lt IE 7]><script type="text/javascript" src="https://www.sdmfcu.org/mstinc/web/js/png.js"></script><![endif]--><a href="javascript:showWarning(\'http://www.ncua.gov\');"><img src="https://www.sdmfcu.org/mstinc/web/images/ncua_140x109_blue.png" width="140" height="109" border="0" alt="NCUA" align="absmiddle" /></a><a href="javascript:showWarning(\'http://www.hud.gov\');"><img src="' + imgdir + 'ehl.gif" width="44" height="36" align="absmiddle" border="0" alt="Equal Housing Lender" hspace="8"></a><a href="javascript:showWarning(\'http://www.digitalinsight.com\');"><!--[if lt IE 7]><script type="text/javascript" src="https://www.sdmfcu.org/mstinc/web/js/png.js"></script><![endif]--><img src="https://www.sdmfcu.org/mstinc/web/images/di_91x22_2c.png" width="91" height="22" border="0" alt="" title="Digital Insight, an Intuit company" /></a> ';
content[index++] = '        <br /><div style="margin:0px; margin-top: 5px;"><a href="' + sitedir + 'privacy.html">Privacy</a> | <a href="https://www.sdmfcu.org/onlineserv/HB/security_site/index.html" target="_blank">Security</a> | <a href="' + sitedir + 'disclosures.html">Disclosures</a><br /><br />&copy; 2009 SD Medical Federal Credit Union<br /></div> ';
content[index++] = '      </div></td>';
content[index++] = '  </tr>';
content[index++] = '  <tr><td colspan="2"><br /><img src="' + imgdir + 'footer-address.gif" width="760" height="19" alt="8889 Rio San Diego Drive, Suite 100 - San Diego, CA 92108"></td></tr>';
content[index++] = '</table>';
return (content.join(""));
}

//---------------------------------------------END FOOTER FUNCTIONS---------------------------------
//---------------------------------------------END FOOTER FUNCTIONS---------------------------------
//---------------------------------------------END FOOTER FUNCTIONS---------------------------------

function openIB(which)
{
if (which == 'demo')
    {
    if (this.ib_open_window == true)
        {
        window.open(this.ib_demo);
        }
    else
        {
        location.href = this.ib_demo;
        }
    }
else if (which == 'topdemo')
    {
        top.location.href = this.ib_demo;
    }
else if (which == 'top')
    {
        top.location.href = this.ib;
    }
else
    {
    if (this.ib_open_window == true)
        {
        window.open(this.ib);
        }
    else
        {
        location.href = this.ib;
        }
    }
}

function openIBRegister()
{
    window.open(this.ib_register);
}

function openCM()
{
if (this.cm_open_window == true)
    {
    window.open(this.cm);
    }
else
    {
    location.href = this.cm;
    }
}

function make_NAMEHERE_dropdown()
{

var items = new Array();
var index = -1;
items[index++] = new Array('#' , 'Make a Selection &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' , 'same');
items[index++] = new Array('link1.html' , 'Personal Checking Accounts' , 'same');
items[index++] = new Array('checking_business.html' , 'Business Checking Accounts' , 'same');
items[index++] = new Array('checking_fastline.html' , 'Fastline' , 'same');
items[index++] = new Array('checking_local.html' , 'Local Connections' , 'same');

writeout_dropdown(items);
}

function writeout_dropdown(items)
{
var whole = '<form name="form1">';
whole += '<select name="dropdown_nav" onChange="javascript:changeLocations();" class="dropdown">';
for (i=0; i < items.length; i++)
    {
    if (items[i][2] == "new")
        {
        var target="?new";
        }
    else if (items[i][2] == "top")
        {
        var target="?top";
        }
    else
        {
        var target="";
        }
    whole += '<option value="' + items[i][0] + target + '">' + items[i][1] + '</option>';
    }
whole += '</select>';
document.write(whole);
}

function changeLocations()
{
var location = document.form1.dropdown_nav[document.form1.dropdown_nav.selectedIndex].value;

var first = location.indexOf("?");
if (first != -1)
    {
    var target = location.substring(first + 1 , location.length);
    location = location.substring(0 , first);
    }
else
    {
    var target = "";
    }

    //alert(target);
    //alert(location);

if (target == "new")
    {
    window.open(location);
    }
else if (target == "top")
    {
    top.location.href = location;
    }
else
    {
    window.location.href = location;
    }

}


function makeDateStamp()
{

var myDate = new Date();
var day = myDate.getDay();
var month = myDate.getMonth();
var date = myDate.getDate();
var year = "";

if (document.all)
    {
    year = myDate.getYear();
    }
else
    {
    year =myDate.getYear() + 1900;
    }

var months = new Array ("January", "February","March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

var days = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");


//alert (days[day] + ", " + months[month] + " " + date + ",  " + year);
var finalDate = (days[day] + ", " + months[month] + " " + date + ",  " + year);


var content = new Array();
var index = 0;
content[index++] = '<span class="date">' + finalDate + '</span>';

return (content.join(""));
}

function make_NAMEHERE_subnav(whichnumber , breaknumber)
{
var items = new Array();
var index = -1;

items[index++] = new Array('<a href="link1.html">' , 'LINK1' , '</a>');
items[index++] = new Array('<a href="link2.html">' , 'LINK2' , '</a>');
items[index++] = new Array('<a href="link3" target="_new">' , 'LINK3' , '</a>');
items[index++] = new Array('<a href="link4.html">' , 'LINK4' , '</a>');


writeitout(items , whichnumber , breaknumber);
}


function writeitout(items , whichnumber , breaknumber)
{
var whole = '<div align="center" class="subnav">';
var spacer = ""
for (i=0; i < items.length; i++)
    {
    if (i != whichnumber)
        {
        spacer = " | ";
        if (i == items.length - 1)
            spacer = "";
        else if (i == breaknumber)
            spacer = "<br>";
        whole += items[i][0] + items[i][1] + items[i][2] + spacer;
        }
    else
        {
        spacer = " | ";
        if (i == items.length - 1)
            spacer = "";
        else if (i == breaknumber)
            spacer = "<br>";
        whole += items[i][1] + spacer;
        }
    }
whole += '</div><br>';
document.write(whole);
}
