<!--

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 6

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'http://www.capella.co.nz/sites/shadeplus.co.nz/images/slideshow/shade_sails_5.jpg'
Pic[1] = 'http://www.capella.co.nz/sites/shadeplus.co.nz/images/slideshow/shade_sails_1.jpg'
Pic[2] = 'http://www.capella.co.nz/sites/shadeplus.co.nz/images/slideshow//shade_sails_2.jpg'
Pic[3] = 'http://www.capella.co.nz/sites/shadeplus.co.nz/images/slideshow/shade_sails_3.jpg'
Pic[4] = 'http://www.capella.co.nz/sites/shadeplus.co.nz/images/slideshow/shade_sails_4.jpg'



// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
	}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
//-->

<!---
var menu_timer = new Array();
var menu_cell = "";
var highlight = '#CED5DD';
var menu_status = new Array();
var browser;

function browser(){
	if (document.all){
		browser = 'ie'
	}else if (document.getElementById){
		browser = 'moz'
	}else if (document.layers){
		browser = 'ns4'
	}
	return browser
}
browser = browser()

function persistent_highlight(cell){
	close_all_subs()
	menu_cell = cell
}
function mouseon(cell,submenu){
	if (browser != 'ns4'){
		cell.style.backgroundColor = highlight;
	}
	if (submenu){
		submenu_on(submenu)
	} else {
		close_all_subs()
	}
}
function mouseout(cell,submenu){
	
	if (browser != 'ns4' && menu_cell != cell){
		cell.style.backgroundColor = ""
	}
	if (submenu){
		submenu_off(submenu)
	}
}


function menu_div(div_name){
	
	if (browser == 'ie'){
		construct = document.all[div_name].style;
	}else if (browser == 'moz'){
		construct = document.getElementById(div_name).style
	}else if (browser == 'ns4'){
		construct = document.layers[div_name]
	}
	return construct
}
function subClick(href){
	document.location.href = href
}
function submenu_on(menu){
	menu_status[menu] = 0;
	close_all_subs();
	clear_timer(menu);
	menu_status[menu] = 1;
	menu_div(menu).visibility = 'visible';
  
}
function submenu_off(menu){
	set_timer(menu)
}
function close_menu(menu){
		menu_div(menu).visibility = 'hidden';
		menu_status[menu] = 0;
		if (!document.layers) menu_cell.style.backgroundColor = "";
}
function set_timer(menu){
	menu_timer[menu] = setTimeout("close_menu('"+menu+"')",1000)
}
function clear_timer(menu){
	clearTimeout(menu_timer[menu]);
}
function close_all_subs(){
	for (a in menu_status){
		if (menu_status[a] == 1) {
			close_menu(a);
			clear_timer(a);
		}
	}
}



 
 function isEmailAddress (string) {
  var addressPattern = 
    /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]{2,10}$/;
  return addressPattern.test(string);
}
//-->

<!--
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_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_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 menu(file_path){
winpop=window.open(file_path,"ConsoleWindow1","toolbar=no,,width=432,height=550,directories=no,status=no,scrollbars=yes,resize=no,menubar=no");
winpop.focus();
}

//-->