function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}

    // JavaScript to interpolate random images into a page.
    var hdrQuoteQty = 6;     // Number of alternative images
    var hdrQuoteArray = new Array(hdrQuoteQty);  // Array to hold filenames
hdrQuoteArray[0] = "q1.gif";
hdrQuoteArray[1] = "q2.gif";
hdrQuoteArray[2] = "q3.gif";
hdrQuoteArray[3] = "q4.gif";
hdrQuoteArray[4] = "q5.gif";
hdrQuoteArray[5] = "q6.gif";

var choice = pickRandom(hdrQuoteQty);


    // JavaScript to interpolate random images into a page.
    var hdrImgQty = 3;     // Number of alternative images
    var hdrImgArray = new Array(hdrImgQty);  // Array to hold filenames
hdrImgArray[0] = "header1.gif";
hdrImgArray[1] = "header2.gif";
hdrImgArray[2] = "header4.gif";


var choice = pickRandom(hdrImgQty);
self.name = "main"; // names current window as "main"
var PicVar = 0;
var last = PicVar - 1;
var current = 0;
var photoArray = new Array()

photoArray[PicVar++] = new Fix("Retirement plans give employees peace of mind about their own financial future, including:<br>· 401(k) plans <br>· 412(i) plans <br>· Profit sharing plans <br>· Money purchase pension plans <br>· Defined benefit plans <br>· Defined contribution plans <br>· SEPPs and SIMPLE IRAs <br>· Cash balance plans <br>· Non-Qualified plans <p>The success of your business may very well rest on the unique skills and abilities of a core group of key employees who would be very difficult to replace. A well-planned employee benefit program can provide incentives that may help you retain and reward those employees.<p> Qualified Plans can provide tax efficient ways for your employees to save for retirement. Under certain circumstances, business owners can also receive substantial retirement benefits under these plans. Funding of qualified retirement plans is generally tax deductible and tax deferred for employees until the time benefits are actually received in retirement.")
photoArray[PicVar++] = new Fix("<p>Defined Benefit, Defined Contribution, SEPP, and SIMPLE IRA are some of the most common qualified plans. All of these plans can be funded with annuities. Some can use mutual funds or life insurance.<p>Non-qualified employee benefit plans offer you an additional means of providing retirement benefits over and above what is provided by the company's qualified benefit plans using after-tax dollars.<p>Selective plans are usually un-funded. However, the business can choose to set aside funds or purchase assets, such as life insurance, to informally fund the benefit. If no separate fund exists to support the benefit, it must come from the assets of the business.<p>Careful consideration must be given to fashioning a nonqualified employee benefit plan because there are tax considerations and other criteria to consider. <p>Determining which employee benefits to offer your employees can be a complicated process. Among other things, there are tax implications and cost structures to consider. Working with J. Mading Insurance & Financial Services, Inc. can offer you guidance and expertise as well as access to a top selection of high-quality, competitively priced benefit solutions.<br>")
photoArray[PicVar++] = new Fix("Personal Belongings<br>In addition to the amount of insurance on the home, 50% of that amount is provided for the contents in your home.  That means if the home is covered for $200,000, then you get an additional $100,000 in coverage for your personal property (certain specified items are covered up to a limit).  Personal belongings will be covered for certain perils specified in the policy such as fire, theft, vandalism, and sudden & accidental smoke damage.  The belongings will be covered anywhere in the world.<p>Valuables<br>For a reasonable cost, specific coverage on valuable items such as jewelry, watches, furs, or silverware can be added.  This will protect valuables against almost any loss while anywhere in the world.  Computer and software coverage is also available.Living Expenses<br>If a covered peril makes it impossible for to live in the home, necessary extra living expenses incured while staying in temporary living accommodations are covered.<p>Legal Liability<br>Even if an injured person sues frivolously, coverage for legal expenses up to the limits selected are included in the policy.  Coverage also applies if a person is accidentally injured, including the injured person’s medical expenses, or accidental damage their property.")





// Create new main array. 


function ShowphotoPic(newpic, firstPage, lastPage) {
  current = newpic;
  document.getElementById("Journal").innerHTML = photoArray[current].TxtVal;
  if(current==firstPage){
  document.getElementById("x1").innerHTML = '<img src="navigation/content/prev_page_off.gif" align="left" border="0">';
                }
  else if(current!=firstPage){
    document.getElementById("x1").innerHTML = '<a href="javascript:lastPhoto('+ firstPage +','+ lastPage + ');"><img src="navigation/content/prev_page_on.gif" align="left" border="0"></a>';
    }
 document.getElementById("x2").innerHTML = 'Page ' + (current+1) + ' of ' + (lastPage+1);
   if(current==lastPage){
  document.getElementById("x3").innerHTML = '<img src="navigation/content/next_page_off.gif" align="right" border="0">';
                }
  else if(current!=lastPage){
    document.getElementById("x3").innerHTML = '<a href="javascript:nextPhoto('+ firstPage +','+ lastPage + ');"><img src="navigation/content/next_page_on.gif" align="right" border="0"></a>';
    }                
  
}                  

function lastPhoto(firstPage, lastPage) {
  last = current;
  current--;
  if(current<0) current = PicVar - 1;
  ShowphotoPic(current, firstPage, lastPage);
}
function nextPhoto(firstPage, lastPage) {
	 last = current;
  current++;
  if (current>=PicVar) current = 0;
   ShowphotoPic(current, firstPage, lastPage);
}

// Object Fix 
function Fix(TxtVal) { 
   this.TxtVal = TxtVal 
} 

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 openWindow(url, type, windowName)
{
  var url = url
  var windowName = "windowName";
	var prop
  switch(type)
  {
    case "small":
      prop = "status,scrollbars,resizable";
      width=450;
      height=325;
      break;
    case "medium":
    case "":
      prop = "status,scrollbars,resizable";
      width=550;
      height=675;
      break;    
    case "large":
      prop = "status,scrollbars,resizable";
      width=750;
      height=475;
      break;
  }

  windowObject = window.open(url, windowName, prop);
  windowObject.focus();
}