// JavaScript Document



//START QUOTES
var textnumber = 1 ; 
var randomnumber = Math.random() ; 
var rand = Math.round( (textnumber-1) * randomnumber) + 1 ; 
text = new Array 

text[1] = '<p id="testimonials">A wonderful testimonial will go here of a happy happy client who&acute;s so happy they can&acute;t stand it and are gushing constantly about how wonderful you are!<br/><br/>~ Signed Happy Client</p>';
text[2] = '<p id="testimonials"> who&acute;s so happy they can&acute;t stand it and are gushing constantly about how wonderful you are!<br/><br/>~ Signed Happy Client</p>';



var mytext = text[rand];
//END QUOTES



//Second Function
var theImages = new Array()

//Random-loading images
theImages[0] = '/images/rotation/hall-settings-wedding-1.jpg' 
theImages[1] = '/images/rotation/hall-settings-wedding-2.jpg' 
theImages[2] = '/images/rotation/hall-settings-wedding-3.jpg' 
theImages[3] = '/images/rotation/hall-settings-wedding-4.jpg' 
theImages[4] = '/images/rotation/hall-settings-wedding-5.jpg' 
theImages[5] = '/images/rotation/hall-settings-wedding-6.jpg' 
theImages[6] = '/images/rotation/hall-settings-wedding-7.jpg' 
theImages[7] = '/images/rotation/hall-settings-wedding-8.jpg' 
theImages[8] = '/images/rotation/hall-settings-wedding-9.jpg' 

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));

function showImage(){
if(whichImage==0){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}
else if(whichImage==1){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}
else if(whichImage==2){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}
else if(whichImage==3){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}
else if(whichImage==4){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}
else if(whichImage==5){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}
else if(whichImage==6){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}
else if(whichImage==7){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}
else if(whichImage==8){
document.write('<img src="'+theImages[whichImage]+'" border=0 width="230" height="172" alt="Matsqui Hall set for Wedding Event">');
}


}



//pop-up window function
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'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
