// JavaScript Document

var myWindow;

function openCenteredWindow(url) {
    var width = 300;
    var height = 250;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
    myWindow = window.open(url, "subWind", windowFeatures);
}

function cabinPicture (largeimage, smallimage, height, description, title)
{
 this.image = largeimage;
 this.smallimage = smallimage;
 this.height = height;
 this.description = description;
 this.title = title;
}

function change_image(my_object)
{
 //array_location = image_no;
 my_path = "Assets/"; 
 my_desc = my_object.description;
 document.getElementById("web_image_id").src=my_path+my_object.image;
 document.getElementById("web_image_id").height = my_object.height;
// document.getElementById("web_text_id").value = my_object.description;
 document.getElementById("web_text_id").firstChild.nodeValue=my_object.description;
 //document.getElementById("web_text_id").value = "test";
 

}

function load_small_image(image_id, my_object)
{
 document.getElementById(image_id).src=my_path+my_object.image;
 document.getElementById(image_id).title=my_object.title; 
 alert(my_object.title);
}

function load_all_small_images()
{
 alert("small images are loading");
 load_small_image("small_image_1", pic1);
 load_small_image("small_image_2", pic2);
 load_small_image("small_image_3", pic3);
 load_small_image("small_image_4", pic4);
 load_small_image("small_image_5", pic5);
 load_small_image("small_image_6", pic6);
 
}