//Functions that can be called from any page on the site
//Rev. 3/5/08


//create automatically updated copyright text
   COPYRIGHT = "&copy; ECi Software Solutions, 1999&ndash;";

   function writeCopyright()
   {
      document.write(COPYRIGHT, new Date().getFullYear(), ". All rights reserved.");
   }

//Cloak email addresses to hide them from spam bots
	function cloaker(mailserver,mailname) {
		document.write("<a href='mailto:" + mailname + "@" + mailserver + "'>");
		document.write(mailname + "@" + mailserver);
		document.write("</a>");
	}
	

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function popUp(strURL,strType,strHeight,strWidth) {
var strOptions="";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
window.open(strURL, 'newWin', strOptions);
}



//image randomizer supplies header images for all pages except home page
//this script and addLoadListener from "The JavaScript Anthology"
//list all header images and corresponding alt text in the var headerimg block

//addLoadListener(function()
//{
//  var headerimg = [  
//      ['/images/layout/banners/NavHeader1', 'ECi Software Solutions-business software'],
//      ['/images/layout/banners/NavHeader2', 'ECi Software Solutions-business software'],
//	  ['/images/layout/banners/NavHeader3', 'ECi Software Solutions-business software'],
//	  ['/images/layout/banners/NavHeader4', 'ECi Software Solutions-business software']
//  ];

//  var n = Math.floor(Math.random() * headerimg.length);

//  var img = document.getElementById('imgforheader');

//  img.src = headerimg[n][0] + '.jpg';
//  img.alt = headerimg[n][1];
//});

//function that lets us include as many event listeners as needed; used in randomizer
//function addLoadListener(fn)
//{
//  if (typeof window.addEventListener != 'undefined')
//  {
//    window.addEventListener('load', fn, false);
//  }
//  else if (typeof document.addEventListener != 'undefined')
//  {
//    document.addEventListener('load', fn, false);
//  }
//  else if (typeof window.attachEvent != 'undefined')
//  {
//    window.attachEvent('onload', fn);
//  }
//  else
//  {
//    var oldfn = window.onload;
//    if (typeof window.onload != 'function')
//    {
//      window.onload = fn;
//    }
//    else
//    {
//      window.onload = function()
//      {
//        oldfn();
//        fn();
//      };
//    }
//  }
//}
