function startList() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("dmenu");
		for (i=0; i < navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

var quotes = new Array();
quotes[0] ='<b><i>When we looked at the brochure from Garage Doctor, we immediately thought it was a great idea and after a consultation and quote, went ahead with a number of storage options and the garage floor.This has added so much to our brand new house, and its a major talking point for visiting friends. The service and workmanship is as high as anything I\'ve ever been involved with, and the return on the house value really outweighs the initial cost.Thanks Garage Doctor.</b><br/><br/>Andy Lawson – Pullenvale</i>';

quotes[1] ='<b><i>Thanks Garage Doctor, I will not hesitate in recommending your work. Visitors love our floor.</b><br/><br/>Tim Archibald - Yeronga</i>';

quotes[2] ='<b><i>Thanks for your Garage "Makeover". The garage is Spectacular – looks great and is practical in every sense. We couldn\'t be happier with the outcome. Well done.</b><br/><br/>Alex & Jaclyn - Westlake</i>';

quotes[3] ='<b><i>Our garage needed more space to allow us to move around our cars, work at our bench and store several crates, tools and work items. Garage Doctor helped us achieve all that without needing costly house renovations. The service, price and products were all excellent.<br/><br/></b> Carole – Brookfield.</i>';

quotes[4] ='<b><i>We found Stuart (The Garage Doctor) to be not only professional and helpful, but incredibly efficient in identifying and diagnosing our needs. His quality product has transformed our garage and given us the extra storage space we desperately needed, while looking simply fantastic!</b><br/><br/>Sofie Formica<br/>Host of Great South East, Seven Network</i>';

quotes[5] ='<b><i>I am writing to express my sincere thanks to the Garage Doctor team for an a amazing result. We are looking at selling our house and I am confident that the relative small cost compared to the amazing outcome of having our garage floor enhanced will deliver a premium for my property.  My agent agrees.  My neighbours want their garage done now. My kids think it is a play room to ride their bikes.  It is just amazing and your team delivered exactly what they said they would, on time and without fuss.  It is very rare these days. Thank you again,</b><br/><br/>Andrew and Claire – Camp Hill</i>';

function randomquote()
{
	var whichquote=Math.floor(Math.random()*(quotes.length));
	document.write(quotes[whichquote]);

}

function showquote(i)
{
	document.write(quotes[i]);
}

function showallquotes()
{
	var i;
	for (i = 0; i < quotes.length; i++)
	{
		document.write(quotes[i]);
		document.write("<br/><br/><br/>");
	}
}

function validateContact(formobj)
{
	var alertMsg = "Please provide the following information:\n";
	
	var msgLength = alertMsg.length;

	//Check for empty fields (user details only... not checking order info yet - make default amount 1 though)
	if (document.contact.name.value == "") alertMsg += "-First Name\n";
	if (document.contact.email.value == "") alertMsg += "-Email\n";
	if (document.contact.hear.value == "") alertMsg += "-How did you hear about us\n";
	if (document.contact.description.value == "") alertMsg += "-Description\n";

	if (alertMsg.length == msgLength){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}


function recwindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
} 


/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["images/floorimage2.jpg", "", ""] //plain image syntax
fadeimages[1]=["images/serviceimage2.jpg", "", ""] //image with link syntax
fadeimages[2]=["images/storageimage2.jpg", "", ""] //image with link syntax
fadeimages[3]=["images/floorimage.jpg", "", ""] //image with link syntax
fadeimages[4]=["images/tailoredimage2.jpg", "", ""] //image with link syntax

 
var fadebgcolor="#78797E"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
 




var photos=new Array()
var photoslink=new Array()
var which=0

//define images. You can have as many as you want:
photos[0]="images/gallery/GarageDr01.jpg"
photos[1]="images/gallery/GarageDr04.jpg"
photos[2]="images/gallery/GarageDr06.jpg"
photos[3]="images/gallery/GarageDr11.jpg"
photos[4]="images/gallery/GarageDr15.jpg"
photos[5]="images/gallery/GarageDr16.jpg"
photos[6]="images/gallery/GarageDr18.jpg"
photos[7]="images/gallery/GarageDr20.jpg"
photos[8]="images/gallery/GarageDr23.jpg"
photos[9]="images/gallery/GarageDr27.jpg"
photos[10]="images/gallery/GarageDr31.jpg"
photos[11]="images/gallery/GarageDr34.jpg"
photos[12]="images/gallery/GarageDr37.jpg"
photos[13]="images/gallery/GarageDr43.jpg"
photos[14]="images/gallery/GarageDr46.jpg"
photos[15]="images/gallery/GarageDr50.jpg"
photos[16]="images/gallery/GarageDr55.jpg"
photos[17]="images/gallery/GarageDr58.jpg"
photos[18]="images/gallery/GarageDr61.jpg"
photos[19]="images/gallery/GarageDr62.jpg"


//Specify whether images should be linked or not (1=linked)
var linkornot=0

//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]=""
photoslink[1]=""
photoslink[2]=""

//do NOT edit pass this line

var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}


function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}



function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters.revealTrans.play()
} 

function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}


function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}

function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}

function transport(){
window.location=photoslink[which]
}



// do it all again

var photos2=new Array()
var photos2link=new Array()
var which=0

//define images. You can have as many as you want:
photos2[0]="images/gallery2/GarageDr01.jpg"
photos2[1]="images/gallery2/GarageDr04.jpg"
photos2[2]="images/gallery2/GarageDr06.jpg"
photos2[3]="images/gallery2/GarageDr07.jpg"
photos2[4]="images/gallery2/GarageDr08.jpg"
photos2[5]="images/gallery2/GarageDr09.jpg"
photos2[6]="images/gallery2/GarageDr10.jpg"
photos2[7]="images/gallery2/GarageDr11.jpg"
photos2[8]="images/gallery2/GarageDr12.jpg"
photos2[9]="images/gallery2/GarageDr13.jpg"
photos2[10]="images/gallery2/GarageDr14.jpg"


//Specify whether images should be linked or not (1=linked)
var linkornot=0

//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photos2link[0]=""
photos2link[1]=""
photos2link[2]=""

//do NOT edit pass this line

var preloadedimages=new Array()
for (i=0;i<photos2.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos2[i]
}


function applyeffect2(){
if (document.all && photos2lider.filters){
photos2lider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photos2lider.filters.revealTrans.stop()
photos2lider.filters.revealTrans.apply()
}
}



function playeffect2(){
if (document.all && photos2lider.filters)
photos2lider.filters.revealTrans.play()
} 

function keeptrack2(){
window.status="Image "+(which+1)+" of "+photos2.length
}


function backward2(){
if (which>0){
which--
applyeffect2()
document.images.photos2lider.src=photos2[which]
playeffect2()
keeptrack2()
}
}

function forward2(){
if (which<photos2.length-1){
which++
applyeffect2()
document.images.photos2lider.src=photos2[which]
playeffect2()
keeptrack2()
}
}

function transport2(){
window.location=photos2link[which]
}

