function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function gallerySwapImage (img_num) {
	ch = document.getElementById("gallery_holder");
	ch.src = '/common/img/gallery/main_'+img_num+'.jpg';
	
	var this_desc = imageDesc(img_num);
	desc = document.getElementById("desc_holder");
	desc.innerHTML = this_desc;
}

function imageDesc (i) {

	var img_desc = new Array();
	
	img_desc[1] = "<b>Hospital Entrance</b><br>The Royal Alexandra Hospital for Children is the legal name of The Children's Hospital at Westmead, which has looked after children for over 100 years. This purpose-built facility creates a total healing environment. Because children are at the heart of what we do, our hospital has been designed to be bright, fun and colourful with gardens and artwork throughout. The Hospital’s serious purpose is not matched by its patients, whose toys, posters, stickers and Bandaged Bears are found in every ward and many offices. The children infuse our corridors and wards with energy, laughter, optimism and an unstoppable enthusiasm for life.";
           
img_desc[2] = "<b>Galleria</b><br>You enter the hospital via the main Galleria. This major thoroughfare contains artwork and sculptures for children to play on, including interactive equipment from the Powerhouse Museum. The floor was designed by TAFE students to appeal to children, incorporating animals on land and sea. The space also contains retail outlets such as Starbucks Coffee, a chemist, the Volunteers Shop and a licensed restaurant plus entrances to Emergency and Outpatients.";

img_desc[3] = "<b>RMH + Gardens</b><br>This view of the gardens from a staff tearoom is common to all wards. On the far left is Ronald McDonald House (RMH). 'People who live far away from a big hospital come to stay here while they're having treatment.' [Rhys, aged 7.] This area contains outdoor seating, an amphitheatre, an aviary and the Remembrance Garden. The space is used for outdoor performances, visits from the Kindi-farm and other events.";

img_desc[4] = "<b>Ward Outlook</b><br>All wards have balconies overlooking the gardens. To the right of the picture on the 2nd floor is the licensed restaurant; above that is a staff tearoom.";

img_desc[5] = "<b>Outpatients</b><br>This contemporary design represents trees and clouds and contains Outpatient Services and clinics. The clinics have over 500,000 occasions of service each year. The hospital is a registered art gallery with a curator who manages the photos, artworks and sculptures located in every corridor, department and clinic.";

img_desc[6] = "<b>Wade Ward</b><br>This is the entrance to the Adolescent Ward (Wade Ward). The use of natural light and outdoor space is an important feature throughout the hospital.";

img_desc[7] = "<b>Ward Reception</b><br>This is the ward reception for the Surgical Unit. Functionality, contemporary design and use of colour are mirrored in all wards.";

img_desc[8] = "<b>Lecture Theatre</b><br>The Education Centre contains lecture theatres and tutorial and seminar rooms equipped with the latest audiovisual gear. The centre also includes a medical library and video conferencing facilities. Pictured is the largest lecture theatre (180 seats).";

img_desc[9] = "<b>Dining Room</b><br>The staff dining room is a relaxing environment that looks out to the Chinese Gardens and rock pools. Food Services provides varied cuisine, including gourmet sandwiches, a salad bar, sushi rolls and cooked meals.";

img_desc[10] = "<b>Chinese Gardens</b><br>Located between the main building and the diagnostic block, the Chinese Gardens are a tranquil retreat for families, children and staff. The diagnostic block (right) contains medical imaging technology and a dedicated pathology/laboratory service.";

	var desc = img_desc[i];
	
	if (desc == "" || desc == null) { desc = "No image description available"; }
	return desc;
	
}