<!--
//			Version		Date		Change
//			3.00		070515		Original Release of new website
//			3.01		070625		Changed for XHTML 1.1 Compatibility
//			3.02		070829		Created sub-routines for sub-menus
//          3.03        080509		Change colour of nav menu default to dark blue-
//									display ae studie all the time

var web_site = 'uk';	<!-- choose uk or usa -->

if (web_site == 'uk') {
	var search = false;
	var focus_group = false;
} else
{
	var search = true;
	var focus_group = true;
}

   if (document.images) {
            sitemapon = new Image();      
            sitemapon.src = "img/sitemap_on.gif";
            privacyon = new Image();      
            privacyon.src = "img/privacy_on.gif";
            focuson = new Image();      
            focuson.src = "img/focusgroup_on.gif";
 		    searchon = new Image();      
            searchon.src = "img/search_on.gif";
            contacton = new Image();      
            contacton.src = "img/contact_on.gif";
            homeon = new Image();      
            homeon.src = "img/home_on.gif"; 
            abouton = new Image();      
            abouton.src = "img/about_on.gif";
            solutionson = new Image();      
            solutionson.src = "img/solutions_on.gif";
            industryon = new Image();      
            industryon.src = "img/industry_on.gif";


		    sitemapoff = new Image();      
            sitemapoff.src = "img/sitemap.gif"; 
            privacyoff = new Image();      
            privacyoff.src = "img/privacy.gif";
            focusoff = new Image();      
            focusoff.src = "img/focusgroup.gif";
 		    searchoff = new Image();      
            searchoff.src = "img/search.gif";
		    contactoff = new Image();      
            contactoff.src = "img/contact.gif";
            homeoff = new Image();      
            homeoff.src = "img/home.gif";
            aboutoff = new Image();      
            aboutoff.src = "img/about.gif";
            solutionsoff = new Image();      
            solutionsoff.src = "img/solutions.gif";
            industryoff = new Image();      
            industryoff.src = "img/industry.gif";
          }

// Function to 'activate' images.
function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "on.src");
        }
}

// Function to 'deactivate' images.
function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "off.src");
        }
}

function banner (sectionimage) {
		if (sectionimage == 'aboutus') {
			document.writeln('<img src="img/aboutus.jpg" width="770" height="75" title="" alt="About Us Graphic" />');
		}
		if (sectionimage == 'industry') {
			document.writeln('<img src="img/industryexpertise.jpg" title="" alt="Industry Graphic" width="770" height="75" />');
		}
		if (sectionimage == 'solutions') {
			document.writeln('<img src="img/solutions.jpg" title="" alt="Solutions graphic" />');
		}

}

function top_menu_bar(page) {
		document.writeln('<ul class="navlist">');
		document.writeln('<li class="nav"><a onmouseover="imgOn\(\'sitemap\'\)"  onmouseout="imgOff\(\'sitemap\'\)" href="sitemap.html">    <img src="img/sitemap.gif"    title=""  alt="Click for SITE MAP" align="top" name="sitemap" /></a></li>');
		document.writeln('<li class="nav"><a onmouseover="imgOn\(\'privacy\'\)"  onmouseout="imgOff\(\'privacy\'\)" href="privacy.html">    <img src="img/privacy.gif"    title=""  alt="Click for PRIVACY"              name="privacy" /></a></li>');
		document.writeln('<li class="nav"><a onmouseover="imgOn\(\'contact\'\)"  onmouseout="imgOff\(\'contact\'\)" href="contact.html">    <img src="img/contact.gif"    title=""  alt="Click for CONTACT"              name="contact" /></a></li>');
		if (focus_group)
			document.writeln('<li class="nav"><a onmouseover="imgOn\(\'focus\'\)"    onmouseout="imgOff\(\'focus\'\)"   href="focusgroup.html"> <img src="img/focusgroup.gif" title="" alt="Click for FOCUS GROUP FACILITY" name="focus"/></a></li>');
		if (search)
			document.writeln('<li class="nav"><a onmouseover="imgOn\(\'search\'\)"   onmouseout="imgOff\(\'search\'\)"  href="search.html"> <img src="img/search.gif" title=""  alt="Click for SEARCH"       name="search" /></a></li>');
//		document.writeln('<li class="nav"><img src="img/bandcontactpg.gif" />');
		if (page != 'index')
			document.writeln('<li class="navleft"><a onmouseover="imgOn\(\'home\'\)" onmouseout="imgOff\(\'home\'\)"    href="index.html">  <img src="img/home.gif"   title="" alt="Click for MORPACE HOME Page" name="home" /></a></li>');
		document.writeln('</ul>');

}

function main_nav_area() {
		document.writeln('<ul class="navlist2">');
		document.writeln('<li class="nav"><a onmouseover="imgOn\(\'industry\'\)"  onmouseout="imgOff\(\'industry\'\)"  href="industry.html"> <img src="img/industry.gif"  title=""	alt="Click for INDUSTRY EXPERTISE" name="industry" height="78"  /></a></li>');
		document.writeln('<li class="nav"><a onmouseover="imgOn\(\'solutions\'\)" onmouseout="imgOff\(\'solutions\'\)" href="solutions.html"><img src="img/solutions.gif" title=""	alt="Click for SOLUTIONS"          name="solutions" height="78" /></a></li>');
		document.writeln('<li class="nav"><a onmouseover="imgOn\(\'about\'\)"     onmouseout="imgOff\(\'about\'\)"     href="about.html">    <img src="img/about.gif"     title=""	alt="Click for ABOUT US"           name="about" height="78"     /></a></li>');
//		document.writeln('<li class="nav"><img src="img/blank.gif" height="78" width="68"  title="" alt="spacer" /></li>');
		document.writeln('<li class="navleft"><a href="index.html"><img src="img/logo.gif" title="MORPACE Home Page" alt="Click for MORPACE HOME Page" height="73" width="334" /></a></li>');
		document.writeln('</ul>');

}

function about_nav_area() {
		document.writeln('<ul>');		// <!-- Use unique id for each main menu item  -->
		document.writeln('<li class="closed" id="p1"><a href="who.html" onclick="swapClass(1,\'p1\',\'open\',\'closed\',\'li\')">Who We Are</a></li>');
		document.writeln('<li class="closed" id="p2"><a href="contact.html" onclick="swapClass(1,\'p2\',\'open\',\'closed\',\'li\')">Contact Us</a></li>');
		document.writeln('<li class="closed" id="p3"><a href="news.html">News</a></li>');
		document.writeln('<li class="closed" id="p4"><a href="career.html" onclick="swapClass(1,\'p4\',\'open\',\'closed\',\'li\')">Career Opportunities </a></li>');
		document.writeln('</ul>');

}

function industry_nav_area() {
		document.writeln('<ul> <!-- Use unique id for each main menu item  -->');
		document.writeln('<li class="closed" id="p1"><a href="automotive.html" onclick="swapClass(1,\'p1\',\'open\',\'closed\',\'li\')">Automotive</a>'); 
		document.writeln('<!-- <ul>');
		document.writeln('<li><a href="#">SubCat Here</a></li>');
		document.writeln('</ul> -->');
		document.writeln('</li>');
		document.writeln('<!-- li classclosed= menu closed onload  --><!-- swapClass settings: 1=fulltoggle mode, p2=this element id, open=changes this element class to open, closed=changes others to closed, li=restricts to li elements only  -->');
		document.writeln('<li class="closed" id="p2"><a href="consumer.html" onclick="swapClass(1,\'p2\',\'open\',\'closed\',\'li\')">Consumer Products</a></li>');
		document.writeln('<li class="closed" id="p3"><a href="technology.html" onclick="swapClass(1,\'p3\',\'open\',\'closed\',\'li\')">Technology</a></li>');
		document.writeln('<li class="closed" id="p4"><a href="b2b.html" onclick="swapClass(1,\'p4\',\'open\',\'closed\',\'li\')">Business-to-Business</a></li>');
		document.writeln('</ul>');
						  
}

function solutions_nav_area() {
		document.writeln('<p class="bodytext" style="text-align: center">');
		document.writeln('<span id="p1"><a style="text-decoration: none; color:darkblue" onclick="swapClass(1,\'p1\',\'open\',\'closed\', \'li\')" onmouseover="this.style.color  = \'red\';" onmouseout="this.style.color  = \'darkblue\';" href="concept.html">Concept Generation </a><img src=\'img/arrow_right.gif\' height="10" title="" alt="Right Arrow Graphic"></img></span>');
		document.writeln('<span id="p2"><a style="text-decoration: none; color:darkblue" onmouseover="this.style.color  = \'red\';" onmouseout="this.style.color  = \'darkblue\';" href="product.html">Product Development </a><img src=\'img/arrow_right.gif\' height="10" title="" alt="Right Arrow Graphic"></img></span>');
		document.writeln('<span id="p3"><a style="text-decoration: none; color:darkblue" onmouseover="this.style.color  = \'red\';" onmouseout="this.style.color  = \'darkblue\';" href="market.html">Take-to-Market </a><img src=\'img/arrow_right.gif\' height="10" title="" alt="Right Arrow Graphic"></img></span>');
		document.writeln('<span id="p4"><a style="text-decoration: none; color:darkblue" onmouseover="this.style.color  = \'red\';" onmouseout="this.style.color  = \'darkblue\';" href="in_market.html">In-Market </a><img src=\'img/arrow_right.gif\' height="10" title="" alt="Right Arrow Graphic"></img></span>');
		document.writeln('<span id="p5"><a style="text-decoration: none; color:darkblue" onmouseover="this.style.color  = \'red\';" onmouseout="this.style.color  = \'darkblue\';" href="brand.html">Brand</a></span>');
		document.writeln('</p>');

}

function show_case_studies (study_case, no_of_cases) {
		jkl = study_case;
		fgh = no_of_cases;
//		var t=setTimeout("document.getElementById('case' + jkl).style.color = 'red'; document.getElementById('case' + jkl + '_text').style.color = 'red'; document.getElementById('case' + jkl).style.display = 'block'",1500);
		document.getElementById('case' + jkl).style.color = 'red';
		document.getElementById('case' + jkl + '_text').style.color = 'red';
		document.getElementById('case' + jkl).style.display = 'block';

		var t=setTimeout("document.getElementById('case' + jkl).style.color = '#4a7fa2'; document.getElementById('case' + jkl + '_text').style.color = '#4b4b4b'; document.getElementById('design' + jkl).style.color = 'red'; document.getElementById('design' + jkl).style.display = 'block'",3000);

		t=setTimeout("document.getElementById('design' + jkl).style.color = '#4b4b4b'; document.getElementById('outcome' + jkl).style.color = 'red'; document.getElementById('outcome' + jkl).style.display = 'block'",6000);

		t=setTimeout("document.getElementById('outcome' + jkl).style.color = '#4b4b4b'", 9000);

		t=setTimeout("hide_case_studies (jkl, fgh)",12000);
}

function hide_case_studies (study_case, no_of_cases) {
	jkl = study_case;
	fgh = no_of_cases;
//	document.getElementById('case' + jkl).style.display = 'none';
//	document.getElementById('design' + jkl).style.display = 'none';
//	document.getElementById('outcome' + jkl).style.display = 'none';
	jkl ++;
	if (jkl > no_of_cases) {
		jkl = '1';
	}
	show_case_studies (jkl, fgh);
}

function copyright() {
	document.writeln('&copy;2008 Morpace International Limited');
}

function printpage()
  {
  window.print()
  }

function changeWidth(cell_id, cell_width)
  {
  document.getElementById(cell_id).width=cell_width;
  }

function swapClass(){ //v1.4 by PVII
 var i,x,tB,j=0,tA=new Array(),arg=swapClass.arguments;
 if(document.getElementsByTagName){
	for(i=4;i<arg.length;i++){
		tB=document.getElementsByTagName(arg[i]);
		for(x=0;x<tB.length;x++){
			tA[j]=tB[x];j++;
		}
	}
	for(i=0;i<tA.length;i++){
		if(tA[i].className){
			if(tA[i].id==arg[1]){
				if(arg[0]==1){
					tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];
				} else {
					tA[i].className=arg[2];
				}
			} else
				if(arg[0]==1 && arg[1]=='none'){
					if(tA[i].className==arg[2] || tA[i].className==arg[3]){
						tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];
					}
				} else
					if(tA[i].className==arg[2]){tA[i].className=arg[3];
				}
			}
	}
  }
}


function writeStyles(op,a){ //v1.5 by PVII
  if(op==0||document.getElementById){
	var tS="<style type=\"text/css\">";
	tS+=a +"<"+"/style>";
	document.write(tS);
	document.close();
  }
}

writeStyles(1,'.closed ul{ display:none;}.open ul{ display:block;}');

		  
//-->
