<!--

//*************************************************************
//* This function pops up a new window with no toolbars etc.
//*************************************************************
function popUpN(URL, ScrollBars, ReSizable, Width, Height) {
  if (ScrollBars == null) { 
    ScrollBars = "yes" ;
  }
  if (ReSizable == null) { 
    ReSizable = "yes" ;
  }
  if (Width == null) { 
    Width = "640" ;
  }
  if (Height == null) { 
    Height = "400" ;
  }
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=no,scrollbars=" + ScrollBars + ",location=no,statusbars=no,menubar=no,resizable=" + ReSizable + ",width=" + Width + ",height=" + Height + ",left=100,top=100');");
}

function isalphanum(s)
{
	return (((s >= 48) && (s <= 57)) || ((s >= 65) && (s <= 90)) || ((s >= 97) && (s <= 122)));
}

function trim(s)
{
	var i = 0;

	for (i = 0; (i <= s.length + 1) && (s.charAt(i) == " "); i++)
		s = s.substr(1, s.length);

	for (i = s.length -1; (i > 0 ) && (s.charAt(i) == " "); i--)
		s = s.substr(0, s.length - 1);

	return(s);
}


function move2page(s)

{	

	var d = s.options[s.selectedIndex].value;

	window.top.location.href = d;

	s.selectedIndex=0;

}

function checkchars(s)
{
	var i = 0;
	var charcount = 0;

	while ((i <  s.length ))
	{
		if ((s.charAt(i) == "&") || (s.charAt(i) == '_') || (s.charAt(i) == '*') || (s.charAt(i) == '%')  || (s.charAt(i) == '*') || (s.charAt(i) == '*'))
		{
			if (i > 2)
				charcount++;
			else
				charcount+=2;
		}
		i++;
	}

	return(charcount);
}

function reallength(s)
{
	var real_len = 0;
	var i = 0;

	if (s != "")
	{

		while ((i <  s.length))
		{
			if (isalphanum(s.charCodeAt(i)))
				real_len++;

			i++;
		}
	}

	return(real_len);
}

function validate_frontSearch()
{

	Name = trim(String(document.comp_search.txt_FL_BusinessName.value));
	Address = trim(String(document.comp_search.txt_FL_Town.value));
	
	NameEmpty = ((Name == "") || (reallength(Name) <= 2));
	AddressEmpty = ((Address == "") || (reallength(Address) <= 2));
	
	AllEmpty = (NameEmpty && AddressEmpty);

	if (AllEmpty)
	{	
		alert("You must enter a Business Name and/or Town");
		return false;
	}


	return true;
}

function validate_search()
{

	Name = trim(String(document.forms['comp_search'].txt_BusinessName.value));
	Address = trim(String(document.forms['comp_search'].txt_Town.value));
	
	NameEmpty = ((Name == "") || (reallength(Name) <= 2));
	AddressEmpty = ((Address == "") || (reallength(Address) <= 2));
	
	AllEmpty = (NameEmpty && AddressEmpty);

	if (AllEmpty)
	{	
		alert("You must enter a Company and/or Business Name");
		return false;
	}


	return true;
}

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 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_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 mmLoadMenus() {
  if (window.mm_menu_pub) return;
  window.mm_menu_pub = new Menu("root",150,18,"Arial, Helvetica, sans-serif",11,"#003366","#ffffff","#cedbe8","#003366","left","middle",2,0,1000,-5,7,true,false,true,0,true,false);
  mm_menu_pub.addMenuItem("Stubbs Gazette","location='../judgments/stubbs.html'");
  mm_menu_pub.addMenuItem("Stubbs Gazette UK","location='../judgments/ur_judgments.html'");
  mm_menu_pub.addMenuItem("Unregistered Judgments", "location='../judgments/ur_judgments.html'");
  mm_menu_pub.addMenuItem("Irish Industry Registers","location='../publications/index.html'");
   mm_menu_pub.hideOnMouseOut=true;
   mm_menu_pub.menuBorder=0;
   mm_menu_pub.menuLiteBgColor='#ffffff';
   mm_menu_pub.menuBorderBgColor='#555555';
   mm_menu_pub.bgColor='#ffffff';
   
  window.mm_menu_judg = new Menu("root",114,18,"Arial, Helvetica, sans-serif",11,"#003366","#ffffff","#cfdce9","#003366","left","middle",2,0,1000,-5,7,true,false,true,0,true,false);

/*
  //mm_menu_judg.addMenuItem("Republic of Ireland","location='https://www.businesspro.ie/logon/index.html'");
  mm_menu_judg.addMenuItem("Republic of Ireland","location='https://www.businesspro.ie/logon/index.php'");  
  mm_menu_judg.addMenuItem("Northern Ireland","location='https://www.stubbsgazette.com/stubbs_search/index.php?LogonType=4'");
  mm_menu_judg.addMenuItem("UK County Court","location='https://www.stubbsgazette.com/stubbs_search/index.php'");
  */
    /*
  mm_menu_judg.addMenuItem("Republic of Ireland","location='https://www.businesspro.ie/logon/index.php?LogonType=1'");  
  mm_menu_judg.addMenuItem("Northern Ireland","location='https://www.stubbsgazette.com/stubbs_search/index.php?LogonType=2'");
  mm_menu_judg.addMenuItem("UK County Court","location='https://www.stubbsgazette.com/stubbs_search/index.php?LogonType=4'");
  mm_menu_judg.addMenuItem("UK Bankruptcies","location='https://www.stubbsgazette.com/stubbs_search/index.php?LogonType=5'");
  mm_menu_judg.addMenuItem("UK Strike-Offs","location='https://www.stubbsgazette.com/stubbs_search/index.php?LogonType=6'");
  */
  
  mm_menu_judg.addMenuItem("Republic of Ireland","location='https://www.businesspro.ie/logon/index.php?LogonType=1'");  
  mm_menu_judg.addMenuItem("Northern Ireland","location='https://www.businesspro.ie/logon/index.php?LogonType=2'");
  mm_menu_judg.addMenuItem("UK County Court","location='https://www.businesspro.ie/logon/index.php?LogonType=3'");
  mm_menu_judg.addMenuItem("UK Bankruptcies","location='https://www.businesspro.ie/logon/index.php?LogonType=4'");
  mm_menu_judg.addMenuItem("UK Strike-Offs","location='https://www.businesspro.ie/logon/index.php?LogonType=5'");
  
   mm_menu_judg.hideOnMouseOut=true;
   mm_menu_judg.menuBorder=0;
   mm_menu_judg.menuLiteBgColor='#ffffff';
   mm_menu_judg.menuBorderBgColor='#555555';
   mm_menu_judg.bgColor='#ffffff';
   
 // window.mm_menu_bsearch = new Menu("root",130,18,"Verdana, Arial, Helvetica,
  window.mm_menu_bsearch = new Menu("root",130,18,"Arial, Helvetica, sans-serif",11,"#003366","#ffffff","#cedbe8","#003366","left","middle",2,0,1000,-5,7,true,false,true,0,true,false);
  mm_menu_bsearch.addMenuItem("Business Information","location='../bsearch/index.html'");
  mm_menu_bsearch.addMenuItem("Latest Accounts","location='../latest_accounts/latest_accounts.htm'");
  
   mm_menu_bsearch.hideOnMouseOut=true;
   mm_menu_bsearch.menuBorder=0;
   mm_menu_bsearch.menuLiteBgColor='#ffffff';
   mm_menu_bsearch.menuBorderBgColor='#555555';
   mm_menu_bsearch.bgColor='#ffffff';
   
     window.mm_menu_marketing = new Menu("root",160,18,"Arial, Helvetica, sans-serif",11,"#003366","#ffffff","#cedbe8","#003366","left","middle",2,0,1000,-5,7,true,false,true,0,true,false);
  mm_menu_marketing.addMenuItem("Top Company Databases","location='../marketdata/topcompanies.html'");
  mm_menu_marketing.addMenuItem("County Databases","location='../marketdata/counties.html'");
   mm_menu_marketing.hideOnMouseOut=true;
   mm_menu_marketing.menuBorder=0;
   mm_menu_marketing.menuLiteBgColor='#ffffff';
   mm_menu_marketing.menuBorderBgColor='#555555';
   mm_menu_marketing.bgColor='#ffffff';
   
  window.mm_menu_services = new Menu("root",190,18,"Arial, Helvetica, sans-serif",11,"#003366","#ffffff","#cedbe8","#003366","left","middle",2,0,1000,-5,7,true,false,true,0,true,false);
  mm_menu_services.addMenuItem("International Risk &amp; Payment Review","location='../services/country_risk.htm'");
 // mm_menu_services.addMenuItem("Training Courses","location='../seminars/index.html'");
//  mm_menu_services.addMenuItem("Translation Services","location='../services/translation.htm'");
   mm_menu_services.hideOnMouseOut=true;
   mm_menu_services.menuBorder=0;
   mm_menu_services.menuLiteBgColor='#ffffff';
   mm_menu_services.menuBorderBgColor='#555555';
   mm_menu_services.bgColor='#ffffff';
   
     window.mm_menu_training = new Menu("root",235,18,"Arial, Helvetica, sans-serif",11,"#003366","#ffffff","#cedbe8","#003366","left","middle",2,0,1000,-5,7,true,false,true,0,true,false);
   mm_menu_training.addMenuItem("Professional Collection Techniques","location='../seminars/professional_collection_techniques.htm'");
   mm_menu_training.addMenuItem("Advanced Collection Techniques","location='../seminars/advanced_collection_techniques.htm'");
   mm_menu_training.addMenuItem("Excellence in Credit Control","location='../seminars/excellence_in_credit_control.htm'");
   mm_menu_training.addMenuItem("Credit Risk Assessment","location='../seminars/credit_risk_assessment.htm'");
   mm_menu_training.addMenuItem("Managing Credit for Profit","location='../seminars/managing_credit_for_profit.htm'");
   mm_menu_training.addMenuItem("Unleash The Profit Potential Of Your Business","location='../seminars/unleash_the_profit_potential_of_your_business.htm'");
   mm_menu_training.hideOnMouseOut=true;
   mm_menu_training.menuBorder=0;
   mm_menu_training.menuLiteBgColor='#ffffff';
   mm_menu_training.menuBorderBgColor='#555555';
   mm_menu_training.bgColor='#ffffff';
  
      
     window.mm_menu_news = new Menu("root",114,18,"Arial, Helvetica, sans-serif",11,"#003366","#ffffff","#cedbe8","#003366","left","middle",2,0,1000,-5,7,true,false,true,0,true,false);
  mm_menu_news.addMenuItem("Press Cuttings","location='../pressreleases/index.html'");
   mm_menu_news.hideOnMouseOut=true;
   mm_menu_news.menuBorder=0;
   mm_menu_news.menuLiteBgColor='#ffffff';
   mm_menu_news.menuBorderBgColor='#555555';
   mm_menu_news.bgColor='#ffffff';

  mm_menu_news.writeMenus();
} // mmLoadMenus()

//-->