
/* ====================================================
General Site variables script
==================================================== */

pagelink		= document.location
pagename		= document.title
siteUrl			= 'www.nmedauk.org'
developer		= 'John Mounsey'
developerurl		= 'www.peaknet.ltd.uk'
defaultStatus		= siteUrl
mailTitle		= siteUrl + ' - ' + pagename + ' : ' + pagelink
telePhone		= '01784 470860'
pagePath		= '/'

/* ====================================================
Bookmark / Add to Favorites script
==================================================== */

function bookmark()

{ 
if (window.external) { external.AddFavorite(pagelink,pagename) }
	
else if (navigator.appName == "Netscape") 		{ alert('press control and D now to bookmark this page') }
else if (navigator.appName == "Opera") 		{ alert('press control and T now to bookmark this page') }
}


/* ====================================================
Send page to friend
==================================================== */

function sendlink()
	{
	alert('This opens a new Email message for you to send to friends ...');
	window.location='mailto:?subject=' + mailTitle
	}


/* ====================================================
Coming Soon Function
==================================================== */

function soon()
	{
	alert('Coming Soon ...');
	}

/* ====================================================
Previous Page
==================================================== */

function previous() { history.go(-1); }


/* ====================================================
Display Page Title
==================================================== */

function title() { document.write(document.title); }


/* ====================================================
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 today() { document.write(lmonth + " " + date); }



/* Hide "Loading" message
==================================================== */

function hideLoad()

{
document.getElementById('loading')
loading.style.display='none';
}



/* Time of Day Greeting
==================================================== */

function greet(starter)

{
today		= new Date
today_time	= today.getHours()
greeting	= 'Day'


if	(today_time < 12)	{ greeting = "morning";		}
else if (today_time < 18)	{ greeting = "afternoon";	}
else				{ greeting = "evening";		}

document.write(starter + " " + greeting);
}



/* Footer info
==================================================== */

function footer()

{
document.write('<p align="right"><!--<strong>Tel:</strong> 01784 470860 - -->Formerly &quot;ADAPS&quot; &copy;'+ year+'. ')
document.write('Web Site Design and Hosting from: <a href="http://www.peaknet.co.uk?r=nmeda" target="Peaknet">Peaknet.co.uk</a></p>')
}


/* ====================================================
Banner ads code
==================================================== */

function bannerList(a,b,c)
{   
this[0] = a;
this[1] = b;
this[2] = c;
}
   
function chooseBanner(list)

{
var theDate 	= new Date();
var page 	= theDate.getSeconds() % bannerList.length;

document.write('<A HREF="/advertising.html"><IMG ALT="nmeda promotion - click here.." SRC="/gfx/banners/' + list[page] + '.gif" NAME="ibanner" CLASS="ibanner"></A>');
}

banners = new bannerList

("01","02","03");


/* ====================================================
Tile ads code
==================================================== */

function tileList(a,b,c,d,e,f,g,h,i,j,k,l,m)
{   
this[0] = a;
this[1] = b;
this[2] = c;
this[3] = d;
this[4] = e;
this[5] = f;
this[6] = g;
this[7] = h;
this[8] = i;
this[9] = j;
this[10] = k;
this[11] = l;
this[12] = m;
}
   
function chooseTile(list)

{
var tileDate 	= new Date();
var tilepage 	= tileDate.getSeconds() % tileList.length;

document.write('<A HREF="/productSearch.html"><IMG ALT="Search our database of mobility products.." SRC="/gfx/tiles/' + list[tilepage] + '.jpg" NAME="itile" CLASS="itile"><BR>Product search</A>');
}

tiles = new tileList

("01","02","03","04","05","06","07","08","09","10","11","12","13");


/* ====================================================
Message info [outputs top right of _all_ pages]
==================================================== */

function message()

	{
	chooseBanner(banners);
	}

//{
//document.write('<DIV><A HREF="'+pagePath+'advertising.html" ONCLICK="alert(\'Banner can link to any page or site\');"><IMG ID="banner" SRC="'+pagePath+'gfx/core/banner.gif" NAME="banner" ALT="Demo banner advertisement"></A></DIV>');
//}


/* ====================================================
Promo info
==================================================== */

function promo()

{
document.write('<P align="right"><strong><A STYLE="color: #2d4492;" HREF="/directory.html" TARGET="_top">Find a member</A></strong></P>');
}


/* ====================================================
Ticker destination url
==================================================== */

function tickPage()

{
top.location = '/productSearch.html';
}


/* ====================================================
Scroller functions
==================================================== */

var swidth		= 810

pageW = screen.width; 

if 	(pageW < 801)	{ swidth = 590; }
else if (pageW < 1025)	{ swidth = 810; }
else if (pageW < 1281)	{ swidth = 1070; }
else if (pageW < 1601)	{ swidth = 1386; }

var sheight		= 18
var sbcolor		= "transparent"
var scrollspeed		= 1
var resumesspeed	= scrollspeed;
var sizeup		= 0;
var broper		= navigator.userAgent.toLowerCase().indexOf('opera');


wholemessage='<NOBR title="Search all these product categories - and more.." class="ticktext"><A HRER="#">180 degree swivel seats .. Seat support systems .. Electric seat movers .. Seat base add-ons .. Removable seats .. Electric wheelchair seats .. Person lifts .. Seat belts .. Seat harnesses .. Hand controls .. Automatic clutches .. Steering wheels .. Power assisted steering .. Steering Attachments .. Tiller steering .. Foot steering .. Joystick steering .. Steering mushrooms .. Cruise controls .. Gearbox conversions .. Wheelchair hoists .. Assisted braking .. Electric hand brakes .. Braking adjustment .. Sliding rear door .. Fold up accelerators .. Sliding board .. Rotating disc .. Electric leg / thigh lifters .. Manual Wheelchair hoists .. Scooter hoists .. Platform lifts.. Strap restraints .. Retractable restraints .. Net restraints .. and more ..</A>';

function hideLoad()

{
document.getElementById('loading')
loading.style.display='none';
}

function start()
	{
		hideLoad()
	
	if (document.all) iemarquee(slider);
	else if (document.getElementById)
	ns6marquee(document.getElementById('slider'));
	else if(document.layers)
	ns4marquee(document.slider1.document.slider2);
//	alert(document.body.clientWidth);
	}

function iemarquee(whichdiv)
	{
	iediv=eval(whichdiv)
	iediv.style.pixelLeft=swidth
	iediv.innerHTML='<nobr>'+wholemessage+'</nobr>'
	sizeup=iediv.offsetWidth
	ieslide()
	}

function ieslide()
	{
	if (iediv.style.pixelLeft>=sizeup*(-1))
		{	
		iediv.style.pixelLeft-=scrollspeed
		setTimeout("ieslide()",15)
		}
		
		else
		{
		iediv.style.pixelLeft=swidth
		ieslide()
		}
	}

function ns4marquee(whichlayer)

	{
	ns4layer=eval(whichlayer)
	ns4layer.left=swidth
	ns4layer.document.write('<NOBR>'+wholemessage+'</NOBR>')
	ns4layer.document.close()
	sizeup=ns4layer.document.width
	ns4slide()
	}

function ns4slide()
	{
	if (ns4layer.left>=sizeup*(-1))
		{
		ns4layer.left-=scrollspeed
		setTimeout("ns4slide()",15)
		}
	
		else
		{
		ns4layer.left=swidth
		ns4slide()
		}
	}

function ns6marquee(whichdiv)
	{
	ns6div=eval(whichdiv)
	ns6div.style.left=swidth
	ns6div.innerHTML='<nobr>'+wholemessage+'</nobr>'
	sizeup=ns6div.offsetWidth
	ns6slide()
	}

function ns6slide(){
if (parseInt(ns6div.style.left)>=sizeup*(-1)){
ns6div.style.left=parseInt(ns6div.style.left)-scrollspeed
setTimeout("ns6slide()",15)
}
else{
ns6div.style.left=swidth
ns6slide()
}
}

window.onload = start; 

