var steps = 5;
var step = 0;
var leftDiv = 64;
var topDiv = 0;
var allTop = 200;
var picLeft;
var textLeft;
var picCount = 0;
var pause;
var moving;
var loadImg = new Image(300,200);
//0:  At Home
//1:  Betts
//2:  C24
//3:  Footprint
//4:  Cybit
//5:  Archdeacon
//6:  John Burn
//7:  JNC
//8:  PRC
//9:  Philips
//10:  Arista
//11: Landmark
//12: SSC
//13: CRUFC
//14: Chiasma

var examples = new Array('athomewww.jpg','bettswww.jpg','c24.jpg','footprintapp.gif','cybitwww.jpg','archwww.gif','johnburn.jpg','jncwww.gif','prcwww.gif','philipslogo.jpg','aristawww.jpg','landwww.gif','sscwww.gif','crufcwww.gif','chiasma.gif');
var clientSites = new Array('www.athome-interiors.com','','www.champagne24.co.uk','','www.cybit.co.uk','www.archdeaconmotors.co.uk','www.johnburn.co.uk','www.jncasting.com','www.peterreidconsulting.com','www.sopho.philips.com','','www.landmarkhousing.org.uk','www.schoolsoftwarecompany.com','www.crufc.co.uk','www.chiasmapress.com');
var clientSiteMessage = new Array('','','','','','','','','','','','','');
var clientSiteLink = new Array(1,0,1,0,1,1,1,0,1,0,1,1,1,1);
loadImg.src = "images/loading.gif";
function setNewImage(imgObj,imgSource) {
	imgObj.src = loadImg.src;
	imgObj.src = "images/" + imgSource;
}
function showNext() {
	if (! moving) {
		step = 0;
		if (picCount < examples.length - 1) {
			moving = true;
			setNewImage(getImg("WWWSCREENMOVES","CLIENTPICMOVES"),examples[picCount]);
			showObj("CLIENTPICMOVES");
			setObjZ("CLIENTPICMOVES",60);
			picCount++;
			hideObj("CLIENTPICSTATIC");
			setNewImage(getImg("WWWSCREENSTATIC","CLIENTPICSTATIC"),examples[picCount]);
			showObj("CLIENTPICSTATIC");
			hideObj("CLIENTTEXT" + (picCount - 1));
			pause=setTimeout("movePic(" + (picCount - 1) + ")",200);
		}
	}
}
function showPrev() {
	if (! moving) {
		step = 0;
		if (picCount > 0) {
			moving = true;
			picCount--;
			setNewImage(getImg("WWWSCREENMOVES","CLIENTPICMOVES"),examples[picCount]);
			setObjZ("CLIENTPICMOVES",40);
			showObj("CLIENTPICMOVES");
			hideObj("CLIENTTEXT" + (picCount + 1));
			pause=setTimeout("movePic(" + (picCount + 1) + ")",0);
		}
	}
}
function movePic(textToHide){
	if (step<steps) {
		step++;
		moveObj("CLIENTPICMOVES",leftDiv,-topDiv);
		pause=setTimeout("movePic(" + textToHide + ")",0);
	}
	else {
		setObjZ("CLIENTPICMOVES",(50 + ((textToHide-picCount)*10)));
		pause=setTimeout("returnPic(" + textToHide + ")",300);
	}
}
function returnPic(textToHide){
	if (step>0) {
		step--;
		moveObj("CLIENTPICMOVES",-leftDiv,topDiv);
		pause=setTimeout("returnPic(" + textToHide + ")",0);
	}
	else {
		if (textToHide<picCount) 
			setNewImage(getImg("WWWSCREENMOVES","CLIENTPICMOVES"),examples[picCount + 1]);
		else {
			setNewImage(getImg("WWWSCREENMOVES","CLIENTPICMOVES"),examples[picCount - 1]);
			setNewImage(getImg("WWWSCREENSTATIC","CLIENTPICSTATIC"),examples[picCount]);}
		setObjZ("CLIENTPICMOVES",40);
		moving = false;
		showObj("CLIENTTEXT" + (picCount));
		clearTimeout(pause);
	}
}
function setPlaces() {
	resetDivs();
	showObj("CLIENTTEXT0");
	showObj("CLIENTPICSTATIC");
}
function resetDivs() {
	picLeft = 120 + ((getWindowWidth() - 740) / 2);
	if (picLeft<130) picLeft=130;
	textLeft = picLeft + 320;
	posObj("CLIENTTEXT0",textLeft,allTop);
	posObj("CLIENTTEXT1",textLeft,allTop);
	posObj("CLIENTTEXT2",textLeft,allTop);
	posObj("CLIENTTEXT3",textLeft,allTop);
	posObj("CLIENTTEXT4",textLeft,allTop);
	posObj("CLIENTTEXT5",textLeft,allTop);
	posObj("CLIENTTEXT6",textLeft,allTop);
	posObj("CLIENTTEXT7",textLeft,allTop);
	posObj("CLIENTTEXT8",textLeft,allTop);
	posObj("CLIENTTEXT9",textLeft,allTop);
	posObj("CLIENTTEXT10",textLeft,allTop);
	posObj("CLIENTTEXT11",textLeft,allTop);
	posObj("CLIENTTEXT12",textLeft,allTop);
	posObj("CLIENTTEXT13",textLeft,allTop);
	posObj("CLIENTTEXT14",textLeft,allTop);
	posObj("CLIENTPICMOVES",picLeft,allTop);
	posObj("CLIENTPICSTATIC",picLeft,allTop);
}
function writeDiv(num,client,brief,result,skill,comment) {
var allText="<div id=\"CLIENTTEXT" + num + "\"><div class=\"CLIENTTITLE\">Client:</div><div class=\"CLIENTDETAILS\">" +
	client + "</div><div class=\"CLIENTTITLE\">Brief:</div><div class=\"CLIENTDETAILS\">" +
	brief + "</div>" + "<div class=\"CLIENTTITLE\">Result:</div><div class=\"CLIENTDETAILS\">" +
	result + "</div><div class=\"CLIENTTITLE\">Skills Required:</div><div class=\"CLIENTDETAILS\">" +
	skill + "</div>";
if (!comment=="")
	allText=allText + "<div class=\"CLIENTTITLE\">Comment:</div><div class=\"CLIENTDETAILS\">&#145;" + comment + 
	"&#145;</div>";
allText=allText + "</div>";
document.write(allText);
}
function showClientSite() {
	if (!clientSites[picCount]=="") { 
		if (!clientSiteMessage[picCount]=="") 
			alert(clientSiteMessage[picCount]);
		if (clientSiteLink[picCount]==1) 
			eval("window.open('http://" + clientSites[picCount] + "')");}
}
function writeAllDivs() {
document.write("<div id=\"CLIENTPICMOVES\"><img name=\"WWWSCREENMOVES\" src=\"images\/aristawww.jpg\" width=300 height=200 border=0></div>");
document.write("<div id=\"CLIENTPICSTATIC\"><a title=\"Client web site or logo\" href=\"Javascript: void showClientSite();\"><img name=\"WWWSCREENSTATIC\" src=\"images\/athomewww.jpg\" width=300 height=200 border=0><\/a></div>");
writeDiv(0,"<b>At Home Interiors</b><br>Interior design consultants<br><a href=\"Javascript: void showClientSite();\">www.athome-interiors.com<\/a>",
		   "To design and develop a web site and to provide consultancy on Internet access and email set-up.",
		   "The site uses dynamic images to give a feeling of the range of styles that are available.",
		   "DHTML, JavaScript, CSS, MS Windows, MS Office, Adobe Photoshop and ImageReady",
		   "...had an email from chairman of our association who liked the humour of our site...");
writeDiv(1,"<b>Betts UK</b><br>Multi-national packaging manufacturer",
		   "To provide Progress development and MFG/PRO consultancy.",
		   "We work closely with Betts UK to provide customisation of their MFG/PRO system. This includes " +
		   "work on international systems including a large amount of recent work for their Polish colleagues.",
		   "Progress RDBMS, Progress 4GL, SQL Server",
		   "...thanks for all your hard work over the last year ... you are always willing to help and always supply " +
		   "top quality code. ...Progress skills & knowledge are first rate, and we hope we can continue to do business.");
writeDiv(2,"<b>Champagne 24</b><br>The UK's premier next day delivery Champagne gift service.<br><a href=\"Javascript: void showClientSite();\">www.champagne24.com<\/a>",
		   "To design, develop and host a website for a Champagne 24.",
		   "Champagne 24 is a next day delivery Champagne gift service. They send bottles of Champagne and Sparkling wine with a personalised message, by courier delivery, to individual customers and the corporate market. " +
		   "The site had to be stylish, quick and easy to use.",
		   "MS Access, PHP, CSS, HTML, Javascript, MySQL",
		   "");
writeDiv(3,"<b>Footprint Handbooks</b><br>Publisher of world-wide travel guides",
		   "To design and develop a database for generating mail-shots for publicity purposes.",
		   "Footprint Handbooks publish travellers guides and wanted a database system that could hold information on all their publications and reviewers. " +
		   "The aim was to be able to create dynamic mailing lists with the minimum of effort upon publication of a new book.",
		   "MS Access, MS Windows, MS Windows NT",
		   "Thanks again for putting together the database so well and economically ... she's made up about it. " +
		   "Even better than expected!");
writeDiv(4,"<b>CybIT</b><br>Telematics and On-line Services<br><a href=\"Javascript: void showClientSite();\">www.CybIT.co.uk<\/a>",
		   "To design and develop a website to replace their existing site.",
		   "CybIT Ltd is one of the UK's leading Telematics Service Providers. " +
		   "They had an existing website but felt it needed updating and enhancing with a new 'look and feel', improved navigation and better use of graphics. CybIT also wanted a facility to maintain certain areas of the site themselves.",
		   "DHTML, JavaScript, CSS, Adobe Photoshop and ImageReady, PHP, MySQL",
		   "The site looks good! Well done.");
writeDiv(5,"<b>Archdeacon Motors</b><br>Vehicle servicing and repairs<br><a href=\"Javascript: void showClientSite();\">www.archdeaconmotors.co.uk<\/a>",
		   "To provide an Internet presence, to give remote access to the office computer system from the clients home and to provide system support when required.",
		   "A basic web site was designed and hosted. ISDN connections were installed and used together with a custom built home computer to " +
		   "give the garage owner access to his office computer system from his home. We also provide consultancy services on issues " +
		   "such as backups, database updates and e-mail and faxing direct from the PC.",
		   "HTML, JavaScript,CSS, Networking, PC Hardware, MS Windows, MS Office, Adobe Photoshop and ImageReady, MS Access",
		   "...the designers listened to what we aimed to achieve from our site and provided us with a well designed site that met our every criteria.");
writeDiv(6,"<b>John Burn</b><br>The Tooling Industry's largest independent family owned UK supplier<br><a href=\"Javascript: void showClientSite();\">www.johnburn.co.uk<\/a>",
		   "To design and develop a website to compliment their sales literature.",
		   "John Burn wanted a professional website to compliment their sales literature and allow clients to access up-to-date information on their products and services. " +
		   "The site includes case studies, news, brochure downloads and a Post Code lookup for use in contacting local sales representatives.",
		   "HTML, CSS, JavaScript, MySQL, PHP",
		   "");
writeDiv(7,"<b>JN Casting & Production</b><br>Casting and Production<br><a href=\"Javascript: void showClientSite();\">www.jncasting.com<\/a>",
		   "To host web site and e-mail services and to supply and support PC networking.",
		   "We supplied new hardware, and upgraded existing hardware, to create a fully networked office environment with permanent Internet " +
		   "access, backup facility and shared printing. A website is currently being developed.",
		   "Microsoft Windows/Office, networking, cable modems, web/e-mail Hosting, general IT consultancy",
		   "...excellent help and advice together with value solutions. b2 are always ready and willing to help when we need them.");
writeDiv(8,"<b>Peter Reid Consulting</b><br>Specialists in European employment issues<br><a href=\"Javascript: void showClientSite();\">www.peterreidconsulting.com<\/a>",
		   "To design, develop and host web site and e-mail services.",
		   "The client was quite clear about the &#145;look and feel&#146; that they wanted. We worked with the client " +
		   "to develop a web site to meet their requirements.",
		   "Web site design, HTML, Forms, CSS",
		   "...the PRC site looks very good. Peter is really pleased.");
writeDiv(9,"<b>Philips Business Communications</b><br>International Telecommunications<br><a href=\"Javascript: void showClientSite();\">www.sopho.philips.com<\/a>",
		   "Progress report writing and system documentation",
		   "We assist PBC with Progress management report writing and provide bespoke software, reports and procedural documentation.",
		   "Progress RDBMS, Progress 4GL, HP-UX, Microsoft Office",
		   "Many thanks for your help - it's a great improvement on the old one. Thanks for looking at it so quickly.");
writeDiv(10,"<b>Arista Tubes</b><br>UK packaging manufacturer",
		   "To provide Progress and MFG/PRO development, consultancy and training.",
		   "We provide second-line support for the IT department. We develop custom management reports and provide	advice on the day-to-day running of their MFG/PRO system.",
		   "Progress, MFG/PRO, HP-UX",
		   "Many thanks for the work that you completed ... having crossed everything off the list was a great achievement ... " +
		   "he was as pleased as a Finance Director can be!");
writeDiv(11,"<b>Landmark Housing Association</b><br>Shared Housing Provider<br><a href=\"Javascript: void showClientSite();\">www.landmarkhousing.co.uk<\/a>",
		   "To design and develop a web site.",
		   "The web site is primarily a source of information for tenants so it has to be easy to find the required details. However, the " +
		   "site also has a list of currently available properties which must be up-to-date and easily maintained by the client.",
		   "PHP4, JavaScript, HTML, CSS",
		   "...very pleased. It looks great.");
writeDiv(12,"<b>The School Software Company</b><br>Educational Software Systems<br>" +
		   "<a href=\"Javascript: void showClientSite();\">www.schoolsoftwarecompany.com<\/a>",
		   "Design and development of new a web site",
		   "The School Software Company was recently launched to promote a product for use in schools and local authorities that records and reports " +
		   "on behavioural incidents. " +
		   "The site had to be simple but eye-catching, be easy to navigate and above all be fast as the target audience will often view the site over slow connections " +
		   "or with older computer equipment and software",
		   "HTML, CSS, Adobe Photoshop",
		   "...the site couldn't be better. We've had a fantastic response already.");
writeDiv(13,"<b>CRUFC</b><br>Cambridge Rugby Union Football Club<br><a href=\"Javascript: void showClientSite();\">www.crufc.co.uk<\/a>",
		   "Redesign of existing site",
		   "CRUFC had an existing site but wanted it updated to improve the overall look and feel. The new site had to be easy to maintain on a regular basis so " +
		   "we completely redesigned the site using PHP scripting to make updates to news, player and fixture lists completely reports quick and easy.",
		   "HTML, CSS, JavaScript, PHP4, PhotoShop",
		   "Thanks very much for all of your hard work, not from just me, I know that I speak for the whole Committee.  The site is excellent.");
writeDiv(14,"<b>Chiamsa Press</b><br>Publisher<br><a href=\"Javascript: void showClientSite();\">www.chiasmapress.com<\/a>",
		   "Design and development of new site",
		   "The client wanted a low cost Internet presence in the form of a basic website and associated e-mail. We created a simple but effective " + 
		   "design that allows visitors to view the website content quickly and easily.",
		   "HTML, CSS, JavaScript, Photoshop",
		   "We are delighted with the Chiasma website very many thanks for taking so much trouble with it.");
}
