var dynimages=new Array()
dynimages[0]=["images_titanic/Inside_Nautile_bgm.jpg", "Inside Nautile (6' in diameter)"]
dynimages[1]=["images_titanic/Inside_Nautile_bgp.jpg", "Inside Nautile (6' in diameter)"]
dynimages[2]=["images_titanic/map_bgm.jpg", "Ship's Navigation Chart"]
dynimages[3]=["images_titanic/map_bgp.jpg", "Ship's Navigation Chart"]
dynimages[4]=["images_titanic/Lifeboat_Mechanism_bgm.jpg","Lifeboat Launching Mechanism"]
dynimages[5]=["images_titanic/Lifeboat_Mechanism_bgp.jpg", "Lifeboat Launching Mechanism"]
dynimages[6]=["images_titanic/Mast_Lamp_bgm.jpg", "Mast Lamp"]
dynimages[7]=["images_titanic/Mast_Lamp_bgp.jpg", "Mast Lamp"]
dynimages[8]=["images_titanic/Nautile_Launch_bgm.jpg", "Launching Nautile from Nadir"]
dynimages[9]=["images_titanic/Nautile_Launch_bgp.jpg", "Launching Nautile from Nadir"]
dynimages[10]=["images_titanic/Newspaper_bgm.jpg", "Recovered Newspaper, Still Readable"]
dynimages[11]=["images_titanic/Newspaper_bgp.jpg", "Recovered Newspaper, Still Readable"]
dynimages[12]=["images_titanic/Porthole_bgm.jpg", "Porthole Near Aft Section"]
dynimages[13]=["images_titanic/Porthole_bgp.jpg", "Porthole Near Aft Section"]
dynimages[14]=["images_titanic/Recovery_1_bgm.jpg", "Divers Greet the Nautile After it Surfaces"]
dynimages[15]=["images_titanic/Recovery_1_bgp.jpg", "Divers Greet the Nautile After it Surfaces"]

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 (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
}
