<!-- start hiding

//Kill all JS errors that aren't significant
function stopError() {
return true;
}
window.onerror = stopError;


// check for browser DOM support
if (!document.getElementById) { 
window.location = "upgrade.html"}

//Open external links in new window.
function externalLinks() {
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
    if (anchor.getAttribute("href") &&
        anchor.getAttribute("rel") == "external")
      anchor.target = "_blank";
    }
}
window.onload = externalLinks;

// RANDOM IMAGE SCRIPT
///////////////////////
var theImages = new Array() // do not change this
// To add more image files, continue below
theImages[0] = "<img src=\"assets/images/splash/accordianplayer.jpg\" alt='Playing the accordian at the Hokonui Festival'>";
theImages[1] = "<img src=\"assets/images/splash/thepool.jpg\" alt='Olympic sized swimming pool at the new Sports Complex'>";
theImages[2] = "<img src=\"assets/images/splash/fashion1.jpg\" alt='Styles from The Hokonui Fashion Awards'>";
theImages[3] = "<img src=\"assets/images/splash/shotglasses.jpg\" alt='Moonshine shot glasses purchased from The Musuem'>";
theImages[4] = "<img src=\"assets/images/splash/food.jpg\" alt='Food food glorious food!'>";
theImages[5] = "<img src=\"assets/images/splash/scenic.jpg\" alt='A view surrounding the Hokonui Mountains'>";
theImages[6] = "<img src=\"assets/images/splash/pouringbeer.jpg\" alt='A dark ale anyone?'>";
theImages[7] = "<img src=\"assets/images/splash/trout.jpg\" alt='Gores infamous trout, and look at the size of it!'>";
theImages[8] = "<img src=\"assets/images/splash/tigermoth.jpg\" alt='Historic Tiger Moth fighter on display at the Mandeville Airfield'>";
theImages[9] = "<img src=\"assets/images/splash/sunset.jpg\" alt='A beautiful sunset'>";
theImages[10] = "<img src=\"assets/images/splash/coffee.jpg\" alt='We make good coffee too'>";
theImages[11] = "<img src=\"assets/images/splash/moonshinelabel.jpg\" alt='The infamous Hokonui Moonshine brew'>";
theImages[12] = "<img src=\"assets/images/splash/scrub.jpg\" alt='Local native bush'>";
theImages[13] = "<img src=\"assets/images/splash/musuem.jpg\" alt='Take the musuem tour'>";
theImages[14] = "<img src=\"assets/images/splash/bushwalk.jpg\" alt='bushwalking the local countryside'>";

// 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));
function showImage(){
document.write(theImages[whichImage]);
}


// for opening full size image off the name and path
function FotoFull(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}

//  End hiding from old browsers -->





