

function showImage(){
<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'dream.jpg'
theImages[1] = 'encourage.jpg'
theImages[2] = 'inspire.jpg'
theImages[3] = 'support.jpg'
theImages[4] = 'hope.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));

document.write('<img src="/images/scenes/'+theImages[whichImage]+'" height="255" width="163">');
}

function showImageHeader(){
<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'woman_baby_1.jpg'
theImages[1] = 'woman_baby_3.jpg'
theImages[2] = 'woman_baby_4.jpg'
theImages[3] = 'woman_baby_5.jpg'
theImages[4] = 'woman_baby_7.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));

document.write('<img src="/images/headers/'+theImages[whichImage]+'" height="98" width="636">');
}

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,menubar=yes'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()');
		eval(imgObj+'.src = "'+imgSrc+'"');
	}
}

function changeImage(imgName,imgObj,layer) {
	if (document.images) {
		if (document.layers) {
			if (layer!=null){
				eval('document.layers.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src');
			}
			else {
				document.images[imgName].src = eval(imgObj+".src");
			}
		}
		else {
			document.images[imgName].src = eval(imgObj+".src");
		}
	}
}


function openModal( src, width, height ) {
	
	cHeight = height + 15;
	cWidth = width + 15;

	// Display an external page using an iframe

	$.modal('<iframe src="' + src + '" height="'+height+'" width="'+width+'" style="border:0" frameborder="0">', {

		containerCss:{
			backgroundColor:"#fff",
			borderColor:"#efefef",
			height:cHeight,
			padding:0,
			width:cWidth
		},
		overlayClose:false
	});
	
}

function modalClose () {

	$.modal.close();
	
}

