var workIsDone = true;

window.onbeforeunload = confirmBrowseAway;

function confirmBrowseAway()
{
  if (!workIsDone) {
    return "PLEASE PRESS CANCEL AND THEN USE THE BACK BUTTON ON THE TOP RIGHT";
  }
}


document.write("<<div id='demodiv' style='padding-top: 15px; padding-left: 15px; border-style: solid; border-width: 1px; background-color: #fff; background-image: url(http://www.websitedeal.co.uk/templates/loadingthumbpleasewait.gif); position: absolute; left: -1000px; top: -1000px; z-index: 1002; width: 420px; height: 365px;'></div>");

var IE = document.all?true:false

if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

var livebox = 0



// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  return true
}
function golargethumb(oog)
{
var leftpos = tempX + 10;
var toppos = tempY - 100;
var imageurl = 'http://www.websitedeal.co.uk/templates/' + oog + '-demo.gif';

	if(oog == "")
	{
	livebox = 0;
	document.getElementById("demodiv").innerHTML = "";
	document.getElementById("demodiv").style.left = "-1000px";
	document.getElementById("demodiv").style.top = "-1000px";
	}
	else
	{
	if(livebox == 0)
	{
		if(leftpos > 500)
		{
		leftpos = leftpos - 500;
		}


	document.getElementById("demodiv").style.left = leftpos + "px";
	document.getElementById("demodiv").style.top = toppos + "px";
	document.getElementById("demodiv").innerHTML = "<img src='" + imageurl +  "' alt='' galleryimg='no' />";
	livebox = 1;
	}
	}
}






var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    myHeight = document.body.clientHeight;
  }


var accid;
var firsttimeloaded = true;
var y;
var x;
var rinsidecode = "";
var chosenstyle;
var chosenlayout;
var chosencolor;
var tcategories = Array();
var scategories = Array();
var industries = Array();
var numberoftemplates = Array();
var startposition;
var numberofindustries = 299;
var numberofcategories = 4;
var numberofscategories = 4;
var turl = "http://www.websitedeal.co.uk/templates/";

tcategories[0] = "corporate";
numberoftemplates["corporate"] = 16;

tcategories[1] = "alternative";
numberoftemplates["alternative"] = 8;

tcategories[2] = "dangerous";
numberoftemplates["dangerous"] = 8;

tcategories[3] = "busybusy";
numberoftemplates["busybusy"] = 8;

scategories[0] = "administrative";
scategories[1] = "tradesmen";
scategories[2] = "coaching";
scategories[3] = "therapy";

numberoftemplates["property"] = 8;
numberoftemplates["coaching"] = 8;
numberoftemplates["medical"] = 8;
numberoftemplates["tradesmen"] = 8;
numberoftemplates["recruitment"] = 8;
numberoftemplates["therapy"] = 8;
numberoftemplates["administrative"] = 8;

industries[0] = "Access consultants";
industries[1] = "Access equipment";
industries[2] = "Accident investigators";
industries[3] = "Accommodation";
industries[4] = "Accountants";
industries[5] = "Acupuncture";
industries[6] = "Advertising";
industries[7] = "Affiliate Marketing";
industries[8] = "Agriculture";
industries[9] = "Air Conditioning Installation";
industries[10] = "Air Conditioning Repair";
industries[11] = "Alternative Clothing";
industries[12] = "Alternative Energy";
industries[13] = "Aluminium Repair";
industries[14] = "Animal Day Care";
industries[15] = "Animal Health";
industries[16] = "Animals";
industries[17] = "Antique Furniture Restoration";
industries[18] = "Antiques";
industries[19] = "Architects";
industries[20] = "Architectural Metalworker";
industries[21] = "Architectural Restoration";
industries[22] = "Architectural Services";
industries[23] = "Architecture";
industries[24] = "Aromatherapy";
industries[25] = "Art";
industries[26] = "Art and Antiques Restoration";
industries[27] = "Artists";
industries[28] = "Asbestos Services";
industries[29] = "Asset Management";
industries[30] = "Au Pairs and Childcare";
industries[31] = "Auctions";
industries[32] = "Audio and Video";
industries[33] = "Auto Accessories";
industries[34] = "AutoCad Services";
industries[35] = "Automotive";
industries[36] = "Babies";
industries[37] = "Baby equipment hire";
industries[38] = "Bailiffs";
industries[39] = "Bakery";
industries[40] = "Bands And Musicians";
industries[41] = "Bathrooms";
industries[42] = "Beauty";
industries[43] = "Beauty and Fashion";
industries[44] = "Beauty and Therapies";
industries[45] = "Bed and Breakfast";
industries[46] = "Belly Dancing";
industries[47] = "Bookkeeping";
industries[48] = "Booksellers";
industries[49] = "Bouncy Castle Hire";
industries[50] = "Branding";
industries[51] = "Bridal";
industries[52] = "Building Services";
industries[53] = "Building Surveyors";
industries[54] = "Business Services";
industries[55] = "Butchers";
industries[56] = "Cake makers and decorators";
industries[57] = "Calibration Services";
industries[58] = "Car and Van Hire";
industries[59] = "Car Services";
industries[60] = "Care Services";
industries[61] = "Career Advice";
industries[62] = "Carpenters";
industries[63] = "Carpet and Upholstery Cleaning";
industries[64] = "Carpet cleaning";
industries[65] = "Carpet Fitting";
industries[66] = "Cars";
industries[67] = "Cat home care";
industries[68] = "Catering";
industries[69] = "Catering equipment suppliers";
industries[70] = "Ceiling Specialists";
industries[71] = "Central heating engineers";
industries[72] = "Charities";
industries[73] = "Chauffeur Services";
industries[74] = "Childcare";
industries[75] = "Childrens Entertainment";
industries[76] = "Chimney Cleaning";
industries[77] = "Chiropodists and Podiatrists";
industries[78] = "Chiropractic";
industries[79] = "Chiropractors";
industries[80] = "Classic Car Hire";
industries[81] = "Cleaning Services";
industries[82] = "Coaching";
industries[83] = "Commercial Mortgage Brokers";
industries[84] = "Commercial Property";
industries[85] = "Commercial Property Listings";
industries[86] = "Company Formation";
industries[87] = "Compensation Claims";
industries[88] = "Competitions";
industries[89] = "Complementary Therapies";
industries[90] = "Composers";
industries[91] = "Computer Services";
industries[92] = "Conference Services";
industries[93] = "Construction";
industries[94] = "Consulting";
industries[95] = "Contract Work";
industries[96] = "Conventions";
industries[97] = "Conveyancing";
industries[98] = "Copywriting";
industries[99] = "Corporate Entertainment";
industries[100] = "Corporate Srvices";
industries[101] = "Counselling";
industries[102] = "Courier Services";
industries[103] = "Credit Control";
industries[104] = "Customer Management";
industries[105] = "Customer Surveys";
industries[106] = "Damp Proofing";
industries[107] = "Data Services";
industries[108] = "Dating";
industries[109] = "Debt Advice";
industries[110] = "Debt Management";
industries[111] = "Decorators";
industries[112] = "Delivery Services";
industries[113] = "Demolition";
industries[114] = "Dental Services";
industries[115] = "Design";
industries[116] = "Dieting and Weight Loss";
industries[117] = "Directories";
industries[118] = "Disability Services";
industries[119] = "DIY";
industries[120] = "DJs";
industries[121] = "Dog care";
industries[122] = "Domestic Energy Assessment";
industries[123] = "Double Glazing";
industries[124] = "Drainage";
industries[125] = "Drama Classes";
industries[126] = "Dressmakers";
industries[127] = "Driveways";
industries[128] = "Driving Lessons";
industries[129] = "Dry cleaning";
industries[130] = "Ecommerce";
industries[131] = "Editorial";
industries[132] = "Education Services";
industries[133] = "Electricians";
industries[134] = "Electronics";
industries[135] = "Email Marketing";
industries[136] = "Embroidery";
industries[137] = "Employment and Jobs";
industries[138] = "Employment Law Services";
industries[139] = "Energy Management";
industries[140] = "Engineering";
industries[141] = "Engraving";
industries[142] = "Entertainment";
industries[143] = "Environmental services";
industries[144] = "Estate Agents";
industries[145] = "Event Management";
industries[146] = "Fencing Services";
industries[147] = "Feng Shui";
industries[148] = "Financial Services";
industries[149] = "Fire Safety";
industries[150] = "Fitness";
industries[151] = "Flooring";
industries[152] = "Florists";
industries[153] = "Foreign Exchange Services";
industries[154] = "Franchises";
industries[155] = "Furniture";
industries[156] = "Gardening Services";
industries[157] = "Gates and railings";
industries[158] = "Genetic Health Services";
industries[159] = "Gift Packaging";
industries[160] = "Graphic and Web Design";
industries[161] = "Graphic Design";
industries[162] = "Graphic Designers";
industries[163] = "Guest Houses";
industries[164] = "Guitar Lessons";
industries[165] = "Hair and beauty";
industries[166] = "Hairdressers";
industries[167] = "Handyman Services";
industries[168] = "Healing";
industries[169] = "Health / Medical";
industries[170] = "Health / Alternative";
industries[171] = "Health and Saftey";
industries[172] = "Heating Services";
industries[173] = "Holiday accommodation";
industries[174] = "Holidays";
industries[175] = "Holistic Therapies";
industries[176] = "Home and Garden";
industries[177] = "Homeopathy";
industries[178] = "HR Consultancy";
industries[179] = "Hydraulic Engineers";
industries[180] = "Hypnosis";
industries[181] = "Hypnotherapy";
industries[182] = "illustration";
industries[183] = "Image Consultancy";
industries[184] = "Insurance";
industries[185] = "Interior Designers";
industries[186] = "Internet Services";
industries[187] = "Interpretation and Translation";
industries[188] = "Introduction Agencies";
industries[189] = "Inventory Services";
industries[190] = "Ironing Services";
industries[191] = "IT Services";
industries[192] = "Karaoke";
industries[193] = "kitchens";
industries[194] = "Landscaping";
industries[195] = "Language services";
industries[196] = "Laser Hair Removal";
industries[197] = "Lawn Services";
industries[198] = "Law";
industries[199] = "Leaflet Delivery";
industries[200] = "Life coaching";
industries[201] = "Life Insurance";
industries[202] = "Lifestyle management";
industries[203] = "Limousine Hire";
industries[204] = "Linen and Laundry Services";
industries[205] = "Locksmiths";
industries[206] = "Loft conversions";
industries[207] = "Maintenance";
industries[208] = "Manufacturing";
industries[209] = "Market Research";
industries[210] = "Marketing";
industries[211] = "Marquee Hire";
industries[212] = "Martial Arts";
industries[213] = "Massage";
industries[214] = "Maternity";
industries[215] = "Maths Tuition";
industries[216] = "Mechanics";
industries[217] = "Medical Services";
industries[218] = "Metalwork";
industries[219] = "Minibus Hire";
industries[220] = "Modelling";
industries[221] = "Mortgage Services";
industries[222] = "multimedia";
industries[223] = "News";
industries[224] = "Nutrition";
industries[225] = "Opticians";
industries[226] = "Osteopaths";
industries[227] = "Painting and decorating";
industries[228] = "Patents and Trade Marks";
industries[229] = "Payroll";
industries[230] = "Personal Coaching";
industries[231] = "Personal Injury";
industries[232] = "Pest Control";
industries[233] = "Photographers";
industries[234] = "Physiotherapy";
industries[235] = "Plastering";
industries[236] = "Plumbing";
industries[237] = "Pregnancy and Birth";
industries[238] = "Printing";
industries[239] = "Proof reading and Editing";
industries[240] = "Property";
industries[241] = "Psychic Readings";
industries[242] = "Psychologists";
industries[243] = "Publishing Services";
industries[244] = "Real Estate";
industries[245] = "Recruitment";
industries[246] = "Reflexologist";
industries[247] = "Reiki Healers";
industries[248] = "Restaurants";
industries[249] = "Roofers";
industries[250] = "Safety";
industries[251] = "Scaffolding";
industries[252] = "Search Engines";
industries[253] = "Secretarial";
industries[254] = "security";
industries[255] = "SEO";
industries[256] = "Sheds";
industries[257] = "Sign Making";
industries[258] = "Singles";
industries[259] = "Solicitors";
industries[260] = "Speech Training";
industries[261] = "Speed Dating";
industries[262] = "Spiritual Healing";
industries[263] = "Sports";
industries[264] = "Stocks and Shares";
industries[265] = "Style Consultants";
industries[266] = "Surveyors";
industries[267] = "Tantric Massage";
industries[268] = "Tattooist";
industries[269] = "Tax advice";
industries[270] = "Taxi services";
industries[271] = "Taylors";
industries[272] = "Team Building";
industries[273] = "Technical communication";
industries[274] = "Telecommunications";
industries[275] = "Telemarketing";
industries[276] = "Telephone Answering Service";
industries[277] = "Therapy and alternative health";
industries[278] = "Therapy, mentoring and coaching";
industries[279] = "Tiling Services";
industries[280] = "Tradesmen";
industries[281] = "Training";
industries[282] = "Transcription";
industries[283] = "Translation";
industries[284] = "Travel and Tourism";
industries[285] = "Tree surgury";
industries[286] = "Upholsterers";
industries[287] = "Venue Hire";
industries[288] = "Veterinary Services";
industries[289] = "Video";
industries[290] = "Virtual Office Assistants";
industries[291] = "Web development";
industries[292] = "Web Hosting";
industries[293] = "Website Audio";
industries[294] = "Website Design";
industries[295] = "Wedding Services";
industries[296] = "weight control";
industries[297] = "Welding";
industries[298] = "Window Cleaning";



function gobackonestep()
{

	if(wherehavewebeencounter == 0)
	{
	gonullify();
	}
	else
	{
	wherehavewebeencounter -= 2;
	showtemplates(wherehavewebeen[(wherehavewebeencounter + 1)]);
	}
}

function gostyle(oog)
{
chosenstyle = oog.toLowerCase();




switch(chosenstyle)
{
case "coaching":
case "life coaching":
case "lifestyle management":
case "personal coaching":
case "psychologists":
case "style consultants":
case "therapy, mentoring and coaching":
chosenstyle = "coaching";
break;

case "animal day care":
case "animal health":
case "animals":
case "art":
case "art and antiques restoration":
case "artists":
case "au pairs and childcare":
case "babies":
case "baby equipment hire":
case "bakery":
case "bands And musicians":
case "belly dancing":
case "bouncy castle hire":
case "butchers":
case "bake makers and decorators":
case "bridal":
case "cat home care":
case "childcare":
case "childrens entertainment":
case "composers":
case "design":
case "dog care":
case "feng shui":
case "florists":
case "fitness":
case "gift Packaging":
case "graphic and web design":
case "graphic design":
case "graphic designers":
case "holidays":
case "illustration":
case "image consultancy":
case "interior designers":
case "introduction agencies":
case "marquee hire":
case "maths tuition":
case "restaurants":
case "singles":
case "style consultants":
case "travel and tourism":
case "wedding services":
case "alternative":
chosenstyle = "alternative";
break;


case "administrative":
case "accountants":
case "mortgage services":
case "commercial mortgage brokers":
case "bookkeeping":
case "compensation claims":
case "credit control":
case "customer management":
case "customer surveys":
case "debt advice":
case "debt management":
case "employment law services":
case "financial services":
case "insurance":
case "inventory services":
case "law":
case "personal injury":
case "virtual office assistants":
case "telephone answering service":
case "solicitors":
case "secretarial":
case "payroll":
case "property":
case "architects":
case "architectural restoration":
case "architectural services":
case "architecture":
case "mortgage services":
case "building surveyors":
case "commercial mortgage brokers":
case "commercial property":
case "commercial property listings":
case "conveyancing":
case "estate agents":
case "holiday accommodation":
case "property":
case "real estate":
case "surveyors":
chosenstyle = "administrative";
break;


case "dangerous":
case "tattooist":
case "djs":
case "karaoke":
case "guitar lessons":
case "dangerous":
chosenstyle = "dangerous";
break;

case "busybusy":
break;

case "medical":
case "dental services":
case "chiropodists and podiatrists":
case "chiropractic":
case "chiropractors":
case "health / medical":
case "maternity":
case "medical Services":
case "nutrition":
case "opticians":
case "osteopaths":
case "pregnancy and birth":
case "weight control":
case "veterinary services":
case "therapy":
case "therapy and alternative health":
case "acupuncture":
case "aromatherapy":
case "beauty":
case "beauty and fashion":
case "beauty and therapies":
case "complementary therapies":
case "counselling":
case "dieting and weight Loss":
case "healing":
case "health / alternative":
case "holistic therapies":
case "homeopathy":
case "hypnosis":
case "hypnotherapy":
case "laser hair removal":
case "massage":
case "psychic readings":
case "reflexologist":
case "reiki healers":
case "spiritual healing":
case "tantric massage":
case "physiotherapy":
chosenstyle = "therapy";
break;


case "tradesmen":
case "building services":
case "architectural Metalworker":
case "asbestos Services":
case "carpenters":
case "carpet and upholstery cleaning":
case "carpet cleaning":
case "carpet fitting":
case "ceiling specialists":
case "central heating engineers":
case "cleaning services":
case "construction":
case "damp proofing":
case "decorators":
case "demolition":
case "diy":
case "double glazing":
case "drainage":
case "driveways":
case "dry cleaning":
case "electricians":
case "electronics":
case "engineering":
case "engraving":
case "fencing services":
case "flooring":
case "gardening services":
case "gates and railings":
case "heating services":
case "handyman services":
case "landscaping":
case "lawn services":
case "locksmiths":
case "loft conversions":
case "maintenance":
case "mechanics":
case "metalwork":
case "painting and decorating":
case "pest control":
case "plastering":
case "plumbing":
case "roofers":
case "scaffolding":
case "sheds":
case "sign making":
case "tiling services":
case "tradesmen":
case "tree surgury":
case "upholsterers":
case "Welding":
case "Window cleaning":
chosenstyle = "tradesmen";
break;



default:
chosenstyle = "corporate";
break;
}





startposition = numberoftemplates[chosenstyle];
workIsDone = false;
showtemplates("Choose your Layout");
}
function goskiplayouts(oog)
{
startposition = oog;
showtemplates("Choose your Layout");
}
function gocolors(oog)
{
workIsDone = false;
golargethumb("");
chosenlayout = oog;
showtemplates("Choose your Colours");
}
function gocomplete(oog)
{
workIsDone = false;
golargethumb("");
chosencolor = oog;
showtemplates("Complete your Order");
}
function gogetstarted(oog)
{
showtemplates("Choose your Style");
}


function showtemplates(oogie)
{
rinsidecode = "";

	switch(oogie)
	{
	case "View Demo":
	workIsDone = true;
	rinsidecode += democode;

	break;

	case "Choose your Style":
	workIsDone = true;
	rinsidecode += "<table cellspacing='0' cellpadding='0' style='padding: 0px; margin: 0px; border-style: none;'><tr><td colspan=4 height='8'>&nbsp;</td></tr><tr><td colspan=4 align='left'><span style='" + titlefontstyling + "'>1. Choose your Style</span></td></tr><tr><td colspan=4 height=5></td></tr><tr>";

	for(x = 0; x < numberofcategories; x++)
	{
	rinsidecode += "<td width='230' align='left'><a style='cursor: pointer; cursor: hand;' onclick='javascript: gostyle(\"" + tcategories[x] + "\");'><img style='padding: 0px; margin: 0px; border-style: none;' src='" + turl + tcategories[x] + "-" + maincolour + ".gif'></a></td>";
	}

	rinsidecode += "</tr></table><table cellspacing='0' cellpadding='0' style='padding: 0px; margin: 0px; border-style: none;'><tr>";
	for(x = 0; x < numberofcategories; x++)
	{
	rinsidecode += "<td width='230' align='left'><div"; 

	if(x == 1)
	{
	rinsidecode += " style='margin-left: 20px;'";
	}

	rinsidecode += "><a style='cursor: pointer; cursor: hand;' onclick='javascript: gostyle(\"" + scategories[x] + "\");'><img style='padding: 0px; margin: 0px; border-style: none;' src='" + turl + scategories[x] + ".gif'></a></div></td>";
	}


	rinsidecode += "</tr></table><p style='text-align: left; width: 920px;'><img style='padding: 0px; margin: 0px; border-style: none;' src='" + turl + "orchoosebyindustry.gif'></p>";



	rinsidecode += "<table cellspacing='0' cellpadding='0' style='padding: 0px; margin: 0px; border-style: none;'><tr><td align='left' width='230>";

	for(x = 0; x < numberofindustries; x++)
	{

		if ((x % 75) == 0 && x != 0)
		{
		rinsidecode += "</td><td width='230' align='left' valign='top'>";
		}

	rinsidecode += "<p><a style='cursor: pointer; cursor: hand;' onclick='javascript: gostyle(\"" + industries[x] + "\");'><span style='font-weight: bold; font-family: arial; font-size: 12px;'>" + industries[x] + "</span></a></p>";
	}

	rinsidecode += "</td></tr></table>";
	rinsidecode += "<p style='text-align: left; width: 850px; padding-right: 80px; font-family: arial; font-size: 12px;'><br /><br />&copy; Copyright 2008. Please note that all the above layouts are registered with the UK Copyright Service and full permission by the owners is required for any use. Such permission may be obtained as part of a standard hosting agreement without which all uses including any modifications are strictly prohibited.</p><p><br /><br /></p>";

	break;



	case "Choose your Layout":

	rinsidecode += "<table style='width: 900px; padding: 0px; margin: 0px; border-style: none;'><tr><td colspan=4 align='left'><table style='width: 900px; padding: 0px; margin: 0px; border-style: none;'><tr><td align='left' width=800><span style='" + titlefontstyling + "'>2. Choose your Layout</span><div style='clear: both; margin-top: 10px;'></div><span style='" + mainfontstyling + "'>Please click to choose a layout below, bearing in mind that you will be able to replace colours and images later on.</span><td><td width=210 align='right'><table style='padding: 0px; margin: 0px;'><tr><td height=35></td></tr><tr><td width='140' align='left'>";

	if(numberoftemplates[chosenstyle] > 8)
	{
	var numberofeights = numberoftemplates[chosenstyle] / 8;
	rinsidecode += "<span style='" + mainfontstyling + "'><b>More&nbsp;layouts:</b>&nbsp;&nbsp;";

		for(y = 0; y < numberofeights; y++)
		{
		rinsidecode += "<a style='cursor: pointer; cursor: hand;";

			if(((y * 8) + 8) == startposition)
			{
			rinsidecode += " color: #cccccc;";
			}

		rinsidecode += "' onclick='javascript: goskiplayouts(" + ((y * 8) + 8) + ")'>" + ((y * 8) + 1) + "-" + ((y * 8) + 8) + "</a>&nbsp;&nbsp;";
		}

	rinsidecode += "</span>";
	}



	rinsidecode += "</td><tr></table></td></tr></table></td></tr><tr>";

	for(x = startposition; x > (startposition - 8); x--)
	{
	rinsidecode += "<td><a onmouseout='golargethumb(\"\")' onmouseover='golargethumb(\"" + chosenstyle + "/l" + x + "/l" + x + "c1i1\")' onclick='javascript: gocolors(" + x + ")' style='cursor: pointer; cursor: hand;'><img width='200' height='175' src='" + turl + chosenstyle + "/l" + x + "/l" + x + "c1i1.gif' style='padding: 0px; margin: 0px; border-style: solid; border-width: 1px; border-color: #ccc;'></a></td>";

		if(x == 1 || x == 5 || x == 9 || x == 13 || x == 17 || x == 21)
		{
		rinsidecode += "</tr><tr><td colspan=4 height=7></td></tr><tr>";
		}
	}

	rinsidecode += "</tr><tr><td colspan=4 align='left'><table style='padding: 0px; margin: 0px;' width=100%><tr><td width=200>";


	if(numberoftemplates[chosenstyle] > 8)
	{
	var numberofeights = numberoftemplates[chosenstyle] / 8;
	rinsidecode += "<span style='" + mainfontstyling + "'><b>More&nbsp;layouts:</b>&nbsp;&nbsp;";

		for(y = 0; y < numberofeights; y++)
		{
		rinsidecode += "<a style='cursor: pointer; cursor: hand;";

			if(((y * 8) + 8) == startposition)
			{
			rinsidecode += " color: #cccccc;";
			}

		rinsidecode += "' onclick='javascript: goskiplayouts(" + ((y * 8) + 8) + ")'>" + ((y * 8) + 1) + "-" + ((y * 8) + 8) + "</a>&nbsp;&nbsp;";
		}

	rinsidecode += "</span>";
	}


	rinsidecode += "</td><td width=700 align='right'><span style='" + mainfontstyling + "'>&copy Copyright 2008. All layouts are registered with the <a target='_blank' style='color: #888; text-decoration: none' href='http://www.copyrightservice.co.uk/'>UK Copyright Service</a> and permission by the owners is required for any use.</td></tr></table></td></tr></table>";
	break;


	case "Choose your Colours":

	rinsidecode += "<table style='width: 900px; padding: 0px; margin: 0px; border-style: none;'><tr><td colspan=4 align='left'><table style='width: 900px; padding: 0px; margin: 0px; border-style: none;'><tr><td align='left' width=800><span style='" + titlefontstyling + "'>3. Choose your Colours</span></td></tr><tr><td colspan=4 height=5></td></tr><tr><tr><td colspan=4 align='left'><span style='" + mainfontstyling + "'>Please click to choose a colour below, bearing in mind that we can adjust them as well as replace images later on.</span><td><td width=140 align='right'></td></tr></table></td></tr><tr><td colspan=4 height=15></td></tr><tr>";


	for(x = 1; x <= 4; x++)
	{
	rinsidecode += "<td><a onmouseout='golargethumb(\"\")' onmouseover='golargethumb(\"" + chosenstyle + "/l" + chosenlayout + "/l" + chosenlayout + "c" + x + "i1\")' onclick='javascript: gocomplete(" + x + ")' style='cursor: pointer; cursor: hand;'><img src='" + turl + chosenstyle + "/l" + chosenlayout + "/l" + chosenlayout + "c" + x + "i1.gif' style='border-style: solid; border-width: 1px; border-color: #ccc;'></a></td>";
	}

	rinsidecode += "</tr><tr><td colspan=4 height=20></td></tr><tr><td colspan=4 align='left'><table style='padding: 0px; margin: 0px;' width=100%><tr><td width=150></td><td width=700 align='right'><span style='" + mainfontstyling + "'>&copy Copyright 2008. All layouts are registered with the <a target='_blank' style='color: #888; text-decoration: none' href='http://www.copyrightservice.co.uk/'>UK Copyright Service</a> and permission by the owners is required for any use.</span></td></tr></table></td></tr></table>";
	break;


	case "Complete your Order":

	rinsidecode += "<table style='width: 900px; padding: 0px; margin: 0px; border-style: none;'><tr><td colspan=4 align='left'><table style='width: 900px; padding: 0px; margin: 0px; border-style: none;'><tr><td align='left' width=800><span style='" + titlefontstyling + "'>4. Complete your Order</span></td></tr><tr><td colspan=4 height=5></td></tr><tr><tr><td colspan=4 align='left'><span style='" + mainfontstyling + "'>Please fill out our quick form and we will be in touch to finalise your order.</span><td><td width=140 align='right'></td></tr></table></td></tr><tr><td colspan=4 height=15></td></tr><tr><tr><td colspan=4><table style='margin: 0px; padding: 0px; width: 900px;'><tr><td width=450><iframe frameborder='no' scrolling='no' height='350' width='400' src='http://www.websitedeal.co.uk/clever/completeorder.php?checkid=" + checkid + "&affid=" + affid + "&refid=" + refid + "&chosenfile=" + turl + chosenstyle + "/l" + chosenlayout + "/l" + chosenlayout + "c" + chosencolor + "i1-demo.gif'></iframe></td><td align='right'><img style='border-style: solid; border-width: 1px; border-color: #ccc;' src='" + turl + chosenstyle + "/l" + chosenlayout + "/l" + chosenlayout + "c" + chosencolor + "i1-demo.gif'></td></tr></table></td></tr><tr></tr><tr><td colspan=4 height=20></td></tr></table>";

	break;

	case "Testimonials":
	rinsidecode += "<table style='width: 930px; padding: 0px; margin: 0px; border-style: none;'><tr><td width='170' align='left'><img style='border-style: solid; border-color: #bbb; border-width: 1px;' src='http://www.reyus.com/images/t-deangrimshaw.jpg' alt='' /></td><td width='280' align='left' valign='top'><p style='" + mainfontstyling + "'><b>Dean Grimshaw</b><br /><br />\"I can't complement them enough on what they have achieved. If I am honest, I was very skeptical of how good the final draft would be at first as I had very little understanding of web design. However, I am very pleasantly surprised with the results and am also hugely grateful for the level of support they provided throughout.\"<br /><br /><a style='" + linkstyling + "' target='_blank' href='http://www.warriorcoaching.co.uk'>http://www.warriorcoaching.co.uk</a></p></td><td width='30'></td><td width='170' align='left'><img src='http://www.reyus.com/images/t-karenblumenfeld.jpg' style='border-style: solid; border-color: #bbb; border-width: 1px;' alt='' /></td><td width='280' align='left' valign='top'><p style='" + mainfontstyling + "'><b>Karen Blumenfeld</b><br /><br />\"My colleagues and I are all delighted with the website, which is already receiving some great compliments from visitors! The team has been very helpful in supporting and empowering us to get the results we wanted and I am still most surprised that there were no hidden charges whatsoever!\"<br /><br /><a style='" + linkstyling + "' target='_blank' href='http://www.haletherapy.co.uk'>http://www.haletherapy.co.uk</a></p></td></tr><tr><td colspan='7' height=20></td></tr><tr><td width='170' align='left'><img style='border-style: solid; border-color: #bbb; border-width: 1px;' src='http://www.reyus.com/images/t-suesmith.jpg' alt='' /></td><td width='280' align='left' valign='top'><p style='" + mainfontstyling + "'><b>Sue Smith</b><br /><br />\"Getting my website built and developed has been an all-round fantastic experience. It has left me with that warm, fuzzy feeling you get when you discover that you have found a real bargain!\"<br /><br /><a style='" + linkstyling + "' target='_blank' href='http://www.purepotential.me.uk'>http://www.purepotential.me.uk</a></p></td><td width='30'></td><td width='170' align='left'><img src='http://www.reyus.com/images/t-paul-lane.jpg' style='border-style: solid; border-color: #bbb; border-width: 1px;' alt='' /></td><td width='280' align='left' valign='top'><p style='" + mainfontstyling + "'><b>Paul Lane</b><br /><br />\"I am genuinely impressed with the value packed into this service. The website has matched my requirements and is also easy to manage. The team has been flexible and responsive when dealing with additional requests and the result is one that I am sure I could have paid a lot more money for!\"<br /><br /><a style='" + linkstyling + "' target='_blank' href='http://www.lanegraham.co.uk/'>http://www.lanegraham.co.uk/</a></p></td></tr><tr><td colspan='7' height=20></td></tr><tr><td width='170' align='left'><img style='border-style: solid; border-color: #bbb; border-width: 1px;' src='http://www.reyus.com/images/t-mikeball.jpg' alt='' /></td><td width='280' align='left' valign='top'><p style='" + mainfontstyling + "'><b>Mike Ball</b><br /><br />\"You have turned the daunting prospect of creating a new website into a pleasure. With great advice and input at every stage, nothing was too much trouble and the end result is simply amazing!\"<br /><br /><a style='" + linkstyling + "' target='_blank' href='http://www.goodtimesdj.co.uk'>http://www.goodtimesdj.co.uk</a></p></td><td width='30'></td><td width='170' align='left'><img src='http://www.reyus.com/images/t-andyolsen.jpg' style='border-style: solid; border-color: #bbb; border-width: 1px;' alt='' /></td><td width='280' align='left' valign='top'><p style='" + mainfontstyling + "'><b>Andy Olsen</b><br /><br />\"They've transformed my site from something that wasn't working into more of a marketing tool for my business. It looks great, it's doing much better on search engines, it's easy to edit and they have set up some very useful features such as visitor stats. I got more than I hoped for and will be recommending them whenever that opportunity arises\"<br /><br /><a style='" + linkstyling + "' target='_blank' href='http://www.risingdamp.com/'>http://www.risingdamp.com/</a></p></td></tr></table>";

	break;



	default:
	oogie = "Offer";
	workIsDone = true;
	rinsidecode += offercode;
	break;
	}

	if(firsttimeloaded == true)
	{
	firsttimeloaded = false;
	document.getElementById("rdiv").style.left = '0px';
	document.getElementById("rdiv").style.top = '0px';
	document.getElementById("rdiv").style.height = (myHeight - 20) + "px";
	}

document.getElementById("rdiv").innerHTML = clientheader + "<table width='100%'><tr><td align='center'>" + rinsidecode + "<td></tr></table>";

	if(oogie != wherehavewebeen[wherehavewebeencounter])
	{
	wherehavewebeencounter += 1;
	wherehavewebeen[wherehavewebeencounter] = oogie;
	}
}


