
  // the array global_article is used to allow multiple categories
  var global_article = new Array();
  var global_article_counter = 0;
  var article = null;
  var early_exit = true;
  var moreover_text = 0;


function load_wizard()
{

	var newwin = window.open("","clone","resizable,scrollbars");
	document.forms.moreover_clone.submit();
	return true;
}

    
// load global_article array with articles from category
function moro_p1a()
{
  if (article != null && (article.length > 0))
    {
    early_exit = false;
    for (var article_counter = 0; article_counter < article.length; article_counter++)
      {
      global_article[global_article_counter] = article[article_counter];
      global_article[global_article_counter].url += "&w=2115745";

      global_article[global_article_counter].url += "' target='_blank";
      global_article[global_article_counter].document_url += "' target='_blank";
      global_article_counter++;
      }
    }
 }
 
function moro_part1()
{
  moro_p1a();
  if (global_article.length == 0)
      {
      if (early_exit)
        {
        document.write("<CENTER>Please reload this page to view the headlines</CENTER>");
        }
      else
        {
        document.write("<CENTER>Sorry, no articles matched your search criteria</CENTER>");
        early_exit = true;
        }
      }
}

function moro_list(moro_num)
{
  moro_part1();
  if (!early_exit)
  {
  var wizard_brand			= "moreover";
  var webfeed_heading 			= "Athletics News";
  var width 				= "150";
  var numberofarticles 			=  global_article.length;
  var cluster_border 			= "0";
  var time_display 			= "Yes";
  var cell_spacing 			= "0";
  var cell_padding 			= "1";
  var time 					=  new Array(global_article.length);
  if (numberofarticles > moro_num) {numberofarticles = moro_num;}

  // Start loop for articles
  for (var counter=0; counter < numberofarticles; counter++)
    {

	if ((counter == (global_article.length - 1)) && moreover_text == 1)
      {
      time_display = "No";
      }

	// Print out the headline

    document.write("<a href='"+global_article[counter].url+"' class='mrolb'>");
    document.write(global_article[counter].headline_text+"...</a><br />");


      // Print out the source
        if ((counter != (global_article.length - 1)) || moreover_text != 1)
        {

		document.write("<A HREF='"+global_article[counter].document_url+"' + class='mrols'>");
        document.write(global_article[counter].source+"</A>");

		}


    // Print out reg/sub/prem if appropriate
    if (global_article[counter].access_status == "sub" || global_article[counter].access_status == "reg" || global_article[counter].access_status == "prem")
      {
      document.write("<span class='mrots'>&nbsp;</span><A HREF='"+global_article[counter].access_registration+"' class='mrols'>");
 	  document.write(global_article[counter].access_status+"</A>");
      }

    // Print out the harvest time
    if (time_display == "Yes")
      {
      // Make a new date object
      time[counter] = new Date(global_article[counter].harvest_time);
      time[counter].setHours(time[counter].getHours() - (time[counter].getTimezoneOffset() / 60 ));
	  document.write("<span class='mrots'> &nbsp;"+time[counter].toString()+"<br />&nbsp;<br /></span>");
      }
    else
      {
      document.write("<br />&nbsp;<br />");
      }

    } // End of article loop


  // Start of clone button code //
  // NOTE: DO NOT REMOVE any of the code in this section //
  document.write("<form method='POST' action='http://www.moreover.com/home1/apache/hosts/moreover/WWWDocs/cgi-local/wizard_welcome.pl' target='clone' name='moreover_clone'>");
  document.write("<input type='hidden' name='parent_code' value='2115745'>");
  document.write("<input type='hidden' name='clone_system' value='c'>");
  document.write("<input type='hidden' name='system' value='c'>");
  document.write("<input type='hidden' name='heading_font_size' value=''><input type='hidden' name='webfeed_heading' value='Ireland news'>")
  document.write("<input type='hidden' name='cluster_width' value='150'><input type='hidden' name='time_display' value='Yes'>")
  document.write("<input type='hidden' name='cluster_cellspacing' value='0'><input type='hidden' name='number_of_headlines' value='10'>")
  document.write("<input type='hidden' name='source_time_fgcolor' value='333333'><input type='hidden' name='search_keywords' value=''>")
  document.write("<input type='hidden' name='source_time_font_size' value='10'><input type='hidden' name='headline_italic' value='false'>")
  document.write("<input type='hidden' name='source_time_italic' value='false'><input type='hidden' name='headline_bold' value='true'>")
  document.write("<input type='hidden' name='source_time_bold' value='false'><input type='hidden' name='headline_bgcolor' value='ffffff'>")
  document.write("<input type='hidden' name='cluster_name' value='c=Ireland%20news&o=js'><input type='hidden' name='source_time_underline' value='false'>")
  document.write("<input type='hidden' name='headline_fgcolor' value='996633'><input type='hidden' name='heading_display' value='Yes'>")
  document.write("<input type='hidden' name='headline_font_size' value='12'><input type='hidden' name='headline_font' value='MS Sans Serif, Geneva, sans-serif'>")
  document.write("<input type='hidden' name='source_time_font' value='Geneva, Arial, sans-serif'><input type='hidden' name='wizard_brand' value='moreover'>")
  document.write("<input type='hidden' name='cluster_cellpadding' value='1'><input type='hidden' name='cluster_layout' value='<br />'>")
  document.write("<input type='hidden' name='headline_underline' value='true'><input type='hidden' name='cluster_border' value='0'>")

  document.write("</form>");
  // End of clone button code //

  // ************************************************************************************
  // This code is subject to the copyright and warranty restrictions detailed at
  // http://www.moreover.com/wizard_copyright.html
  // Copyright 2000 Moreover.com Inc. All rights reserved.
  // *************************************************************************************
  }
}

