function cache_images(img_name_array){

  for(x=0;x<img_name_array.length;x++) {
    eval(img_name_array[x]+"_off=new Image();");
    eval(img_name_array[x]+"_off.src=\"images/"+img_name_array[x]+"_off.gif\";");
    eval(img_name_array[x]+"_on=new Image();");
    eval(img_name_array[x]+"_on.src=\"images/"+img_name_array[x]+"_on.gif\";");
  }

}

function blindPic (whichpic, thisholder) {

  new Element.hide('imageShutter');
  new Element.show('pgProgress');
    
  var params ="port_img=" + whichpic;

  new Ajax.Updater('imageShutter', 'pageGalleryCall.php', {
                  asynchronous: true, 
		  method: "get", 
		  parameters: params
  });

    new Effect.Appear('imageShutter',{duration:2.0});
    new Effect.Fade('pgProgress',{duration:2.0});
}

/*
function blindPic (whichpic, thisholder) {
  changeImage(whichpic);


*/

function showPic (whichpic, thisholder) {
    if (document.getElementById) {
	document.getElementById(thisholder).src = whichpic;
        return false;
    } else {
        return true;
    }
}

function button_on ( imgName ) {
	butOn = eval ( imgName + "_on.src" );
	document [imgName].src = butOn;
}

function button_off ( imgName ) {
	butOff = eval ( imgName + "_off.src" );
	document [imgName].src = butOff;
}


var global=new Array('nav_vision',
		     'nav_developments',
		     'nav_responsible',
		     'nav_gallery',
		     'nav_reach',
		     'nav_maritime',
		     'nav_contact'
);



function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

var myVid;
function openCenteredVid(url, mWidth, mHeight) {
    var width = mWidth;
    var height = mHeight;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var vidFeatures = "width=" + width + ",height=" + height + 
        ",status,resizable,left=" + left + ",top=" + top + 
        "screenX=" + left + ",screenY=" + top;
    myVid = window.open(url, "subWind", vidFeatures);
}

