/**
 * Global functions 
 *
 * @author Calvin Liu
 */

function $(id)
{
	return document.getElementById(id);
};

var ClientList = function() {
	this.Init.apply(this, arguments);
}

ClientList.prototype = {
	_list: [
		{
			name: "Aspect Education",
			logo: "Aspect_Education.gif",
			url: "https://www.aspectworld.com"
		},
		
		{
			name: "Atlantic Productions",
			logo: "Atlantic_Productions.jpg",
			url: "http://www.atlanticproductions.tv"
		},

		{
			name: "Baylight",
			logo: "Baylight.gif",
			url: "http://www.baylight.co.uk"
		},

		{
			name: "Big Fish Events",
			logo: "Big_Fish_Events.jpg",
			url: "http://www.bigfishevents.co.uk"
		},

		{
			name: "Central House",
			logo: "Central_House.jpg",
			url: ""
		},

		{
			name: "Crow TV",
			logo: "Crow_TV.jpg",
			url: "http://www.crowtv.com"
		},

		{
			name: "Department Purple",
			logo: "Department_Purple.jpg",
			url: "http://www.dpurple.com"
		},

		{
			name: "Design Hub",
			logo: "Design_Hub.jpg",
			url: ""
		},

		{
			name: "Escape Studios",
			logo: "Escape_Studios.jpg",
			url: "http://www.escapestudios.com"
		},

		{
			name: "Goldway Properties",
			logo: "Goldway_Properties.jpg",
			url: ""
		},

		{
			name: "Honey Colour",
			logo: "Honey_Colour.jpg",
			url: ""
		},

		{
			name: "Leston Properties",
			logo: "Leston_Properties.jpg",
			url: ""
		},
		
		{
			name: "Mulberry",
			logo: "Mulberry.gif",
			url: "http://www.mulberry.com"
		},

		{
			name: "Muslim Cultrual Heritage Centre",
			logo: "Muslim_Cultrual_Heritage_Centre.jpg",
			url: "http://www.mchc.org.uk"
		},

		{
			name: "Obbard Property Investment",
			logo: "Obbard_Property_Investment.gif",
			url: "http://www.obbard.co.uk"
		},

		{
			name: "Peabody Trust",
			logo: "Peabody_Trust.jpg",
			url: "http://www.peabody.org.uk"
		},

		{
			name: "London Borough of Kensington and Chelsea",
			logo: "Royal_Borough_of_Kensington_Chelsea.gif",
			url: "http://www.rbkc.gov.uk"
		},

		{
			name: "Sky TV",
			logo: "Sky_TV.gif",
			url: "http://www.sky.com"
		},

		{
			name: "Springboard",
			logo: "Springboard.jpg",
			url: "http://www.springboardurban.co.uk"
		},

		{
			name: "Sussex Canvas",
			logo: "Sussex_Canvas.jpg",
			url: "http://www.sussexcanvas.co.uk"
		},

		{
			name: "The Central House",
			logo: "The_Central_House.jpg",
			url: ""
		},

		{
			name: "Virgin Radio",
			logo: "Virgin_Radio.jpg",
			url: "http://www.virginradio.co.uk"
		},

		{
			name: "Fox TV",
			logo: "Fox_TV.jpg",
			url: "http://www.fox.com"
		},

		{
			name: "Global Career Company",
			logo: "Global_Career_Company.gif",
			url: "http://www.globalcareercompany.com"
		},

		{
			name: "Forster Gallery",
			logo: "Forster_Gallery.jpg",
			url: "http://www.forstergallery.com"
		},

		{
			name: "Apace Media",
			logo: "Apace_Media.gif",
			url: "http://www.apacegroup.co.uk"
		},

		{
			name: "Lowndes Partners",
			logo: "Lowndes_Partners.gif",
			url: "http://www.lowndespartners.com"
		},

		{
			name: "The Bunker",
			logo: "The_Bunker.jpg",
			url: "http://www.thebunker.net"
		}
	],

	Init: function() {},

	show: function() {
		var nList = this._list.length;
		var contents = '<marquee id="client_list" direction="left" scrollamount="5" scrolldelay="120" onmouseover="this.stop();" onmouseout="this.start();">';

		for (var i = 0; i < nList; i++){
			if (this._list[i].url.length != 0){
				contents += '<a href="' + this._list[i].url + '" target="_blank"><img src="/logos/' + this._list[i].logo + '" alt="' + this._list[i].name + '" border="0" onload="if (this.height > 50) this.height=50;" /></a>&nbsp;&nbsp;';
			} else {
				contents += '<img src="/logos/' + this._list[i].logo + '" alt="' + this._list[i].name + '" border="0" onload="if (this.height > 50) this.height=50;" />&nbsp;&nbsp;';
			}
		}

		$('client_list').innerHTML = contents;
	}
};