var
	bAdMode = true;

var
	theight		= 24,
	transtime	= 4000,
	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		= 'Tahoma',
	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(),
	adsIDs = new Array();

	text[0] = 'Leather Sofas, Fabric Sofas in UK, Ireland &amp; Scotland';
	header[0] = '';
	linka[0] = 'http://www.designersofas4u.co.uk/news/2010/october/leather-sofa-fabric-sofa-in-uk-ireland.html';
	targa[0] = '_blank';
	adsIDs[0] = 86;
	text[1] = 'Chesterfield Sofabed, Chesterfield Furniture in UK, Ireland &amp; Scotland';
	header[1] = '';
	linka[1] = 'http://www.designersofas4u.co.uk/news/2010/october/chesterfield-sofa-bed-chesterfield.html';
	targa[1] = '_blank';
	adsIDs[1] = 87;
	text[2] = 'Special Offers On All Our Chesterfield Sofa Range Tub Chair Footstool &amp; Wing Chairs';
	header[2] = '';
	linka[2] = 'http://www.designersofas4u.co.uk/help/chesterfield-sofa-tub-chair-footstool.html';
	targa[2] = '_blank';
	adsIDs[2] = 85;
	text[3] = 'Spec';
	header[3] = '';
	linka[3] = 'http://www.designersofas4u.co.uk/help/chesterfield-sofa-tub-chair-footstool.html';
	targa[3] = '_blank';
	adsIDs[3] = 84;
	text[4] = 'International Agents Required For Chesterfield Furniture and Chesterfield Sofas';
	header[4] = '';
	linka[4] = 'http://www.designersofas4u.co.uk/news/2010/april/international-agents-chesterfield.html';
	targa[4] = '_blank';
	adsIDs[4] = 80;
	text[5] = 'Natuzzi Sofas at Designer Sofas 4u Ltd';
	header[5] = '';
	linka[5] = 'http://www.designersofas4u.co.uk/news/2010/march/natuzzi-leather-sofas.html';
	targa[5] = '_blank';
	adsIDs[5] = 78;
	text[6] = 'Designer Sofas 4u appears on ITV1';
	header[6] = '';
	linka[6] = 'http://www.designersofas4u.co.uk/news/2009/december/itv-60-minute-make-over-features-our.html';
	targa[6] = '_blank';
	adsIDs[6] = 77;
	text[7] = 'Furniture Sale | Sofa Sale | Christmas Sale. For this period save upto 50% off RRP on Selected Items.';
	header[7] = '';
	linka[7] = 'http://www.designersofas4u.co.uk/news/2009/december/furniture-sale-sofa-sale-christmas-sale.html';
	targa[7] = '_blank';
	adsIDs[7] = 65;
	text[8] = 'Designer Sofas 4u Ltd at NEC Birmingham 2009';
	header[8] = '';
	linka[8] = 'http://www.designersofas4u.co.uk/news/2010/january/ds4u-nec-january-2010.html';
	targa[8] = '_blank';
	adsIDs[8] = 64;
	text[9] = 'New Tub Chair Range - Designer Sofas4u Exclusive';
	header[9] = '';
	linka[9] = 'http://www.designersofas4u.co.uk/news/2008/july/new-tub-chair-range.html';
	targa[9] = '_blank';
	adsIDs[9] = 61;
	text[10] = 'Chesterfield Sofa Sale';
	header[10] = '';
	linka[10] = 'http://www.designersofas4u.co.uk/news/2008/june/chesterfield-sofa-sale.html';
	targa[10] = '_blank';
	adsIDs[10] = 58;
	text[11] = 'Chesterfield Leather Sofa and Chesterfield Wing Chair to be featured on ITV 60 Minuite Make Over';
	header[11] = '';
	linka[11] = 'http://www.designersofas4u.co.uk/news/2009/december/itv-60-minute-make-over-features-our.html';
	targa[11] = '_blank';
	adsIDs[11] = 55;
	text[12] = 'Chesterfield Sofa Sale - Summer Holiday Sale';
	header[12] = '';
	linka[12] = 'http://www.designersofas4u.co.uk/news/2008/august/chesterfield-sofa-sale.html';
	targa[12] = '_blank';
	adsIDs[12] = 52;
	text[13] = 'Natuzzi | House of Fraser | Marks and Spencer | Chesterfield Sofa';
	header[13] = '';
	linka[13] = 'http://www.designersofas4u.co.uk';
	targa[13] = '_blank';
	adsIDs[13] = 50;
	text[14] = 'Designer Sofas 4u featured on ITV 60 Minute Make Over';
	header[14] = '';
	linka[14] = 'http://www.designersofas4u.co.uk/news/2008/april/itv-60-minute-make-over-designer-sofa.html';
	targa[14] = '_blank';
	adsIDs[14] = 44;
	text[15] = 'Interest Free Credit Finance Available | Buy Now Pay Later Deal';
	header[15] = '';
	linka[15] = 'http://www.designersofas4u.co.uk/news/2008/march/interest-free-credit-finance-available.html';
	targa[15] = '_blank';
	adsIDs[15] = 41;
	text[16] = 'Designer Sofas 4u goes International - Import Chesterfield Sofa Settee from UK';
	header[16] = '';
	linka[16] = 'http://www.designersofas4u.co.uk/news/2008/march/import-chesterfield-sofa-settee-from-uk.html';
	targa[16] = '_blank';
	adsIDs[16] = 39;
	text[17] = 'NEW | Bedroom Furniture, Beds, Bunk Beds, Mattresses, Dressing Tables, Wardrobes, Bed Side Tables';
	header[17] = '';
	linka[17] = 'http://www.designersofas4u.co.uk/news/2008/february/bedroom-furniture-bunk-beds-wardrobes.html';
	targa[17] = '_blank';
	adsIDs[17] = 33;
	text[18] = 'Chesterfield Sofa | British Handcrafted Leather Chesterfield Sofa Settee';
	header[18] = '';
	linka[18] = '/products/sofas-and-living-room/chesterfield-sofa-range-products.html';
	targa[18] = '_blank';
	adsIDs[18] = 31;
	text[19] = 'Exclusive Tub Chairs - Bespoke Custom-Made for Bars Clubs Restaurants';
	header[19] = '';
	linka[19] = '/products/tub-chairs-products.html';
	targa[19] = '_blank';
	adsIDs[19] = 30;
	text[20] = 'Leather Footstools Cube Pouffe - Faux Leather';
	header[20] = '';
	linka[20] = '/products/beds-and-bedroom/footstools/footstool-cube-pouffe-black-faux-product.html';
	targa[20] = '_blank';
	adsIDs[20] = 29;
	text[21] = 'Caring for Our Environment';
	header[21] = '';
	linka[21] = 'http://www.designersofas4u.co.uk/news/2008/february/lets-sustain-our-environment.html';
	targa[21] = '_blank';
	adsIDs[21] = 28;
	text[22] = 'Bar Furniture, Pub Furniture, Club Furniture, Care Home Furniture, Housing Association Furniture';
	header[22] = '';
	linka[22] = 'http://www.designersofas4u.co.uk/news/2008/february/bar-furniture-pub-furniture-club.html';
	targa[22] = '_blank';
	adsIDs[22] = 26;
	text[23] = 'Marks and Spencer, House Of Frasier Furniture at DS4U';
	header[23] = '';
	linka[23] = 'http://www.designersofas4u.co.uk/news/2008/january/marks-spencer-house-of-fraser.html';
	targa[23] = '_blank';
	adsIDs[23] = 22;
	text[24] = 'Memory Foam Mattress Technology';
	header[24] = '';
	linka[24] = 'http://www.designersofas4u.co.uk/help/health-bulletin-memory-foam-technology.html';
	targa[24] = '_blank';
	adsIDs[24] = 12;
	text[25] = 'The Chesterfield Sofa Heritage';
	header[25] = '';
	linka[25] = 'http://www.designersofas4u.co.uk/help/british-manufactured-classic.html';
	targa[25] = '_blank';
	adsIDs[25] = 11;

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:500px; 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: spage.left; top: spage.top; height:' +
				nstheight + ';' + 'margin:0px; overflow-y:hidden;text-align:' + text_alignt + ';cursor: default;">';
		}
	}

	function mdivmo(gnum) {
		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 || NS6B) {
			window.location = linka[gnum3];
		}
	}

	if (IE4B) {
	} else if (NS6B) {
		str2='';

		for(i = 0; i < mc; i++) {
			if (bAdMode) {
				str2 = str2 + divtext[i] + '<A onClick="this.href = \'/common/ads-statistics.html?adsID=' + adsIDs[i] + '\'; return true;" class=headline href="' + linka[i] + '">' + text[i] + '</a></div>';
			} else {
				str2 = str2 + divtext[i] + '<A class="headline"  href="' + linka[i] + '">' + text[i] + '</a></div>';
			}
		}
	} else if(NS4B) {
		document.write('<ilayer id="spagelayer" name="spagelayer" width="' + 750 + '" height="' + theight +
			'"></ilayer>');
	}

	function dotrans() {
		if (IE4B) {
			try {
				if (IEold != true) {
					spage.filters[0].apply();
				}

				if (bAdMode) {
					spage.innerHTML = '' + divtext[say] + '<A onClick="this.href = \'/common/ads-statistics.html?adsID=' + adsIDs[say] + '\'; return true;" class=headline href="' + linka[say] + '">' + text[say] + '</a></div>';
				} else {
					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);
			} catch (e) {
			}

		} else if (NS6B) {
			objs[say].style.color = txtcol;
			objs[say].style.visibility = 'visible';
			objs[onceki].style.visibility = 'hidden';
			onceki=say;
			
			headlineTimer = setTimeout('dotrans()', 3000);
		}

		say++;
		
		if(say>=mc) {
			say=0;
		}
	}

	function dofirst() {
		var
			i=0,
			str="";

		try {
    		for (i = 0; i < mc; i++) {
    			objs[i] = document.getElementById("d" + i);
    		}
		
    		objs[0].style.visibility = "visible";
    		
    		dotrans();
    	} catch (e) {
    	}
	}

	function initte() {
		if (IE4B) {
			spage.style.borderStyle = "solid";
			spage.style.borderWidth = "" + borderw + "px";
			spage.style.borderColor = border_color_str;

			if (bAdMode) {
				spage.innerHTML = '' + divtext[say] + '<A onClick="this.href = \'/common/ads-statistics.html?adsID=' + adsIDs[say] + '\'; return true;" class=headline href=' + linka[say] + '>' + text[say] + '</A></DIV>';
			} else {
				spage.innerHTML = '' + divtext[say] + '<A class="headline" href="' + linka[say] + '">' + text[say] + '</A></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;
