var strategyOn = new Image();
var strategyOff = new Image();
var randdOn = new Image();
var randdOff = new Image();
var designOn = new Image();
var designOff = new Image();
var manufactureOn = new Image();
var manufactureOff = new Image();

var MapOff = new Image();
var KoreaOn = new Image();
var JapanOn = new Image();
var KoreaOn = new Image();
var TaiwanOn = new Image();
var ChinaOn = new Image();
var MalaysiaOn = new Image();
var SingaporeOn = new Image(); 
var IndonesiaOn = new Image(); 
var IndiaOn = new Image();
var UAEOn = new Image();
var RussiaOn = new Image();
var FinlandOn = new Image();
var SwedenOn = new Image();
var NorwayOn = new Image();
var DenmarkOn = new Image();
var ItalyOn = new Image();
var SwitzerlandOn = new Image();
var GermanyOn = new Image();
var HollandOn = new Image();
var BelgiumOn = new Image();
var FranceOn = new Image();
var SpainOn = new Image();
var UKOn = new Image();
var ScotlandOn = new Image();
var IrelandOn = new Image();
var USAOn = new Image();
var BrazilOn = new Image();

var USAOn = new Image();
var BrazilOn = new Image();

var journeyDoh = new Image();
var journeyJohnson = new Image();
var journeyReckitt = new Image();
var journeyUnilever = new Image();
var journeyGsk = new Image();
var journeyBoots = new Image();

String.prototype.startsWith = function(str) 
{return (this.match("^"+str)==str)}

String.prototype.endsWith = function(str) 
{return (this.match(str+"$")==str)}


var loaded = 0;
var TimeOutNum = 0;
var arrMenus = new Array();
arrMenus[0] = 'menuStrategy';
arrMenus[1] = 'menuRandd';
arrMenus[2] = 'menuDesign';
arrMenus[3] = 'menuManufacture';

function winPop(pageToLoad, winName, width, height, center, scroll, control)
{
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center))
    {
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + ","
    + "height=" + height + ","
    + "location=0,"
    + "menubar=0,"
    + "resizable=" + control + ","
    + "scrollbars="+scroll+", "
    + "status=1,"
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open(pageToLoad,winName,args );
}

function SwapIMG(imageName, image, imagePath)
{
	if (image.src == '')
	{
		image.src = imagePath;
	}
	document.images[imageName].src = image.src;
}

function swapBackground(pDiv)
{
	var sBackImage = '';

	if(pDiv.currentStyle) 
		sBackImage = pDiv.currentStyle.backgroundImage;
	else 
		sBackImage = window.getComputedStyle(pDiv,null).getPropertyValue('background-image');
	
	sBackImage = sBackImage.replace(/"/g,'');	
	
	if (sBackImage.substr(sBackImage.length - 6) == "f.jpg)")
		pDiv.style.backgroundImage = sBackImage.replace(/off.jpg/,'on.jpg');
	else
		pDiv.style.backgroundImage = sBackImage.replace(/on.jpg/,'off.jpg');

}

function SwapContent(pID,pSection)
{
	var oDiv;
	var oDiv2;
	
	switch (pSection)
	{
		case "Global":
			oDiv = document.getElementById('col1');
			oDiv2 = document.getElementById('col2');
			
			switch (pID)
			{
				case "Korea":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Korea</span></p><p><b>Competency :</b> Design and Manufacture</p><p><b>Description :</b> A good understanding gained from staff&acute;s working experience with a giant electronics brand along with working, academic and personal experiences with the Korean culture, including written and spoken language skills.</p>';
					break;
				case "Japan":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Japan</span></p><p><b>Competency :</b> Strategy, R&amp;D, Design and Manufacture</p><p><b>Description :</b> A range of projects from conceptual to manufacture, looking at inclusive design to high-end design and manufacture. Close working relationships built with a number of clients and consultancies in Japan.</p>';
					break;
				case "Korea":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Korea</span></p><p><b>Competency :</b> Strategy, R&amp;D, Design and Manufacture</p><p><b>Description :</b> Extensive, first hand experience of the working and living culture of China and the Chinese people as well as unique personal insight with forged, ground breaking relationships with Chinese policy makers.<br/>Years of experience working with companies, manufacturers and designers in China lends itself to a deep understanding and ability to relate to the needs of the client and market.</p>';
					break;
				case "Taiwan":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Taiwan</span></p><p><b>Competency :</b> Design and Manufacture</p><p><b>Description :</b> First hand, personal experience of working with Taiwan&acute;s top design companies and many of it&acute;s manufacturers.</p>';
					break;
				case "China":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">China</span></p><p><b>Competency :</b> Strategy, R&amp;D, Design and Manufacture</p><p><b>Description :</b> Extensive, first hand experience of the working and living culture of China and the Chinese people as well as unique personal insight with forged, ground breaking relationships with Chinese policy makers.<br/>Years of experience working with companies, manufacturers and designers in China lends itself to a deep understanding and ability to relate to the needs of the client and market.</p>';
					break;
				case "Malaysia":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Malaysia</span></p><p><b>Competency :</b> Manufacture</p><p><b>Description :</b> Extensive understanding and supplier / manufacturing knowledge relationship built up over a number of years.</p>';
					break;
				case "Singapore":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Singapore</span></p><p><b>Competency :</b> R&amp;D, Design and Manufacture</p><p><b>Description :</b> Links with manufacturers within Singapore, nurtured and developed over the years puts Pearson Matthews in a strong position for our clients around the world.</p>';
					break;
				case "Indonesia":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Indonesia</span></p><p><b>Competency :</b> Manufacture</p><p><b>Description :</b> Extensive understanding and supplier/ manufacturing knowledge relationship built up over a number of years</p>';
					break;
				case "India":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">India</span></p><p><b>Competency :</b> Strategy</p><p><b>Description :</b> Through looking at social, economic and technological trends within India, Pearson Matthews worked to define new opportunities for a new healthcare service within an emerging market.</p>';
					break;
				case "UAE":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">UAE</span></p><p><b>Competency :</b> Strategy</p><p><b>Description :</b> Strategic work leading to deep understanding of well-established world brand and local market.</p>';
					break;
				case "Russia":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Russia</span></p><p><b>Competency :</b> Strategy, Design and Manufacture</p><p><b>Description :</b> Ongoing relationship with Russian client involving regular visits to build a strong and transparent relationship.</p>';
					break;
				case "Finland":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Finland</span></p><p><b>Competency :</b> R&amp;D, Design and Manufacture</p><p><b>Description :</b> Description : A successful relationship spanning several years..</p>';
					break;
				case "Sweden":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Sweden</span></p><p><b>Competency :</b> R&amp;D, Design and Manufacture</p><p><b>Description :</b> High-end R&D and design to manufacture for Swedish client presented us with new ideas and directions transferable to other healthcare projects.</p>';
					break;
				case "Norway":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Norway</span></p><p><b>Competency :</b> R&amp;D and Manufacture</p><p><b>Description :</b> Working with a company based in Oslo on an innovative safety syringe for the international.</p>';
					break;
				case "Denmark":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Denmark</span></p><p><b>Competency :</b> Design and Manufacture</p><p><b>Description :</b> A relationship  extending over several years for Danish company developing a packaging compliance product for the international drug delivery market.</p>';
					break;
				case "Italy":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Italy</span></p><p><b>Competency :</b> Strategy and R&amp;D</p><p><b>Description :</b> With Italy at the forefront of design and trends, working with brands which operate within this market offers opportunity to develop insight and stay ahead of our competitors.</p>';
					break;
				case "Switzerland":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Switzerland</span></p><p><b>Competency :</b> Strategy, R&amp;D, Design and Manufacture</p><p><b>Description :</b> Projects spanning the innovation journey for large international consumer brand lending knowledge and understanding of trends, influences and opportunity within the sectors it operates within.</p>';
					break;
				case "Germany":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Germany</span></p><p><b>Competency :</b> Strategy, R&amp;D and Design</p><p><b>Description :</b> From market research within Germany to projects involving R&D, we have developed a broad understanding of the market and consumer needs.</p>';
					break;
				case "Holland":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Holland</span></p><p><b>Competency :</b> Design and Manufacture</p><p><b>Description :</b> Nearer-client development working within the consumer products market, therefore recognising the local needs while taking onboard international trends.</p>';
					break;
				case "Belgium":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Belgium</span></p><p><b>Competency :</b> Strategy, Design and Manufacture</p><p><b>Description :</b> Working at both ends of the innovation journey, good knowledge gained of the innovative approaches of the world brand. Our knowledgeable personnel bring insight from their working experience with clients in Belgium.</p>';
					break;
				case "France":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">France</span></p><p><b>Competency :</b> R&amp;D, Design and Manufacture</p><p><b>Description :</b> Both in-depth working relationships and good personal knowledge stemming from time working and living in the country, providing us with a broad insight of the French market, language and culture.</p>';
					break;
				case "Spain":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Spain</span></p><p><b>Competency :</b> R&amp;D and Design</p><p><b>Description :</b> Good understanding of the local working environment, culture and needs.</p>';
					break;
				case "UK":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">UK</span></p><p><b>Competency :</b> Strategy, R&amp;D, Design and Manufacture</p><p><b>Description :</b> Extensive knowledge across many different disciplines from bench-marking product design, to research and pivotal strategic and service consultancy. Includes sectors as diverse as consumer goods, drug testing, kitchen and homewares, technology transfer and self-diagnosis in healthcare.</p>';
					break;
				case "Scotland":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Scotland</span></p><p><b>Competency :</b> Strategy</p><p><b>Description :</b> Early stage, strategic work to map out pathways  specific to the needs of the Scottish brand&acute;s values.</p>';
					break;
				case "Ireland":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Ireland</span></p><p><b>Competency :</b> R&amp;D and Design</p><p><b>Description :</b> A long and fruitful working relationship, bringing many design challenges, successfully overcome.</p>';
					break;
				case "USA":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">USA</span></p><p><b>Competency :</b> Strategy, R&amp;D, Design and Manufacture</p><p><b>Description :</b> Skills and knowledge built across the whole innovation journey from working experience with clients and target markets in the USA.</p>';
					break;
				case "Brazil":
					oDiv.innerHTML = '<p><b>Country :</b> <span class="redtxt">Brazil</span></p><p><b>Competency :</b> Manufacture</p><p><b>Description :</b> Manufacturing relationship built through working experiences.</p>';
					break;		
			}
			
			oDiv2.innerHTML = '<p><a href="what_global.html">Back to Overview</a></p>';
			break;
	}
}

function validateEnquiry(pForm)
{
	var bValid = true;

	if ((bValid) && (pForm.Name.value == ''))
	{
		alert('You must enter your Full Name.');
		bValid = false;
	}
	
	if ((bValid) && (pForm.Comment.value == ''))
	{
		alert('You must enter a Comment.');
		bValid = false;
	}
	
	return bValid;	
}

function Left(pString, pLength)
{
	if (pLength <= 0)
	    return "";
	else if (pLength > String(pString).length)
	    return pString;
	else
	    return String(pString).substring(0,pLength);
}

function Right(pString, pLength)
{
    if (pLength <= 0)
		return "";
    else if (pLength > String(pString).length)
    	return pString;
    else 
    {
       var iStringLength = String(pString).length;
       return String(pString).substring(iStringLength, iStringLength - pLength);
    }
}

/************************************/
/************** MENUS ***************/
/************************************/

function show(idname)
{
  	ns4 = (document.layers) ? 1:0;
  	ie4 = (document.all) ? 1:0;

  	if(!ns4)
  	{
		if (document.getElementById)
		{
		  var bxNM = document.getElementById(idname);
		  bxNM.style.visibility = "visible";
		}
		else if (ns4)
		{
		  document[idname].visibility = "show";
		}
		else if (ie4)
		{
		  document.all[idname].style.visibility = "visible";
		}
	}
}

function hide(idname)
{
	ns4 = (document.layers) ? 1:0;
	ie4 = (document.all) ? 1:0;

	if(!ns4)
	{
		if (document.getElementById)
		{
		  var bxNM = document.getElementById(idname);
		  bxNM.style.visibility = "hidden";
		}
		else if (ns4)
		{
		  document[idname].visibility = "hide";
		}
		else if (ie4)
		{
		  document.all[idname].style.visibility = "hidden";
		}
	}
};

function hideAll()
{
	var ii;
	clearTimeout(TimeOutNum);
	
	for (ii in arrMenus)
	{
		hide(arrMenus[ii]);
	}
};

function SetTimer()
{
	TimeOutNum = setTimeout("hideAll();",600);
};

