//this function produces the date
function ShowDate($type)
	{
		// Array of day names
		var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");

		var monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

		var dt = new Date();
		var y  = dt.getYear();

		if((dt.getDate()==1) || (dt.getDate()==21) || (dt.getDate()==31))
			{
				var suff="st";
			}
		if((dt.getDate()==2) || (dt.getDate()==22))
			{
				var suff="nd";
			}	
		if((dt.getDate()==3) || (dt.getDate()==23))
			{
				var suff="rd";
			}
		if((dt.getDate()==4) || (dt.getDate()==5) || (dt.getDate()==6) || (dt.getDate()==7) || (dt.getDate()==8) || (dt.getDate()==9) || (dt.getDate()==10) || (dt.getDate()==11) || (dt.getDate()==12) || (dt.getDate()==13) || (dt.getDate()==14) || (dt.getDate()==15) || (dt.getDate()==16) || (dt.getDate()==17) || (dt.getDate()==18) || (dt.getDate()==19) || (dt.getDate()==20) || (dt.getDate()==24) || (dt.getDate()==25) || (dt.getDate()==26) || (dt.getDate()==27) || (dt.getDate()==28) || (dt.getDate()==29) || (dt.getDate()==30))
			{
				var suff="th";
			}

		// Y2K compliant
		if (y < 1000) y +=1900;

		if($type=="All")
			{
				document.write(dayNames[dt.getDay()] + " " + dt.getDate() + "<sup>" + suff + "</sup>" + " " + monthNames[dt.getMonth()] + ", " + y);
			}
		if($type=="Year")
			{
				document.write(y);
			}
	}

//this function sets the site as home site or the page as a bookmark
function Bookmark(title,urlpage)
 {
  if (document.all)
   {
    document.write('<A HREF="javascript:window.external.addfavorite(\'http://www.blackcountrytours.co.uk/' + urlpage + '\',\'Black Country Tours [ ' + urlpage + ' ]\');" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.blackcountrytours.co.uk/\');" >');
    document.write('SET HOME PAGE AND/OR ADD ' + title + '</a>');
   }
  // Netscape 6
  else if (document.getElementById)
   {
    document.write('<a href="http://www.blackcountrytours.co.uk/' + urlpage + '">Drag this link onto your Home button to make this your Home Page.</a>');
   }
  // If it's Netscape 4 or lower, give instructions to set Home Page
  else if (document.layers)
   {
    document.write('<b>Make this site your home page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
   }
  // If it's any other browser, for which I don't know the specifications of home paging, display instructions
  else
   {
    document.write('<b>Make this site your home page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
   }
 }


//this function effectively loads the required page
function LoadPage(frame)
	{ //default is 0; what loads is determined by OPTION SELECTED VALUE
		if (( frame != "" ) && (document.getPage.thislocation.selectedIndex.value != ""))
			{
				open(document.getPage.thislocation.options[document.getPage.thislocation.selectedIndex].value,frame);
			}	
		return 0;	
	}

function LoadPage2(frame)
	{ //default is 0; what loads is determined by OPTION SELECTED VALUE
		if (( frame != "" ) && (document.getPage2.thislocation.selectedIndex.value != ""))
			{
				open(document.getPage2.thislocation.options[document.getPage2.thislocation.selectedIndex].value,frame);
			}	
		return 0;	
	}

function LoadPage3(frame)
	{ //default is 0; what loads is determined by OPTION SELECTED VALUE
		if (( frame != "" ) && (document.getPage3.thislocation.selectedIndex.value != ""))
			{
				open(document.getPage3.thislocation.options[document.getPage3.thislocation.selectedIndex].value,frame);
			}	
		return 0;	
	}

function Emailadd(name)
	{
   document.write("<a href=\"MAILTO:julie@blackcountrytours.co.uk\" onMouseOver=\"self.status='Send E-Mail to Julie'\" onMouseOut=\"self.status='Black Country Tours'\">"+name+"</a>");
	}


