//This script is to write the footer at the bottom of the MSE Pages
//The Page is called and the function WriteTable is called specifying the width required.
//If a width is an Odd number like 751/851 etc.. it will be converted as 75%, 85% etc

var linkBase = "http://www.pdo.co.om/hseforcontractors/blocks/"
var iTableWidth = 750;

function WriteTable(iTableWidth)
{
	if (iTableWidth % 2 == 0)
		document.write('<table border="0" cellpadding="3" cellspacing="1" width="' + iTableWidth + '">');
	else
	{
		iTableWidth = Math.floor(iTableWidth/10);
		document.write('<table border="0" cellpadding="3" cellspacing="1" width="' + iTableWidth + '%">');
	}
	document.write('<tr>');
	document.write('<td align="center" bgcolor="#000000" height="20" valign="middle">');
	document.write('<a class="whitetext" href="' + linkBase + '../default.asp">MSE Department</a></td>');
	document.write('<td align="center" bgcolor="#000000" height="20" valign="middle">');
	document.write('<a class="whitetext" href="' + linkBase + 'audits/audit.html">Audits</a></td>');
	document.write('<td align="center" bgcolor="#000000" height="20" valign="middle">');
	document.write('<a class="whitetext" href="' + linkBase + 'statistics/hsestatistics.html">Statistics</a></td>');
	document.write('<td align="center" bgcolor="#000000" height="20" valign="middle">');
	document.write('<a class="whitetext" href="' + linkBase + 'training/train.html">');
	document.write('HSE Training</a></td>');
	document.write('<td align="center" bgcolor="#000000" height="20" valign="middle">');
	document.write('<a class="whitetext" href="' + linkBase + 'hseplan/hseplan.html">HSE Plan</a></td>');
	document.write('<td align="center" bgcolor="#000000" height="20" valign="middle">');
	document.write('<a class="whitetext" href="' + linkBase + 'documentation/document.html">Documentation</a></td>');
	document.write('<td align="center" bgcolor="#000000" height="20" valign="middle">');
	document.write('<a class="whitetext" href="' + linkBase + 'links/links.html">Links</a></td>');
	document.write('</tr>');
	document.write('</table>');
}

function WriteContact(sPg)
{
	document.write('<div class="official"><a href="/hseforcontractors/disclaimer.htm"><b>Legal Disclaimer</b></a> | <b>Page Contact: </b>');
	switch(sPg)
	{
		case "hse":
			document.write('<a href="mailto:Mohd.A.Mashani@pdo.co.om">Mohd Mashani</a> (MSE/54 | +968 24675080)');
			break;
		case "h":
			document.write('<a href="mailto:khalifa.kns.maskery@pdo.co.om">Khalifa Al-Maskery</a> (MSE/31 | +968 24675282)');
			break;
		case "s":
			document.write('<a href="mailto:Hamad.SM.Khalfeen@pdo.co.om">Hamed Al-Khalfeen</a> (MSE/1 | +968 24673718)');
			break;
		case "e":
			document.write('<a href="mailto:Ahmed.MR.Sabahi@pdo.co.om">Ahmed Al-Sabahi</a> (MSE/22 | +968 24678287)');
			break;
		case "hm":
			document.write('<a href="mailto:Ali.AHA.Mahrooqi@pdo.co.om">Ali Al-Mahrooqi</a> (MSE/11 | +968 24673218)');
			break;
		case "tr":
			document.write('<a href="mailto:Ian.Riddell@pdo.co.om">Ian Riddell</a> (MSE/52 | +968 24673391)');
			break;
		case "au":
			document.write('<a href="mailto:Khalid.KAA.Jaradi@pdo.co.om">Khalid Al-Jaradi</a> (MSE/4 | +968 24678815)');
			document.write(' | <a href="mailto:Mahira.MS.Mashaikhi@pdo.co.om">Mahira Al-Mashaikhi</a> (MSE/41 | +968 24673464)');
			break;
		case "com":
			document.write('<a href="mailto:Soud.S.Meskiry@pdo.co.om">Soud Al-Meskiry</a> (MSE/51 | +968 24675452)');
			break;
		case "jp":
			document.write('<a href="mailto:Obaid.R.Maani@pdo.co.om">Obaid Al-Maani</a> (MSE/121 | +968 246 78924)');
			break;
		case "dm":
			document.write('<a href="mailto:Nasra.NAA.Maamery@pdo.co.om">Nasra Al Maamery</a> (MSE/54 | +968 246 78494)');
			break;
		case "iso":
			document.write('<a href="mailto:Faisal.MS.Lamki@pdo.co.om">Faisal Al Lamky</a> (MSE/2 | +968 24 678433)');
			break;

		default:
			document.write('<a href="mailto:Mohd.A.Mashani@pdo.co.om">Mohd Mashani</a> (MSE/54 | +968 24675080)');
			break;
	}
	document.write('</div');
}
