// Solving International UK
var text1 = "<span class='functionalHeading'>Retail</span><ul><li>J Sainsbury</li><li>The Cooperative Group</li><li>Casino</li><li>Ahold-JMR</li><li>Auchan</li><li>New Look</li><li>Debenhams</li><li>Pinault Printemps Redoute (PPR)</li><li>GUS</li></ul>";
var text2 = "<span class='functionalHeading'>Consumer Goods </span><ul><li>Tetra Pak</li><li>Unilever</li><li>Danone</li><li>Yoplait</li><li>Heineken </li></ul>";
var text3 = "<span class='functionalHeading'>Distribution &amp; Services </span><ul><li>3663 - First for Foodservice </li><li>Exel</li><li>Belron International </li><li>Sodexho</li><li>Accor</li></ul>";
var text4 = "<span class='functionalHeading'>The Chairman</span><p><span class='functionalHeading'>For example:</span></p><span class='functionalHeading'>A diverse multi-channel retail and distribution group </span><p>Solving provided objective and fact based advice on how to maximise leverage and business performance across 3 distinct business units.</p>";
var text5 = "<span class='functionalHeading'>The Chief Executive</span><p><span class='functionalHeading'>For example:</span></p><span class='functionalHeading'>A leading hotel and food services business</span><p>Solving helped to galvanise and drive a broad portfolio of performance improvement initiatives and ensure   that the projects were fully aligned with company strategy. </p>";
var text6 = "<span class='functionalHeading'>The Board of Directors</span><p><span class='functionalHeading'>For example:</span></p><p>Solving supported the top management in the development of a cohesive business strategy that gained total cross-functional commitment.</p><p>Solving then provided programme management and technical assistance to drive the implementation. </p>";
var text7 = "";
var text8 = "<span class='functionalHeading'>The Investment Community </span><p>Solving work alongside Private Equity firms and Corporate Finance advisors to support commercial due dilligence activities and transactions. Solving provide specialist subject matter expertise and knowledge for specific targets or sectors.</p>";
var textOutake = "Solving's input is typically focussed on specific targets or sectors where our consultants have specialist subject matter expertise or knowledge.";
var text9 = "<span class='functionalHeading'>Finance Director</span><p>Review of customer and product profitability to determine where the real money is made or lost. </p>";
var text10 = "<span class='functionalHeading'>Sales &amp; Marketing Director</span><p>Using Solving's unique Customer Value Analysis techniques, we defined new processes to improve the effectiveness of commercial and sales force activity. </p>";
var text11 = "<span class='functionalHeading'>Manufacturing Director</span><p>Application of world-class operations management processes and techniques within a series of pilot manufacturing plants, and subsequent roll-out across the whole division on a Global basis.  </p>";
var text12 = "<span class='functionalHeading'>Supply Chain Director</span><p>Working for the Group centre of procurement, Solving undertook a strategic review of procurement, and subsequently implemented both 'quick win' improvements and sustainable new processes. </p><p>Seeking an integrated plan for replenishment and visibility of demand across numerous international markets. This client used Solving to support the strategic development and implementation  for an advanced supply chain planning operation encompassing people, processes and technology. </p>";
var text13 = "<span class='functionalHeading'>Logistics Director</span><p>Strategic review of a highly complex supplier, manufacturing, distribution and retail network to determine the optimum structure for the supply chain and logistics network. Evaluation of a flexible and phased migration plan over a seven year horizon to move from the current infrastructure to the future vision. Comprehensive modelling of options and business scenarios at each stage. </p>";
var text14 = "<span class='functionalHeading'>IT Director</span><p>Technology is often at the core of many major business improvement programmes, yet the technology is rarely the constraint for successful implementation. For the CIO, Solving helped design the implementation strategy for a major organisational change involving the development of streamlined processes, vendor selection and application of 'best of breed' software. </p>";
var text15 = "";
var text16 = "";
var ref1Array=new Array('text1','text2','text3','text4','text5','text6','text7','text8');
var ref2Array=new Array('text9','text10','text11','text12','text13','text14','text15','text16');

function showText(objectName,ref) {
document.getElementById('ref1').innerHTML='';
/*
var obj;
switch(objectName) {
		case 'ref1':
			for (var i=0; i<ref1Array.length; i++) {
				obj=document.getElementById(ref1Array[i]);
				if (obj != null && ref1Array[i]!='text'+ref) {
					obj=obj.style;
					obj.visibility='hidden';
					obj.height='0px';
				} else {
					obj=obj.style;
					obj.visibility='visible';
					obj.height='auto';
					obj.top='0px';
				}
			}
		break;
		case 'ref2':
			for (var i=0; i<ref2Array.length; i++) {
				obj=document.getElementById(ref2Array[i]);
				if (obj != null && ref2Array[i]!='text'+ref) {
					obj=obj.style;
					obj.visibility='hidden';
					obj.height='0px';
				} else {
					obj=obj.style;
					obj.visibility='visible';
					obj.height='auto';
				}
			}
		break;
	}
	*/
	var obj
	obj=document.getElementById(objectName);
	objclear=document.getElementById("ref2");
	objclear.innerHTML = "";
	if (obj != null) {
		//obj.innerHTML = unescape(newText);
		var newText = eval("text"+ref);
		obj.innerHTML = newText;
	}
}
function setText(obj) {
var subj = document.getElementById('subjectHeading');
var mid = document.getElementById('midColumn');
var w = obj.id;
var srcSubjObjName = w+'Heading';
var srcMidObjName = w+'Body';
subj.innerHTML=document.getElementById(srcSubjObjName).innerHTML;
mid.innerHTML=document.getElementById(srcMidObjName).innerHTML;
}
function ssControl() {
	var obj=document.getElementById('ss');
	if (obj != null) {
		var txt = obj.value;
		if (txt=="Search..") {
			obj.value="";
		} else {
			
		}
	}
}
function loading(s,n) {
	//window.document.sq.SetVariable("xhr_msg", n); window.document.sq.SetVariable("xhr_loading", s);
	}
var div='';
var pathForTheRecord='';
if( !window.XMLHttpRequest && window.ActiveXObject ) {
	window.XMLHttpRequest = function() {
	var a = [ 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.5.0' ],
	i = a.length; while(i--) {
	try {
	return new ActiveXObject( a[i] );
	} catch (e) { }
	}
	return null;
	};
}
var rsa = new Array("uninitialized","loading","loaded","interactive","");
var xmlhttp;
if( window.XMLHttpRequest ) {
 xmlhttp = new XMLHttpRequest();  
}

if( !xmlhttp ) {
var obj=document.getElementById('xhrReport');
obj.innerHTML='';
}

function createXMLHttpObject() {
	if( window.XMLHttpRequest ) {
	xmlhttp = new XMLHttpRequest();
	}
}
function getInterface(path,d) {
	if (path) {
		//alert(path);
		loading('1',rsa[xmlhttp.readyState]);
		div=d;
		pathForTheRecord=path;
		if (path.indexOf('?')>0) {
			path+='&div='+d;
		} else {
			path+='?div='+d;
		}
		path += '&func=ajax';
		//alert(path);
		xmlhttp = false;
		createXMLHttpObject();
		xmlhttp.open("GET", path,true);
		xmlhttp.onreadystatechange = setAnyInnerHtml;
		xmlhttp.initialise;
		xmlhttp.send(null);
	} else {
		alert("Cannot retrieve interface data. No path!");
	}
}

function message(txt) {
	var obj = document.getElementById('content1Wide');
	if (obj!=null) {
		obj.innerHTML=txt;
	}
}
function setAnyInnerHtml() {
		if (xmlhttp.readyState == 4) {
			if (xmlhttp.status == 200) {
				//alert('set HTML: '+div);
				//alert('div: '+div+"\n"+xmlhttp.responseText);
				if (div != 'evaluate') { 
					populate(div,xmlhttp.responseText)
				} else {
					var str = xmlhttp.responseText;
					eval(str);
				}
				loading('0',rsa[xmlhttp.readyState]);
				var xhrObj=document.getElementById('xhrReport');
				if (xhrObj != null) {
					var lastPageRecord="index.php";
					var p = pathForTheRecord.substr(pathForTheRecord.indexOf('p=')+2);
					if (p) { lastPageRecord = p; }
					xhrObj.innerHTML="<a href=\'http://www.solvinginternational.com/solvingsupplychain/"+lastPageRecord+"\' title=\'Return to Normal Mode\'>Presentation Mode Active</a>";
				}
			} else {
				message(xmlhttp.status);
				alert("Error!\n The server returned the following error code: "+xmlhttp.status+"\nRequested path: "+pathForTheRecord);
				pathForTheRecord = previousPath;
				//loading('2',rsa[xmlhttp.readyState]);
			} // end state 200
		} else {
			//message(load_seq+' : ' +rsa[xmlhttp.readyState]);
			if (xmlhttp.readyState == 3) {
				//alert(xmlhttp.responseText);
				//loading('3',rsa[xmlhttp.readyState]);
			}
		} // end ready state 4
}
var inc1=0;
var theString1='';
var intv1;
var inc2=0;
var theString2='';
var intv2;
var inc3=0;
var theString3='';
var intv3;
var inc4=0;
var theString4='';
var intv4;
var theArray=new Array('#000000','#1E1F21','#45484C','#6D7278','#949BA3','#B5BEC8','#949BA3','#6D7278','#45484C','#1E1F21','#000000');

function populate(d,t) {
	// alert('populate: '+d);
	switch (d) {
	case 'content1':
		if (t>" ") {
			div=d;
			theString1=t;
			inc1=0;
			intv1=window.setInterval("writeContent1Out()",1);
			var c1=	document.getElementById('content1');
			if (c1!=null) {
				c1.style.display='block';
			}
			writeContent1Out();
		}
	break;
	case 'content2':
		if (t>" ") {
			div=d;
			theString2=t;
			inc2=0;
			intv2=window.setInterval("writeContent2Out()",1);
			writeContent2Out();
		}
	break;
	case 'content3':
		if (t>" ") {
			div=d;
			theString3=t;
			inc3=0;
			intv3=window.setInterval("writeContent3Out()",1);
			writeContent3Out();
		}
	break;
	case 'content1Wide':
		if (t>" ") {
			div=d;
			theString4=t;
			inc4=0;
			intv4=window.setInterval("writeContent1WideOut()",1);
			writeContent1WideOut();
			var c1=	document.getElementById('content1');
			var c2= document.getElementById('content2');
			if (c1!=null) {
				c1.innerHTML='';c1.style.display='none';
			}
			if (c2 != null) {
				c2.innerHTML='';c2.style.display='none';
			}
		}
	break;
	default:
		var element = document.getElementById(d);
		if (element != null && t>" ") {
			element.innerHTML = t;
		}
	break;
	}
}
function writeContent1Out() {
	inc1++;
	if (inc1>=theArray.length) {
		window.clearInterval(intv1);
	}
	var obj=document.getElementById('content1');
	if (obj != null) {
	obj.style.color= theArray[inc1];
	if (inc1==5) {
	obj.innerHTML = theString1;
	}	
	}
}
function writeContent1WideOut() {
	inc4++;
	if (inc4>=theArray.length) {
		window.clearInterval(intv4);
	}
	var obj=document.getElementById('content1Wide');
	if (obj != null) {
	obj.style.color= theArray[inc4];
	if (inc4==5) {
	obj.innerHTML = theString4;
	}	
	}
}
function writeContent2Out() {
	inc2++;
	if (inc2>=theArray.length) {
		window.clearInterval(intv2);
	}
	var obj=document.getElementById('content2');
	if (obj != null) {
	obj.style.color= theArray[inc2];
	if (inc2==5) {
	obj.innerHTML = theString2;
	}
	}
}

function writeContent3Out() {
	inc3++;
	if (inc3>=theArray.length) {
		window.clearInterval(intv3);
	}
	var obj=document.getElementById('content3');
	if (obj != null) {
	obj.style.color= theArray[inc3];
	if (inc3==5) {
	obj.innerHTML = theString3;
	}
	}
}




