/*
son of suckerfish menu script from:
http://www.htmldog.com/articles/suckerfish/dropdowns/
 */
function fnSiteName_NEW(Root)
{
	document.write("<p></p>Enabling Process Technologies Ltd");
}

function fnSiteName(Root)
{
	document.write("<p></p>Enabling Process Technologies Ltd<img class='EPTLogo' src='" + Root + "images/EPTLogo70x70.jpg' alt='Enabling Process Technologies Ltd' border='0' width='70' height='70'>");
}

function fnEPTLogo(Root, nav)
{
	document.write("<img class='EPTLogo' src='" + Root + "images/EPTLogo70x70.jpg' alt='Enabling Process Technologies Ltd' border='0' width='70' height='70'>");
}

function fnNavigation(Root,navId)
{
	var sp = "&nbsp;";
	if (navId == "00")
		{document.write("<li class='menuleftactive' id='menuleftactive'></li><li class='menufirst active'><a href='" + Root + "home.htm'>" + sp + "Home" + sp + "</a></li>");}
	else
		{document.write("<li class='menuleft' id='menuleft'></li><li class='menufirst'><a href='" + Root + "home.htm'>" + sp + "Home" + sp + "</a></li>");}
	if (navId == "10")
		{document.write("<li class='active'><a href='" + Root + "about/index.htm'>" + sp + "About" + sp + "</a>");}
	else
		{document.write("<li><a href='" + Root + "about/index.htm'>" + sp + "About" + sp + "</a>");}
		document.write("<ul>");
			if (navId == "11")
				{document.write("<li class='active'><a href='" + Root + "about/benefits.htm'>Benefits</a></li>");}
			else
				{document.write("<li class='first'><a href='" + Root + "about/benefits.htm'>Benefits</a></li>");}
			if (navId == "12")
				{document.write("<li class='active'><a href='" + Root + "about/process.htm'>Process</a></li>");}
			else
				{document.write("<li><a href='" + Root + "about/process.htm'>Process</a></li>");}
			if (navId == "13")
				{document.write("<li class='active'><a href='" + Root + "about/independence.htm'>Independence</a></li>");}
			else
				{document.write("<li><a href='" + Root + "about/independence.htm'>Independence</a></li>");}
			if (navId == "14")
				{document.write("<li class='active'><a href='" + Root + "about/skillbase.htm'>Skills Base</a></li>");}
			else
				{document.write("<li><a href='" + Root + "about/skillbase.htm'>Skills Base</a></li>");}
			if (navId == "15")
				{document.write("<li class='active'><a href='" + Root + "about/quality.htm'>Quality</a></li>");}
			else
				document.write("<li class='last'><a href='" + Root + "about/quality.htm'>Quality</a></li>");
		document.write("</ul>");
	document.write("</li>");
    if (navId == "20")
		{document.write("<li class='active'><a href='" + Root + "greencomputing/index.htm'>" + sp + "Green Computing" + sp + "</a></li>");}
	else
		{document.write("<li><a href='" + Root + "greencomputing/index.htm'>" + sp + "Green Computing" + sp + "</a></li>");}
	if (navId == "30")
		{document.write("<li class='active'><a href='" + Root + "3pt/index.htm'>" + sp + "3pt" + sp + "</a>");}
	else
		{document.write("<li><a href='" + Root + "3pt/index.htm'>" + sp + "3pt" + sp + "</a>");}
		document.write("<ul>");
			if (navId == "31")
				{document.write("<li class='active'><a href='" + Root + "3pt/people.htm'>People</a></li>");}
			else
				{document.write("<li class='first'><a href='" + Root + "3pt/people.htm'>People</a></li>");}
			if (navId == "32")
				{document.write("<li class='active'><a href='" + Root + "3pt/process.htm'>Process</a></li>");}
			else
				{document.write("<li><a href='" + Root + "3pt/process.htm'>Process</a></li>");}
			if (navId == "33")
				{document.write("<li class='active'><a href='" + Root + "3pt/product.htm'>Product</a></li>");}
			else
				{document.write("<li><a href='" + Root + "3pt/product.htm'>Product</a></li>");}
			if (navId == "34")
				{document.write("<li class='active'><a href='" + Root + "3pt/technology.htm'>Technology</a></li>");}
			else
				{document.write("<li class='last'><a href='" + Root + "3pt/technology.htm'>Technology</a></li>");}
		document.write("</ul>");
	document.write("</li>");
	if (navId == "40")
		{document.write("<li class='active'><a href='" + Root + "services/index.htm'>" + sp + "Services" + sp + "</a>");}
	else
		{document.write("<li><a href='" + Root + "services/index.htm'>" + sp + "Services" + sp + "</a>");}
		document.write("<ul>");
			if (navId == "41")
				{document.write("<li class='active'><a href='" + Root + "services/lifecycle.htm'>Lifecycle</a></li>");}
			else
				{document.write("<li class='first'><a href='" + Root + "services/lifecycle.htm'>Lifecycle</a></li>");}
			if (navId == "42")
				{document.write("<li class='active'><a href='" + Root + "services/projman.htm'>Project Management</a></li>");}
			else
				{document.write("<li><a href='" + Root + "services/projman.htm'>Project Management</a></li>");}
			if (navId == "43")
				{document.write("<li class='active'><a href='" + Root + "services/knowman.htm'>Knowledge Management</a></li>");}
			else
				{document.write("<li><a href='" + Root + "services/knowman.htm'>Knowledge Management</a></li>");}
			if (navId == "44")
				{document.write("<li class='active'><a href='" + Root + "services/knowreuse.htm'>Knowledge Reuse</a></li>");}
			else
				{document.write("<li><a href='" + Root + "services/knowreuse.htm'>Knowledge Reuse</a></li>");}
			if (navId == "45")
				{document.write("<li class='active'><a href='" + Root + "services/vsm.htm'>Value Stream Mapping</a></li>");}
			else
				{document.write("<li><a href='" + Root + "services/vsm.htm'>Value Stream Mapping</a></li>");}
			if (navId == "46")
				{document.write("<li class='active'><a href='" + Root + "services/RandD.htm'>Research & Development</a></li>");}
			else
				{document.write("<li><a href='" + Root + "services/RandD.htm'>Research & Development</a></li>");}
			if (navId == "47")
				{document.write("<li class='active'><a href='" + Root + "services/appmgmt.htm'>Application Management</a></li>");}
			else
				{document.write("<li class='last'><a href='" + Root + "services/appmgmt.htm'>Application Management</a></li>");}
		document.write("</ul>");
	document.write("</li>");
	if (navId == "50")
		{document.write("<li class='active'><a href='" + Root + "partners/index.htm'>" + sp + "Partners" + sp + "</a>");}
	else
		{document.write("<li><a href='" + Root + "partners/index.htm'>" + sp + "Partners" + sp + "</a>");}
		document.write("<ul>");
		if (navId == "51")
				{document.write("<li class='active'><a href='" + Root + "partners/kaisha-tec.htm'>Kaisha Tec</a></li>");}
			else
				{document.write("<li class='last'><a href='" + Root + "partners/kaisha-tec.htm'>Kaisha Tec</a></li>");}
		document.write("</ul>");
	document.write("</li>");
	if (navId == "60")
		{document.write("<li class='active'><a href='" + Root + "quality/index.htm'>" + sp + "Quality" + sp + "</a></li>");}
	else
		{document.write("<li><a href='" + Root + "quality/index.htm'>" + sp + "Quality" + sp + "</a></li>");}
	if (navId == "70")
		{document.write("<li class='active'><a href='" + Root + "vault-index.htm'>" + sp + "Vault" + sp + "</a></li>");}
	else
		{document.write("<li><a href='" + Root + "vault-index.htm'>" + sp + "Vault" + sp + "</a></li>");}
	if (navId == "80")
		{document.write("<li class='menulast active'><a href='" + Root + "contact/index.htm'>" + sp + "Contacts" + sp + "</a></li><li class='menurightactive' id='menurightactive'></li>");}
	else
		{document.write("<li class='menulast'><a href='" + Root + "contact/index.htm'>" + sp + "Contacts" + sp + "</a></li><li class='menuright' id='menuright'></li>");}
}

function MyDate()
{
	var NewDate=new Date();
	var MyDays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
	var MyMonths=["January","February","March","April","May","June","July","August","September","October","November","December"];
	var nnth=NewDate.getDate().toString();
	var nth= "<sup>th</sup>";
	if ((nnth.substring(nnth.length-1,nnth.length)) == "1") {nth="<sup>st</sup>"};
	if ((nnth.substring(nnth.length-1,nnth.length)) == "2") {nth="<sup>nd</sup>"};
	if ((nnth.substring(nnth.length-1,nnth.length)) == "3") {nth="<sup>rd</sup>"};
	if ((nnth>10) && (nnth<14)) {nth="<sup>th</sup>"};
	/*document.write(MyDays[NewDate.getDay()]+' '+NewDate.getDate()+nth+' '+MyMonths[NewDate.getMonth()]+' '+NewDate.getFullYear());*/
}

function fnEPTFeatureBox()
{
	document.write("<h3>EPT World</h3>");
	document.write("<p><strong>Enabling Process Technologies Ltd</strong> is a world renowned knowledge visualisation, capture and reuse company.</p>");
}

function fnFooter()
{
	document.documentElement.scrollTop=1;
	if (document.documentElement.scrollTop>0)
		{document.write("<div id='footer' style='top: " + Math.max(document.getElementById("wrap").scrollHeight,document.getElementById("header").scrollHeight+document.getElementById("sidebar").scrollHeight) + "px;'>")}
	else
		{document.write("<div id='footer' style='bottom: 20px;'>")}
	document.write("Enabling Process Technologies Limited, 5 Sage Close, Portishead, BRISTOL BS20 8ET</div>");
	/*document.write("<p>&copy; EPT Ltd&trade;, 3pt&trade; & 'People, Process, Product & Technology'&trade; are all trademarks of Enabling Process Technologies Limited&trade;</p>");*/
}

window.onresize = function ()
{
	/*window.location.reload();*/
	document.documentElement.scrollTop=1;
	if (document.documentElement.scrollTop>0)
		/*{document.getElementById("footer").style.top = Math.max(document.getElementById("wrap").scrollHeight,document.getElementById("header").scrollHeight+document.getElementById("sidebar").scrollHeight);}*/
		{document.getElementById("footer").style.bottom = ''; document.getElementById("footer").style.top = Math.max(document.getElementById("wrap").scrollHeight,document.getElementById("header").scrollHeight+document.getElementById("sidebar").scrollHeight)+'px';}
	else
		{document.getElementById("footer").style.top = ''; document.getElementById("footer").style.bottom = '20px';}
}
/*menuleft menufirstactive menuleftactive menulast menuright menulastactive menurightactive*/
sfHover = function()
{
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			if (this.className == "menufirst sfhover")
			{
				document.getElementById("menuleft").className = "menulefthover";
			}
			if (this.className == "menufirst active sfhover")
			{
				document.getElementById("menuleftactive").className = "menulefthover";
			}
			if (this.className == "menulast sfhover")
			{
				document.getElementById("menuright").className = "menurighthover";
			}
			if (this.className == "menulast active sfhover")
			{
				document.getElementById("menurightactive").className = "menurighthover";
			}
			this.style.zindex=200; //this line added to force flyout to be above relatively positioned stuff in IE
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			if (this.className == "menufirst")
			{
				document.getElementById("menuleft").className = "menuleft";
			}
			if (this.className == "menufirst active")
			{
				document.getElementById("menuleftactive").className = "menuleftactive";
			}
			if (this.className == "menulast")
			{
				document.getElementById("menuright").className = "menuright";
			}
			if (this.className == "menulast active")
			{
				document.getElementById("menurightactive").className = "menurightactive";
			}
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);
