//Function: LoadMessageBanner
//Purpose: Loads a random string that can be HTML formatted into a table Cell with the ID MessageBannerCell.
//Usage: Define the table cell like this <td align="center" id="MessageBannerCell">
//		And call the function when the page loads by adding the OnLoad event to the body tag like this
//		<body onload="LoadMessageBanner();">
//Define the array of messages here. Make sure any text you include fits in a single line and single quotes are escaped by \'
ArrayMessages = new Array(
        'ActiveWords enables you to work faster and more efficiently by turning	everything you type in Windows&trade; into actions! Teach ActiveWords to assist you in completing all of your most common tasks in record time.',
	'"I\'ve been using ActiveWords now for over six months, and it has truly changed my life. You have to try it! It\'s free for 60 days and the tech support is incredible." <A href="http://radio.weblogs.com/0104634/stories/2002/03/07/activewords.html" target=_blank>Ernie the Attorney</A>',
	'"Experts won\'t want to work without it, and novices will become attached immediately. You type, it works..."<A href="http://channels.lockergnome.com/windows/backissues/19991022.phtml" target=_blank>Chris Pirillo- LockerGnome GnomeREPORT</A>',
	'<font size="1">"I can\'t imagine not having ActiveWords on my computer. Going back to the \'old way\' would be like asking me to go back to using a typewriter. The time savings of this software pays for itself over and over again." <a href="http://www.clutterdiet.com/">Lorie Marrero - Clutter Diet, Inc.</a></font>',
	'<font size="1">I had recently thought that we couldn\'t duplicate the productivity gains of the last decade, but I believe ActiveWords could fuel another quantum leap in productivity and would enable more timely responses so that we get credit for being customer friendly and giving good service." - <a href="reviews.html">US Federal Government Employee</a></font>',
	'<font size="1">"This simple application is a little hard to describe and at first glance its value is not clear. But let me tell you, it has rocked my world and I highly recommend that you download the free trial version of ActiveWords." - <a href="http://blogs.officezealot.com/chris/">Chris Kunicki</a>, <a href="http://www.officezealot.com/">The Office Zealot</a></font>',
	'"You guys give absolutely the best customer support in the business. Bar none!" - <a href="reviews.html">Steven Schwaber, Customer.</a>',
	'"ActiveWords is indispensable"<br><a href="reviews.html">F. Carney - Salt Lake City Utah</a>',
	'<font size="1">"ActiveWords will change your life forever. It will allow you to use \'your\' language to communicate with your computer...  It allows you to use \'your\' language to describe what you want. It allows your computer to speak \'your\' language. Try it." <a href="reviews.html">Melinda Seitz - Recruiter</a></font>',
	'"ActiveWords... fills gaps in the Windows operating system, facilitating quick, efficient computing for lawyers and staff." <b>A Shortcut That Goes a Long Way</b> - <a href="reviews.html">American Bar Association Journal</a>',
	'<font size="1">"Once you get in the habit of using ActiveWords shortcuts, you\'ll be hooked, and the cost of the program will be more than made up in the time and keystrokes it will save you and your end users."<br><a href="reviews.html">Jeff Davis, TechRepublic</a></font>',
	'<font size="1">"It has been a delight using your software! I don\'t exaggerate when I say that there are times when I pull up a program or a pre-addressed e-mail just for the kick of it! I also love pulling up contacts simply by typing in their first name and hitting the ActiveWords key..." - <a href="reviews.html">Henry Nguyen, USA</a></font>',
	'<font size="1">"...I think your application is a wonderful productivity tool and the best so far I have tried. I especially enjoy the feature that prompts me to add an active word whenever I launch an application or folder a couple of times. Really nice and impressive job." <a href="reviews.html">Thierry Lalinne, Belgium</a></font>',
	'"It allows me to automate lengthy repetitive tasks that I would otherwise have to spend 30-45 minutes a day on." <a href="reviews.html">Charles L. Grett</a> Ernst & Young LLP',
	'"Originally I was looking for a program for voice control of the computer but now that I have found ActiveWords I think it is far superior to any of the other control programs I have tried, voice or otherwise."<br><a href="reviews.html">Hal Marston</a>',
	'<font size="1">"What a fabulous program. I am navigating the web, opening files and doing all kinds of tasks and amazed at how quickly I can do them.  Not only that, it\’s a fun program. Just typing in one word gets me where I want to go on the net or a particular file or to execute a particular action. It makes sense, is extremely user-friendly, and a program you just can\’t do without."- Customer</font>',
	'<font size="1">"ActiveWords allows the user to create a highly customized, yet versatile system without any programming knowledge or technical prowess. It it allows simplifying repeated tasks while allowing freedom to adapt to unique circumstances. It reminds one of what computing is really supposed to be about." - <b>Jeff Greenwald, </b><a href="http://www.gnslots.com/index.html">GNS Law Office Technology Solutions</a></font>',
	'<font size="1">"This is an impressive software program. In 22 years I\'ve evaluated over 204,000 programs and this would be in my top ten! Whether you\'re a home user, a small business, or a giant enterprise, you need to use ActiveWords. It has my highest recommendation! - <a href="http://www.drff.net" target="_blank">Michael E. Callahan aka Dr. File Finder</a> - <a href="http://www.drff.net/reviews/drff04-21.html" target="_blank">Read the review</a></font>',
	'<font size="1">"You are absolutely amazing – the speed of your support replies is unmatched by anyone. I am grateful because trying to work with any computer without ActiveWords after having used it for awhile is like picking up your old trombone you haven\’t used for 20 years." <b>- John McConchie, customer</b>.</font>'
);
function LoadMessageBanner()
{
	var MsgBannerCell = document.getElementById('MessageBannerCell');
	if (MsgBannerCell)
	{
		MsgBannerCell.innerHTML = ArrayMessages[Math.floor((Math.random()*100)%ArrayMessages.length)];
		//MsgBannerCell.innerHTML = '' + Math.floor((Math.random()*100)%ArrayMessages.length);
	}
}

//Function: AWGoTo
//Purpose: Navigate to strURL.
//Usage: <TD OnClick="return AWGoTo('about.html');" style='cursor: pointer'>Some text</TD>
function AWGoTo(strURL)
{
	document.location.href = strURL;
	return false;
}

//Global variable for Window handle.
var win=null;
//Function: NewWindow
//Purpose: Open a pop-up window with specified "name" (to be reused if already open), width (w), height (h) and whether or not it has scrollbars (possible values are yes, no or auto)
//Remarks: This function will open a new window centered on the screen with no Toolbar, location (address) bar, status bar, menubar and will not be resizeable.
//Usage examples: <TD OnClick="NewWindow('http://groups.yahoo.com/group/ActiveWords/','AWYahooGroups','720','560','auto');" style='cursor: pointer'>Some text</TD>
//	<A href="javascript:void(NewWindow('http://groups.yahoo.com/group/ActiveWords/','AWYahooGroups','720','560','auto'))">The link text</A>
function NewWindow(mypage,myname,w,h,scroll)
{
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no'
	win=window.open(mypage,myname,settings)
	if(parseInt(navigator.appVersion) >= 4)
	{
		win.window.focus();
	}
}

//Function: NewWindow2
//Purpose: Open a pop-up window with specified "name" (to be reused if already open), width (w), height (h) and whether or not it has scrollbars (possible values are yes, no or auto)
//Remarks: This function will open a new window centered on the screen with Toolbar, location (address) bar, status bar, menubar and will be resizeable.
//Usage examples: <TD OnClick="NewWindow('http://groups.yahoo.com/group/ActiveWords/','AWYahooGroups','720','560','auto');" style='cursor: pointer'>Some text</TD>
//	<A href="javascript:void(NewWindow('http://groups.yahoo.com/group/ActiveWords/','AWYahooGroups','720','560','auto'))">The link text</A>
function NewWindow2(mypage,myname,w,h,scroll)
{
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=yes,location=yes,status=yes,menubar=yes,resizable=yes,dependent=no'
	win=window.open(mypage,myname,settings)
	if(parseInt(navigator.appVersion) >= 4)
	{
		win.window.focus();
	}
}

function popup_window(url, id, width, height)
{
	popup = window.open(url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + '');
	popup.focus();
}

