
function m_out(which) {
which.bgColor='#766b87';
}

function m_out_p(which) {
which.bgColor='#FFC6D9';
}

function m_hover(which) {
which.bgColor='#4A3F63';
}

function validate_form ( )
{
    valid = true;
    if ( document.cvform.contactname.value == "" )
    {
        alert ( "Please enter a Contact Name..." );
        valid = false;
    }
    if ( document.cvform.email.value == "" )
    {
        alert ( "Please enter an Email Address..." );
        valid = false;
    }
    if ( document.cvform.CV_File.value == "" )
    {
        alert ( "Please select a CV..." );
        valid = false;
    }
    return valid;
}

var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December');

function setdate() {
var d = new Date();
var o = document.getElementById('lastupdate');
o.innerHTML = 'Last updated on ' + d.getDate() + ' ' + MONTH_NAMES[d.getMonth()] + ' ' + d.getFullYear();

}

function setlist(name) {
	var n = document.getElementById('newsselection');
	if (name != "") {
		for(i = 0; i<n.length; i++){
			if (n.options[i].value == name) {
				n.selectedIndex = i;
				return;
			}
		}
	}
}

function setnews(which) {
var n = document.getElementById('newssection');
var myindex = which.selectedIndex;
var selvalue = which.options[myindex].value;
//n.innerHTML = '<script type="text/javascript" language="JavaScript" src="http://convert.rss-to-javascript.com/?chan=0&simple_chan=0&desc=1&date=1&src='+selvalue+'&target=_blank"></script><noscript>Your browser does not support JavaScript. <a title="RSS-to-JavaScript.com: Free RSS to JavaScript Converter" href=http://www.rss-to-javascript.com/?p=151,381&chan=1&simple_chan=1&desc=1&date=1&src=http'+selvalue+'&target=_blank&as_html=1>Click to read the latest news</a>.</noscript>';
location.href = 'bulletin.asp?news='+selvalue;
}

//Specify the marquee's width (in pixels)
var marqueewidth="730px"
//Specify the marquee's height
var marqueeheight="12px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=1
//configure background color:
var marqueebgcolor="#FFFFFF"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

var marqueecontent="<a id='ccm' href='onshore.htm'>&bull;Latest news - New Onshore Engineering Recruitment Services - Please click here to go to your new page edited by our Onshore Engineering specialist Sara Logan</a><a id='ccm' href='diving.htm'>&nbsp;&nbsp;&nbsp;&bull;New diving division! All disciplines supplied in accordance with IMCA competence including: air/sat divers. LSS/LSTs, air/mixed gas supervisors and diving Superintendents</a><a id='ccm' href='ukpsamerica.htm'>&nbsp;&nbsp;&nbsp;&bull;New Americas division! Visit our UKPS Americas page</a>"


marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById

var actualwidth=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
//window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"

}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}

function showdutymanager() {
	var n = document.getElementById('dm');
	var n1 = document.getElementById('dm1');
	if (n.innerHTML == ''){
	n.innerHTML = '+44 (0) 7730 922656';
	n1.innerHTML = 'Hide'}
	else {n.innerHTML = '';
	n1.innerHTML = 'Show'}
}
function showooh() {
	var n = document.getElementById('ooh');
	var n1 = document.getElementById('ooh1');
	if (n.innerHTML == ''){
	n.innerHTML = '+44 (0) 7850 420181';
	n1.innerHTML = 'Hide';}
	else {n.innerHTML = '';
	n1.innerHTML = 'Show';}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//Cycle Statement
var QuoteImg = new Array();
  QuoteImg[0]="images/offshore_main_1.jpg";
  QuoteImg[1]="images/100_1199.jpg";
  QuoteImg[2]="images/poseidon.jpg";
  QuoteImg[3]="images/main_offshore_2.jpg";
  QuoteImg[4]="images/offshore_main_3.jpg";
  QuoteImg[5]="images/edda_fjord.jpg";
  QuoteImg[6]="images/offshore_main_4.jpg";
  QuoteImg[7]="images/maersk_gallant.jpg";
  QuoteImg[8]="images/s7000.jpg";
  QuoteImg[9]="images/scarabeo6.jpg";
  QuoteImg[10]="images/deep_venture.jpg";
var newQuote = -1;
var totalQuotes = QuoteImg.length;

function cycleQuote() {
  newQuote++;
  if (newQuote == totalQuotes) {
    newQuote = 0;
  }
  document.main_ss.src=QuoteImg[newQuote];
  setTimeout("cycleQuote()", 5*1000);
}
