// JavaScript Document
var lastNav;

function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}

function submitForm(src)	{
	document.getElementById(src).submit();
}

function tdClick(src){
	// first close any open dropdowns
	var obj		= document.getElementById("arrow" + src);
	var obj2	= document.getElementById("nav_close_text");
	var str = obj.src;
	if (str.indexOf("_open.gif") == -1)	{
		if (str.indexOf("_closed.gif") == -1)	{
			obj.src = str.replace(/_close/,"_open");
			eval("collapse" + src + ".slidedown()");
			obj2.innerHTML = "Open Navigation";
		} else {
			obj.src = str.replace(/_closed/,"_open");
			eval("collapse" + src + ".slidedown()");
			obj2.innerHTML = "Open Navigation";			
		}
	} else {		
		obj.src = str.replace(/_open/,"_close");
		eval("collapse" + src + ".slideup()");		
		obj2.innerHTML = "Close Navigation";		
	}
	
}

function swap_nav(target_link)	{
	
	// Set effects durations
	Effect.DefaultOptions.duration = 1;
	Effect.Queues.interval = 200;		

	// Fade out --> Fade In
	new Effect.Fade('portfolio_' + lastNav, { queue: { position: 'end', scope: 'clients',limit: 2 } });	
	new Effect.Appear('portfolio_' + target_link, { queue: { position: 'end', scope: 'clients',limit: 2 } });

	// Update link colours
	document.getElementById("link_"+ lastNav).className = "blackNav1_img";
	document.getElementById("link_"+ target_link).className = "blackNav1_img_selected";
	
	var last_highlight = new String(document.getElementById("link_"+ lastNav).innerHTML);
	last_highlight = last_highlight.substring(0,(last_highlight.length -5));

	document.getElementById("link_"+ lastNav).innerHTML = last_highlight;
	
	document.getElementById("link_"+ target_link).innerHTML = document.getElementById("link_"+ target_link).innerHTML + " &gt;";	


	lastNav = target_link;
}

function showText(src,sText)	{
	var obj = document.getElementById(src);
	switch (src)	{
		case "clientTestimonial":
			obj.innerHTML = getTestimonials(sText);
			break;
		case "clientList":
			obj.innerHTML = getClients(sText);
			break;
	}
}

function getTestimonials(sType)	{
	var retStr = "";
	switch (sType)	{
		case "Deadlines & designs" :
				retStr = retStr + "&quot;Well done and thanks for all your hard work, both within the call ";
				retStr = retStr + "of duty and several times beyond it - your input and commitment has ";
				retStr = retStr + "been appreciated by all involved.";
 				retStr = retStr + "<br/><br/>";
				retStr = retStr + "You have helped make it simpler through consistent meeting of "; 
				retStr = retStr + "deadlines, cracking designs (in both senses of the phrase), and ";
				retStr = retStr + "understanding how our technology needs to work. It has been a ";
				retStr = retStr + "pleasure working with you on this project ? Thank you !&quot;";
 				retStr = retStr + "<br/><br/>";				
				retStr = retStr + "<h6><strong>David Littlejohns</strong><br/>";
				retStr = retStr + "Partner Programme Director. IT Shed</h6>"
				break;
		case "Brand & Style" :
				retStr = retStr + "&quot;From the moment we briefed Martin we felt he understood our brand ";
				retStr = retStr + "and style and what we hoped to achieve from our website.";
				retStr = retStr + "<br/><br/>";				
				retStr = retStr + "Not only did it need to explain our offering, ";
				retStr = retStr + "in the right tone of voice, to our market, "; 
				retStr = retStr + "it needed to be easy to use, engage our candidates ";
				retStr = retStr + "and convey to them that we were friendly and professional.&quot;";
				retStr = retStr + "<br/><br/>";				
				retStr = retStr + "<h6><strong>Jane Graves</strong><br/>";
				retStr = retStr + "Partner, BarkerGraves Recruitment</h6>"
				break;
		case "One step ahead" :
				retStr = retStr + "&quot;The team at South have done an outstanding job on our website.";
				retStr = retStr + "<br/><br/>";				
				retStr = retStr + "Aside from their undoubted creativity they were always ";
				retStr = retStr + "one step ahead in anticipating our needs at every turn. They have a really "; 
				retStr = retStr + "professional team and are a pleasure to work with.&quot; ";
				retStr = retStr + "<br/><br/>";				
				retStr = retStr + "<h6><strong>Ian Windle</strong><br/>";
				retStr = retStr + "Managing Director, LiveChange</h6>"
				break;
		case "Satisfaction"	:
				retStr = retStr + '"SouthDesign has done the construction, design and upkeep of my site. I ';
				retStr = retStr + "couldn't be more satisfied with the results of my relationship with them.";
				retStr = retStr + "<br/><br/>";
				retStr = retStr + "My site is designed for a small, yet important, selection of viewers who use ";
				retStr = retStr + "it as a guide to my work both past and present.";
				retStr = retStr + "<br/><br/>";
				retStr = retStr + "I have received countless comments from clients who I've directed to my ";
				retStr = retStr + "site for information who have told me how well designed and informative the site is.&quot;";
				retStr = retStr + "<br/><br/>";
				retStr = retStr + "<h6><strong>Craig Leon, Producer, EMI</strong><br/>";
				retStr = retStr + "Atlas Realisations Music</h6>";		
				break;				
		case "Solid advice1"	:
				retStr = retStr + "&quot;All we desired was a highly professional web presence with a modern look and feel that is both easy to navigate and maintain.<br/><br/>"
				retStr = retStr + "More than anything, we knew exactly what we did not want to see. South listened very carefully and presented us with various options, closely matching our expectations, within days.<br/><br/>";
				retStr = retStr + "All our requests for subsequent changes and little tweaks throughout the build were taken on board immediately and unconditionally, with solid advice on do's and don'ts of web site design&#8230;";
				retStr = retStr + "<a href=javascript:showText('clientTestimonial','SolidAdvice2') class='testimonials'> [read more]</a>";
				break;
		case "SolidAdvice2"	:
				retStr = retStr + "&#8230;We are absolutely delighted with the final result and strongly believe that we now have the corporate image we were looking for at the outset.<br/><br/>";
				retStr = retStr + "The early feedback we have had from our partners, customers and prospects has been extremely positive and we have no hesitation in recommending South to others, or indeed calling upon them again for any web development work we would require in the future.&quot;<br/><br/>";
				retStr = retStr + "<h6><strong>Sander Harr</strong><br/>Sr Business Consultant & Co. Founder<br/>Foster Maccallum</h6>";
				break;						
		case "Quality"	:
				retStr = retStr + "&quot;Consistently delivering high-quality creative over the years, on time and budget, ";
				retStr = retStr + "and with a cheery professionalism that's all too rare in our industry.&quot;<br/><br/>";
				retStr = retStr + "<h6><strong>Simon Platman</strong><br/>";
				retStr = retStr + "Creative Director<br/>";
				retStr = retStr + "Tidalwave Technology</h6>";
				break;
		case "Efficient & friendly"	:
				retStr = retStr + "&quot;SouthDesign consistently produce work to the highest standards, within short deadlines";
				retStr = retStr + " and budget, always with an efficient and friendly manner.&quot;<br/><br/>";
				retStr = retStr + "<h6><strong>Stephen Banfield</strong><br/>";
				retStr = retStr + "Woodway Group</h6>";		
				break;
		case "Exciting"	:
				retStr = retStr + "&quot;Working with South has been an exciting and deeply rewarding experience. Until now";
				retStr = retStr + " I have been fumbling my way through design concepts and software with limited degrees of success.<br/><br/>";
				retStr = retStr + "South have enabled me to make the best use of my time. Their knowledge of both hardware";
				retStr = retStr + " and software has given me a new outlook on design and conceptualisation for my company.<br/><br/>";
				retStr = retStr + "I would highly recommend their services on both a professional and personal level.&quot;<br/><br/>";
				retStr = retStr + "<h6><strong>Neil Hart</strong><br/>";
				retStr = retStr + "Brand Co-Ordinator<br/>";
				retStr = retStr + "The Academy of Contemporary Music</h6>";
				break;		
		case "Innovation"	:
				retStr = retStr + "&quot;You have done your homework and have delivered a website design which is on brand, yet pushes the boundary of innovation.<br/><br/>";
				retStr = retStr + "As ever, it's been great to work with someone that actually delivers on time and is a real team player.&quot;<br/><br/>";
				retStr = retStr + "<h6><strong>Mark Copeman</strong><br/>";
				retStr = retStr + "Operations Director<br/>";
				retStr = retStr + "MCB Digital</h6>";
																										
				break;
		case "Amazingly helpful"	:
				retStr = retStr + "&quot;Easy to deal with and not too stressful is an understatement - you have been ";
				retStr = retStr + "amazingly helpful and patient and I am delighted with the finished product.&quot;<br/><br/>";
				retStr = retStr + "<h6><strong>Louise Bloor</strong><br/>";
				retStr = retStr + "Louise Bloor Perfumes</h6>";
				break;		
	}
	return retStr;
}