
/* ====================================================
General Site variables script
==================================================== */

pagelink			= document.location
pagename			= document.title
sitetitle		  = 'Marsh Brothers Engineering	Services'
siteurl				= 'http://www.marshbrothers.co.uk'
developer			= 'Peaknet LTD'
developerurl 	= 'http://www.peaknet.co.uk'
today		    	= new Date
today_time		= today.getHours()
defaultStatus	= siteurl
cpu			      = navigator.platform
snowing		  	= 0

/* ====================================================
Detect for correct browser to determine CSS file
==================================================== */

if	     (document.layers)		                  		{ browser="n4"; }
else if  (document.all)		 			                    { browser="ie"; }
else if  (!document.all && document.getElementById)	{ browser="n6"; }

if	     (browser == "n4") { document.write('<LINK REL="STYLESHEET" HREF="/text_style.css">');	}
else                       { document.write('<LINK REL="STYLESHEET" HREF="/text_style.css">');	}


/* ====================================================
Print Page
==================================================== */

function printpage()
{
	if(document.layers)
	{
		alert("Click on the printer icon, on the frame you wish to print");
	}
	else	// not navigator
	{
		parent.home.focus();
		parent.home.print();
	}
}

/* ====================================================
Bookmark / Add to Favorites script
==================================================== */

function bookmark()

{
if (browser == "ie") { external.AddFavorite(pagelink,pagename) }

else if (browser == "n4") 			          { alert('press control and D now!') }
else if (navigator.appName == "Opera") 		{ alert('press control and T now!') }
}

/* ====================================================
Generic "soon" message
==================================================== */

function soon() { alert('coming soon!'); }

/* ====================================================
Previous Page
==================================================== */

function previous() { history.go(-1); }

/* ====================================================
Snow Effects
==================================================== */

if ((cpu=="Win32") && (browser=="ie") && (snowing==1))

{
document.write('<SCRIPT LANGUAGE=javascript SRC="js/snow.js"></SCRIPT>')
}


/* ====================================================
Print Today's DATE function - Y2K + Netscape friendly
==================================================== */

var months=new Array(13);

months[1]	= "January";
months[2]	= "February";
months[3]	= "March";
months[4]	= "April";
months[5]	= "May";
months[6]	= "June";
months[7]	= "July";
months[8]	= "August";
months[9]	= "September";
months[10]	= "October";
months[11]	= "November";
months[12]	= "December";

var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;

function year() { document.write(year); }

/* ====================================================
End of file
==================================================== */

