var theImages = new Array();
theImages[0] = '/images/HP_FG_taxFriendlyIRA.jpg';
theImages[1] = '/images/HP_FG_autoInvestALT.jpg';
theImages[2] = '/images/HP_FG_CollegeSvngs.jpg';
theImages[3] = '/images/HP_FG_secureTrnsactn.jpg';
theImages[4] = '/images/HP_FG_startInvest.jpg';
theImages[5] = '/images/PromoGraphic_moreInfo.jpg';


var theLinks = new Array();
theLinks[0] = '/InvestmentPlanning/IRAs_tradational_vs_roth.htm';
theLinks[1] = '/InvestmentPlanning/AutomatedAcctServices.htm';
theLinks[2] = '/InvestmentPlanning/SavingForEducation.htm';
theLinks[3] = '/AccountServices/SiteSecurity.htm';
theLinks[4] = '/InvestmentPlanning/InvestingAffordably.htm';
theLinks[5] = '/AccountServices/RequestInfo.htm';

var alt = new Array();
alt[0] = 'IRAs_tax-friendly_and_flexible';
alt[1] = 'Put_your_account_on_autopilot';
alt[2] = 'Get_a_head_start_on_college_savings';
alt[3] = 'Keeping_online_transactions_secure';
alt[4] = 'Start_investing_with_a_small_amount';
alt[5] = 'Request_a_Homestead_Funds_information_package';

var j = 0
var p = theImages.length;
var preBuffer = new Array();
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
var whichImage2 = Math.round(Math.random()*(p-1));
	if (whichImage==whichImage2)
		whichImage2 = (whichImage + 1)%p;
	
function showImage(){
document.write('<a href='+theLinks[whichImage]+'><img src='+theImages[whichImage]+' border=0 alt='+alt[whichImage]+'></a><a href='+theLinks[whichImage2]+'><img src='+theImages[whichImage2]+' border=0 alt='+alt[whichImage2]+'></a>');
}

function bcolor(bcol,d_name)
{
if (document.all)
{
 var thestyle= eval ('document.all.'+d_name+'.style');
 thestyle.backgroundColor=bcol;
 }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function PrintThisPage() 
    { 
       var sOption=""; 
       var sWinHTML = document.getElementById('contentstart').innerHTML; 
var sWinHTMLfooter = document.getElementById('footerstart').innerHTML; 
       var winprint=window.open("","",sOption); 
           winprint.document.open(); 
           winprint.document.write('<html><head><title></title><link rel="stylesheet" href="/stylesheets/HSF_styles.css"></head><body>'); 
winprint.document.write('<table align="center" width="600" border="0" cellpadding="0" cellspacing="0"><tr><td>');
           winprint.document.write('<span class="PrintPageNav"><p><img src="/images/icon_print.gif" border="0" align="absmiddle"> <a href="javascript:window.print()">Send to Printer</a>'); 
           winprint.document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'); 
           winprint.document.write('<a href="javascript:close()"><img src="/images/icon_closewindow.gif" border="0" align="absmiddle">Close this Window</a></p></span>'); 
winprint.document.write('<p><img src="/images/PrintPg_Header.jpg" alt="Homestead Funds" width="457" height="63" /></p>');
          winprint.document.write('<p><span class="Subhead1"></span></p>'); 
           winprint.document.write('<div class=bodytext>'); 
           winprint.document.write(sWinHTML);          
           winprint.document.write('</div>'); 
 winprint.document.write(sWinHTMLfooter);          
           winprint.document.write('</td></tr></table></body></html>'); 
           winprint.document.close(); 
           winprint.focus(); 
}


function toggle(list) { 
var listElementStyle=document.getElementById(list).style; 

    if (list == "monthlyTable") {
        document.getElementById('monthlyTable').style.display="block"; 
        document.getElementById('quarterlyTable').style.display="none"; 
	} 
    else if (list == "monthlyTable2") {
        document.getElementById('monthlyTable2').style.display="block"; 
        document.getElementById('quarterlyTable2').style.display="none"; 
	} 

else {
        document.getElementById('monthlyTable').style.display="none"; 
        document.getElementById('quarterlyTable').style.display="block"; 
        document.getElementById('monthlyTable2').style.display="none"; 
        document.getElementById('quarterlyTable2').style.display="block"; 
	}
}

function collapseAll() {
    document.getElementById('monthlyTable').style.display="none"; 
    document.getElementById('quarterlyTable').style.display="block"; 
    document.getElementById('monthlyTable2').style.display="none"; 
    document.getElementById('quarterlyTable2').style.display="block"; 

}