var dynimages=new Array()
dynimages[0]=["images_titanic/Recovery_2_bgm.jpg", "Diver on Nautile Waiting For Recovery Operations"]
dynimages[1]=["images_titanic/Recovery_2_bgp.jpg", "Diver on Nautile Waiting For Recovery Operations"]
dynimages[2]=["images_titanic/Night_recovery_2_bgm.jpg", "Night Recovery"]
dynimages[3]=["images_titanic/Night_recovery_2_bgp.jpg", "Night Recovery"]
dynimages[4]=["images_titanic/Recovery_3_bgm.jpg","Bringing the Nautile Close"]
dynimages[5]=["images_titanic/Recovery_3_bgp.jpg", "Bringing the Nautile Close"]
dynimages[6]=["images_titanic/Recovery_4_bgm.jpg", "Hoisting the Nautile Aboard the Nadir"]
dynimages[7]=["images_titanic/Recovery_4_bgp.jpg", "Hoisting the Nautile Aboard the Nadir"]
dynimages[8]=["images_titanic/Rustcicles_bgm.jpg", "Rustcicles"]
dynimages[9]=["images_titanic/Rustcicles_bgp.jpg", "Rustcicles"]
dynimages[10]=["images_titanic/Safe_bgm.jpg", "Purser's Safe"]
dynimages[11]=["images_titanic/Safe_bgp.jpg", "Purser's Safe"]
dynimages[12]=["images_titanic/Safe_Hardware_bgm.jpg", "Hardware from Purser Safe"]
dynimages[13]=["images_titanic/Safe_Hardware_bgp.jpg", "Hardware from Purser Safe"]
dynimages[14]=["images_titanic/Safety_Check_bgm.jpg", "Divers Giving Nautile a Safety Check"]
dynimages[15]=["images_titanic/Safety_Check_bgp.jpg", "Divers Giving Nautile a Safety Check"]

var descArray=new Array()
descArray[0]=" "
descArray[1]=" "
descArray[2]=" "
descArray[3]=" "
descArray[4]=" "
descArray[5]=" "
descArray[6]=" "
descArray[7]=" "
descArray[8]=" "
descArray[9]=" "
descArray[10]=" "
descArray[11]=" "
descArray[12]=" "
descArray[13]=" "
descArray[14]=" "
descArray[15]=" "

//Preload images ("yes" or "no"):
var preloadimg="no"

//Set image border width:
var imgborderwidth=3

//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"


if (preloadimg=="yes"){
for (x=0; x<dynimages.length; x++){
var myimage=new Image()
myimage.src=dynimages[x][0]
}
}
function clearinnerHTML(obj) {
while(obj.firstChild) obj.removeChild(obj.firstChild);
}



function returnimgcode(theimg){
var imghtml=""
imghtml='<img src="'+theimg[0]+'" border="'+imgborderwidth+'">'
return imghtml
}

function modifyimage(loadarea,imgindex){
if (document.getElementById) {
var imgobj=document.getElementById(loadarea)
if (imgindex==2 || imgindex==3) {
document.getElementById("widedynloadarea").style.height="510px"}
if (imgindex==14 || imgindex==15) {
document.getElementById("widedynloadarea").style.height="367px"}
if (imgindex==0 || imgindex==1 || imgindex==4 || imgindex==5|| imgindex==8 || imgindex==9 ||imgindex==10 || imgindex==11 || imgindex==12 || imgindex==13) {
document.getElementById("widedynloadarea").style.height="366px"}
if (imgindex==6 || imgindex==7) {
document.getElementById("widedynloadarea").style.height="366px"}


if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML=returnimgcode(dynimages[imgindex])
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()

clearinnerHTML(document.getElementById("imgbkgrnd"));
}

var titleelem=document.createElement("p")
var pictitle=document.createTextNode(dynimages[imgindex][1])
titleelem.appendChild(pictitle);
titleelem.style.color="#708AF0";
titleelem.style.fontWeight="200";
if (imgindex==2 || imgindex==3) {
titleelem.style.padding="0 0 0 100px"};

document.getElementById("imgbkgrnd").appendChild(titleelem);

var descelem=document.createElement("p")
var descript=document.createTextNode(descArray[imgindex])
descelem.appendChild(descript);
descelem.style.color="#B4C0F0";
descelem.style.fontWeight="normal";
document.getElementById("imgbkgrnd").appendChild(descelem);

return false
}
