var BannerPic = new Array()
BannerPic[0] = "images/banner_image-0.jpg"
BannerPic[1] = "images/banner_image-1.jpg"
BannerPic[2] = "images/banner_image-2.jpg"
BannerPic[3] = "images/banner_image-3.jpg"
BannerPic[4] = "images/banner_image-4.jpg"
BannerPic[5] = "images/banner_image-5.jpg"
BannerPic[6] = "images/banner_image-6.jpg"

p=BannerPic.length;
var satIm = new Array()
for (i = 0; i < p; i++){
   satIm[i] = new Image()
   satIm[i].src = BannerPic[i]
}

function menu_goto( menuform )
{
    selecteditem = menuform.sites_list.selectedIndex ;
    newurl = menuform.sites_list.options[selecteditem].value ;
    if (newurl.length != 0) {
      location.href = newurl ;
    }
}

function selectImage(){
  n = Math.floor(p*Math.random());
  document.getElementById("index_banner").src = satIm[n].src;
}

function init(){
  selectImage();
  selectUserProfileInfo();
}

function showElement(id){
  document.getElementById(id).style.visibility ="visible";
}

function hideElement(id){
  document.getElementById(id).style.visibility ="hidden";
}


/***************/

var UserProfilePic = new Array()
UserProfilePic[0] = "images/StewartBernard.png"
UserProfilePic[1] = "images/SusanneKratzer.png"
UserProfilePic[2] = "images/EmmanuelDevred.png"
UserProfilePic[3] = "images/RodneyForster.png"
UserProfilePic[4] = "images/WahidMoufaddal.png"
UserProfilePic[5] = "images/PierreLarouche.png"

var UserProfileHeadLine = new Array()
UserProfileHeadLine[0] = "User profile: Stewart Bernard, Council for Scientific and Industrial Research"
UserProfileHeadLine[1] = "User profile: Susanne Kratzer, Stockholm University, Sweden"
UserProfileHeadLine[2] = "User profile: Emmanuel Devred, Bedford Institute of Oceanography, Canada"
UserProfileHeadLine[3] = "User profile: Rodney Forster, Centre for Environment, Fisheries and Aquaculture Sciences, UK"
UserProfileHeadLine[4] = "User profile: Wahid Moufaddal, National Institute of Oceanography and Fisheries, Egypt"
UserProfileHeadLine[5] = "User profile: Pierre Larouche, Maurice Lamontagne Institute, Canada"

var UserProfileText = new Array()
UserProfileText[0] = "<a href='http://www.csir.co.za/nre/coupled_land_water_and_marine_ecosystems/eo.html' target='_blank'>Dr Stewart Bernard is an oceanographer, specialising in remote sensing of the ocean. His particular interests include multi-scale and - sensor marine observation, ocean colour, bio-optics and harmful algal bloom research.</a>"
UserProfileText[1] = "Dr Susanne Kratzer is Associate Professor at <a href='http://www.ecology.su.se/' target='_blank'>Stockholm University</a> and coordinator of the <a href='http://www.nordaquarems.org/' target='_blank'>Nordic Network in Aquatic Remote Sensing</a>. Her current research focus is on water quality studies of the Baltic Sea, using remote sensing and bio-optical methods, and supporting the development of <a href='http://www.vattenkvalitet.nu/' target='_blank'>an operational remote sensing system.</a>"
UserProfileText[2] = "Dr Emmanuel Devred is a research scientist at <a href='http://www.bio.gc.ca/' target='_blank'>Bedford Institute of Oceanography</a>. His current research focus is on the field of  bio-optical modelling, inversion of inherent optical properties, identification of phytoplankton functional types and validation (i.e., ground truth) of algorithms."
UserProfileText[3] = "Dr Rodney Forster is a senior marine ecologist at the <a href='http://www.cefas.co.uk/default.aspx' target='_blank'>Centre for Environment, Fisheries and Aquaculture Sciences (Cefas)</a> at Lowestoft in the UK. He uses a variety of in situ and earth observation tools to provide rapid assessments of water quality for policy makers and to solve real-world applied ecological problems in estuaries and the coastal zone."
UserProfileText[4] = "Dr Wahid Moufaddal is a research scientist at the <a href='http://www.niof.sci.eg/' target='_blank'>National Institute of Oceanography and Fisheries</a>, Egypt. Currently, he is involved in a collaborative research on ocean-color remote sensing of the Nile delta shelf and spatio-temporal shifts of the Nile phytoplankton bloom."
UserProfileText[5] = "My research activities evolve around the use of remote sensing in oceanography to determine the existing relationships between physical and biological processes. In particular, I uses data from the NOAA weather satellites to measure sea surface temperatures as an indicator of physical processes (currents, upwellings, etc.) and ocean color data (SeaWiFS, MODIS, MERIS) to measure chlorophyll concentration and evaluate phytoplankton productivity. My work is conducted in the Quebec coastal waters (St. Lawrence estuary and gulf) and in the canadian arctic (Hudson Bay, Baffin Bay, Beaufort Sea)."

f=UserProfilePic.length;
var upIm = new Array()
for (i = 0; i < f; i++){
   upIm[i] = new Image()
   upIm[i].src = UserProfilePic[i];
}

function selectUserProfileInfo(){
  u = Math.floor(f*Math.random());
  document.getElementById("user_profile_image").src = upIm[u].src;
    //alert(document.getElementById("user_profile_image").src);
    document.getElementById("user_profile_headline").firstChild.nodeValue = UserProfileHeadLine[u];
    document.getElementById("user_profile_text").innerHTML = UserProfileText[u];
}
