var
	theight=24,
	transtime=2000,
	borderw=0,
	pad_top=0,
	pad_top2=0,
	pad_left=0,
	pad_left2=0,
	borderd='',
	text_alignt='left',
	text_alignh='center',
	text_decort='none',
	text_decorh='none',
	fstylet='normal',
	fstyleh='normal',
	fweightt='normal',
	fweighth='bold',
	fontn='Verdana',
	bgcol = '',
	bgcolh = '#990000',
	txtcol = 'blue',
	txthicol = '#FF3030',
	txtcolh = '#E9E9E9',
	border_color_str = '#000000',
	nstheight = 0,
	nst2width = 0;

var
	text = new Array(),
	header = new Array(),
	linka = new Array(),
	targa = new Array();

	text[0] = "Acer Timeline 8571 Core2 duo Laptop @ £549.90";
	header[0] = "";
	linka[0] = "/product.html?id=617";
	targa[0] = "_self";
	text[1] = "Acer Aspire sa90 Gaming Extreme @ £484.10";
	header[1] = "";
	linka[1] = "/product.html?id=616";
	targa[1] = "_self";
	text[2] = "Acer Aspire 5738z @ £424 inc Vat";
	header[2] = "";
	linka[2] = "/product.html?id=615";
	targa[2] = "_self";
	text[3] = "Fujitsu Amilo Li 1370 Laptop @ £385 inc VAT! WOW";
	header[3] = "";
	linka[3] = "/product.html?id=613";
	targa[3] = "_self";
	text[4] = "Yuraku 22 inch LCD M/M Monitor @ £139.99";
	header[4] = "";
	linka[4] = "/product.html?id=599";
	targa[4] = "_self";
	text[5] = "Dlink ADSL Router   FREE USB Stick @ £45.00";
	header[5] = "";
	linka[5] = "/product.html?id=585";
	targa[5] = "_self";
	text[6] = "Fujitsu ESPRIMO Mobile V5535 Notebook @ £299.00";
	header[6] = "";
	linka[6] = "/product.html?id=587";
	targa[6] = "_self";
	text[7] = "HannsG 19\" Widescreen TFT @ £105.69";
	header[7] = "";
	linka[7] = "/product.html?id=584";
	targa[7] = "_self";
	text[8] = "Lenovo Core2 Duo Webcam Notebook @ £385.00";
	header[8] = "";
	linka[8] = "/product.html?id=593";
	targa[8] = "_self";
	text[9] = "HP Intel M,1GB,80,B/Tooth Notebook @ £351.33";
	header[9] = "";
	linka[9] = "/product.html?id=588";
	targa[9] = "_self";
	text[10] = "HannsG 17.4 inch TFT Monitor @ £95.00";
	header[10] = "";
	linka[10] = "/product.html?id=594";
	targa[10] = "_self";
	text[11] = "Remote Access  - Access your Files and Emails from Anywhere";
	header[11] = "";
	linka[11] = "http://www.nybble.co.uk/services.html";
	targa[11] = "_self";

var
	divtext = new Array(),
	divh = new Array(),
	objst = new Array(),
	objs = new Array(),
	objsh = new Array(),
	IE4B = false,
	NS4B=false,
	NS6B=false,
	OP5B=false,
	NS4B = ((document.layers) ? true : false);
	IE4B = ((document.all) ? true : false);
	NS6B = ((document.getElementById) && (!IE4B)) ? true : false;
	uagent = window.navigator.userAgent.toLowerCase();
	IE5=false;
	IE4=false;
	IEold=false;
	IE5=(uagent.indexOf('msie 5.0') != -1)?true:false;
	IE4=(uagent.indexOf('msie 4') != -1)?true:false;

	if (IE5 || IE4){
		IEold=true;
	}

	OP5B = (uagent.indexOf('opera') != -1) ? true : false;

	if (OP5B == true) {
		IE4B=false;
		NS6B=true;
	}

	if (NS6B == true) {
		IE4B=false;
	}

var
	ns6obj	= null,
	headlineTimer = 0,
	str2	= '',
	msgw,
	msgh,
	mc=0,
	say		= 0,
	onceki	= 0;
	
	msgw = 750-0;
	mc = text.length;
	onceki = mc - 1;
	strpos = '';
	strvis = '';
	strpadding = '';
	strpadding2 ='';
	nsdiv='';
	nstheight = theight-borderw-borderw;
	nst2width = 750-borderw-borderw;
	pad_top = pad_top-borderw + 1;

	if (pad_top < 0) {
		pad_top=0;
	}
	
	pad_top2 = pad_top2-borderw;

	if (pad_top2 < 0) {
		pad_top2 = 0;
	}

	if (IE4B) {
		strpos = 'position:absolute;';
		strvis = '';
		strpadding = 'padding-top:' + pad_top + 'px;padding-left:' + pad_left + 'px;';
		strpadding2 = 'padding-top:' + pad_top2 + 'px;padding-left:' + pad_left2 + 'px;';

	} else if (NS6B) {
		strpos = 'position:absolute;';
		strvis = 'visibility:hidden;';
		strpadding = 'padding-top:' + pad_top + 'px;padding-left:' + pad_left + 'px;';
		strpadding2 = 'padding-top:' + pad_top2 + 'px;padding-left:' + pad_left2 + 'px;';
	}

	divtev1 = ' onmouseover="mdivmo(';
	divtev2 = ')" onmouseout ="restime(';
	divtev3 = ')" onclick="butclick(';
	divtev4 = ')"';

	for (i = 0; i < mc; i++) {
		if(IE4B) {
			divtext[i] = '<div id=d' + i + ' onmouseover="mdivmo(' + i +
				')" onmouseout ="restime(' + i + ')" style="' + strpos + strvis + strpadding +
				' left:' + 0 + '; top:0; width:380px; height:' + theight +
				'; overflow-y:hidden;text-align: ' + text_alignt + ';cursor: default;">';

		} else if(NS6B) {
			divtext[i] = '<div id=d' + i + ' onmouseover="mdivmo(' + i + ')" onmouseout ="restime(' + i +
				')" style="' + strpos + strvis + 'background:' + bgcol +
				'; COLOR: ' + txtcol + '; ' + strpadding + ' left:' + 0 + '; top:0; width:740 ;height:' +
				nstheight + '; FONT-FAMILY: ' + fontn + '; FONT-SIZE: ' + 7 + 'pt; font-style: ' + fstylet +
				'; font-weight: ' + fweightt + '; TEXT-DECORATION: ' + text_decort +
				';margin:0px; overflow-y:hidden;text-align:' + text_alignt + ';cursor: default;">';
		}
	}

	function mdivmo(gnum) {
		if (IE4B) {
			if (linka[gnum] != '') {
//				objd = eval('d' + gnum);
//				objd.style.color = txthicol;
//				objd.style.cursor = 'hand';
//				window.status = '' + text[gnum];
			}
		} else if (NS6B)	{
			if (linka[gnum] != '') {
				objs[onceki].style.color = txthicol;
				objs[onceki].style.cursor = 'pointer';
				window.status = '' + linka[gnum];
			}
		}
	}

	function restime(gnum2) {
		if (IE4B) {
			objd = eval('d' + gnum2);
			objd.style.color = txtcol;
			window.status = '';
		} else if(NS6B) {
			objs[onceki].style.color = txtcol;
			window.status = '';
		}
	}

	function butclick(gnum3) {
		if (targa[gnum3] == '') {
			targa[gnum3] = '_self';
		}

		if (IE4B) {
			window.open('' + linka[gnum3], '' + targa[gnum3]);
		} else if (NS6B) {
			window.open('' + linka[gnum3], '' + targa[gnum3]);
		}
	}

	if (IE4B) {
	} else if (NS6B) {
		str2='';

		for(i = 0; i < mc; i++) {
			str2 = str2 + '<div id=op' + i + ' style="position:absolute;overflow:hidden;' + strvis +
				' left:0;top:0;width:' + nst2width + '; height:' + nstheight + ';' + strvis + borderd + '">';

			str2 = str2 + divh[i] + header[i] + '</div>' + divtext[i] + '' + text[i] + '</div>';
			str2 = str2 + '</div>';
		}
	} else if(NS4B) {
		document.write('<ilayer id="spagelayer" name="spagelayer" width="' + 750 + '" height="' + theight +
			'"></ilayer>');
	}

	function dotrans() {
		if (IE4B) {
			if (IEold != true) {
				spage.filters[0].apply();
			}

			spage.innerHTML = '' + divtext[say] + '<a class=headline href=' + linka[say] + '>' + text[say] + '</a></div>';

			if (IEold != true) {
				spage.filters[0].play();
			}

			headlineTimer = setTimeout('dotrans()', 3000 + transtime);

		} else if (NS6B) {
			objsh[say].style.visibility = 'visible';
			objsh[onceki].style.visibility = 'hidden';
			objs[say].style.color = txtcol;
			objs[say].style.visibility = 'visible';
			objs[onceki].style.visibility = 'hidden';
			objst[say].style.visibility = 'visible';
			objst[onceki].style.visibility = 'hidden';
			onceki=say;
			
			headlineTimer = setTimeout('dotrans()', 3000);
		}

		say++;
		
		if(say>=mc) {
			say=0;
		}
	}

	function dofirst() {
		var
			i=0,
			str="";

		for (i = 0; i < mc; i++) {
			str = "d" + i;
			objs[i] = document.getElementById(str);
			objs[i].style.left = "" + 0 + "px";
			objs[i].style.top = "0px";
			objs[i].style.visibility = "hidden";
			str = "dh" + i;
			objsh[i] = document.getElementById(str);
			objsh[i].style.left = "0px";
			objsh[i].style.top = "0px";
			objsh[i].style.visibility = "hidden";
			str = "op" + i;
			objst[i] = document.getElementById(str);
			objst[i].style.left = "0px";
			objst[i].style.top = "0px";
			objst[i].style.visibility = "hidden";
		}

		objs[0].style.visibility = "visible";
		objsh[0].style.visibility = "visible";
		objst[0].style.visibility = "visible";

		dotrans();
	}

	function initte() {
		if (IE4B) {
			spage.style.borderStyle = "solid";
			spage.style.borderWidth = "" + borderw + "px";
			spage.style.borderColor = border_color_str;
			spage.innerHTML = '' + divtext[say] + '<a class=headline href=' + linka[say] + '>' + text[say] + '</a></div>';
//			spage.innerHTML = "" + divh[say] + header[say] + "</div>" + divtext[0] + text[0] + "</div>";
			say=1;

			headlineTimer = setTimeout('dotrans()', 3000);

		} else if (NS6B) {
			say = 0;
			ns6obj = document.getElementById('spage');
			ns6obj.innerHTML = str2;

			headlineTimer = setTimeout('dofirst()', 500);
		}
	}

	window.onload = initte;
