function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf('#')!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf('?'))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}


var bType;
var bleft;
var bleft2;
var bleft3;
var bleft4;
var bleft5;
var btop;
var blnMenuOn = false;
var top;
top = '';
function browserType ()
{
if (navigator.userAgent.indexOf('Opera')!=-1 && document.getElementById)
return 'OP'; // Opera
if (document.all)
return 'IE'; // Internet Explorer
if (document.layers)
return 'NN'; //Netscape 4
if (!document.all && document.getElementById)
return 'MO'; // Mozilla (Netscape 6+, etc)
}
function setLayerVisibility (pstrID, pstrVisibility)
{
if (bType == "IE")
eval("document.all." + pstrID + ".style.visibility='" + pstrVisibility + "'");
if (bType == "NN")
eval("document." + pstrID + ".visibility='" + pstrVisibility + "'"); 
if (bType == "MO" || bType == "OP") 
eval("document.getElementById('" + pstrID + "').style.visibility='" + pstrVisibility + "'"); 
}
function setPosition (pstrID, pstrPOS)
{
if (bType == "IE")
	{
	eval("document.all." + pstrID + ".style.left='" + pstrPOS + "'"); 
	}
if (bType == "NN")
	{
eval("document." + pstrID + ".left='" + pstrPOS + "'");
	}
if (bType == "MO" || bType == "OP")
	{
	eval("document.getElementById('" + pstrID + "').style.left='" + pstrPOS + "'");
	}
}

function setLayerDisplay (pstrID, pstrVisibility)
{
if (bType == "IE")
eval("document.all." + pstrID + ".style.display='" + pstrVisibility + "'"); 
if (bType == "NN")
eval("document." + pstrID + ".display='" + pstrVisibility + "'"); 
if (bType == "MO" || bType == "OP") 
eval("document.getElementById('" + pstrID + "').style.display='" + pstrVisibility + "'"); 
}


var aryImages = new Array(2);

  aryImages[0] = "../img/bullet2.gif";

  for (i=0; i < aryImages.length; i++) {
    var preload = new Image();
    preload.src = aryImages[i];
  }

function swap(imgMain)
	{
	eval("document.all." + imgMain + ".src = aryImages[0]");
	}


var a;
a = '';
var b;
b = '';
var c;
c = '';
function doMenuOn (pstrSubID)
	{
	if (document.getElementById(pstrSubID))
		{
		if(a.length > 1)
			{
			setLayerVisibility(a, 'hidden');
			}
		if(b.length > 1)
			{
			setLayerVisibility(b, 'hidden');
			}
		if(c.length > 1)
			{
			setLayerVisibility(c, 'hidden');
			}
		a = pstrSubID;
		setPosition(a, bleft3);
		setLayerVisibility(pstrSubID, 'visible');
		}
	}

function doMenuOnB (pstrSubID)
	{
	if (document.getElementById(pstrSubID))
		{
		if(b.length > 1)
			{
			setLayerVisibility(b, 'hidden');
			}
		if(c.length > 1)
			{
			setLayerVisibility(c, 'hidden');
			}
		b = pstrSubID;
		setPosition(b, bleft4);
		setLayerVisibility(pstrSubID, 'visible');
		}
	}

function doMenuOnC (pstrSubID)
	{
	if (document.getElementById(pstrSubID))
		{
		if(c.length > 1)
			{
			setLayerVisibility(c, 'hidden');
			}
		c = pstrSubID;
		setPosition(c, bleft5);
		setLayerVisibility(pstrSubID, 'visible');
		}
	}

function offLayer (pstrLayer)
{
if (pstrLayer == 'Layer1')
{
if(a.length > 1)
{
setLayerVisibility(a, 'hidden');
}
if(b.length > 1)
{
setLayerVisibility(b, 'hidden');
}
if(c.length > 1)
{
setLayerVisibility(c, 'hidden');
}
}
}
function windowchange()
{
if (bType == 'IE')
{
	bleft = document.body.clientWidth;
	if (bleft <= 760)
{
	bleft = 760;
}
bleft = bleft / 2 ;
bleft2 = bleft + 178;
bleft3 = bleft2 - 184;
bleft4 = bleft3 - 184;
bleft5 = bleft4 - 184;
eval('document.all.btn1.style.left=' + bleft2);
if(a.length > 1)
{
eval('document.all.' + a + '.style.left=' + bleft3);
}
if(b.length > 1)
{
eval('document.all.' + b + '.style.left=' + bleft4);
}
if(c.length > 1)
{
eval('document.all.' + c + '.style.left=' + bleft5);
}
setLayerVisibility('btn1', 'visible');
}

if (bType == "NN")
	{
	bleft = window.innerWidth;
	if (bleft <= 762)
		{
		bleft = 762;
		}
	bleft = bleft / 2;
	bleft2 = bleft + 170;
	bleft3 = bleft2 - 184;
	bleft4 = bleft3 - 184;
	bleft5 = bleft4 - 184;

	eval('document.btn1.left=' + bleft2);
if(a.length > 1)
{
eval('document.' + a + '.left=' + bleft3);
}
if(b.length > 1)
{
eval('document.' + b + '.left=' + bleft4);
}
if(c.length > 1)
{
eval('document.' + c + '.left=' + bleft5);
}
setLayerVisibility('btn1', 'visible');
}

if (bType == "MO")
	{
	bleft = window.innerWidth;
	if (bleft <= 762)
		{
			bleft = 762;
		}
	bleft = bleft / 2;
	bleft2 = bleft + 174;
	bleft3 = bleft2 - 184;
	bleft4 = bleft3 - 184;
	bleft5 = bleft4 - 184;
	eval("document.getElementById('btn1').style.left=" + bleft2);
	top = (document.getElementById('btn1').style.pixelTop - 1);
	eval("document.getElementById('btn1').style.top="+ top);
	if(a.length > 1)
		{
			eval("document.getElementById(" + a + ").style.left=" + bleft3); 
		}
	if(b.length > 1)
		{
			eval("document.getElementById(" + b + ").style.left=" + bleft4);
		}
	if(c.length > 1)
		{
			eval("document.getElementById(" + c + ").style.left=" + bleft5);
		}
	setLayerVisibility('btn1', 'visible');
	}

if (bType == "OP")
	{
	bleft = window.innerWidth;
	if (bleft <= 762)
		{
		bleft = 762;
		}
	bleft = bleft / 2;
	bleft2 = bleft + 175;
	bleft3 = bleft2 - 184;
	bleft4 = bleft3 - 184;
	bleft5 = bleft4 - 184;

	eval("document.getElementById('btn1').style.left=" + bleft2);
	top = (document.getElementById('btn1').style.pixelTop - 1);
	eval("document.getElementById('btn1').style.top="+ top);
	if(a.length > 1)
		{
			eval("document.getElementById(" + a + ").style.left=" + bleft3);
			top = (document.getElementById(" + a + ").style.pixelTop - 1);
			eval("document.getElementById(" + a + ").style.top="+ top);
		}
	if(b.length > 1)
		{
			eval("document.getElementById(" + b + ").style.left=" + bleft4);
			top = (document.getElementById(" + b + ").style.pixelTop - 1);
			eval("document.getElementById(" + b + ").style.top="+ top);
		}
	if(c.length > 1)
		{
			eval("document.getElementById(" + c + ").style.left=" + bleft5);
			top = (document.getElementById(" + c + ").style.pixelTop - 1);
			eval("document.getElementById(" + c + ").style.top="+ top);
		}
	setLayerVisibility('btn1', 'visible');
	}
}
	function SendEmail()
	{
		frm.command.value = "RequestEmail";
		frm.submit();
	}

var z;
z = '';

function closeInfo(pstrID)
	{
	if(z.length > 0)
	{
	setLayerDisplay('c' + z, 'none');
	setLayerDisplay ('s' + z, 'none');
	setLayerDisplay ('o' + z, 'block');
	}
	}

function openInfo(pstrID)
	{
	if(z.length > 0)
	{
	setLayerDisplay ('c' + z, 'none');
	setLayerDisplay ('s' + z, 'none');
	setLayerDisplay ('o' + z, 'block');
	}
	z = pstrID;
	setLayerDisplay ('o' + z, 'none');
	setLayerDisplay ('c' + z, 'block');
	setLayerDisplay ('s' + z, 'block');
	}


function ApplyNow(pstrID, pstrEmail)
	{
	frm.action = "Register.asp"
	frm.JobReference.value = pstrID;
	frm.JobEmail.value = pstrEmail;
	frm.submit();
	}