<!---hide from ignorant browsers

var max=16
var i=0
var toStop=0;
var autoFlag=0;
var speed=4000;
var intervalID;
 var imagePath=""

 if ((navigator.appName!="Microsoft Internet Explorer") && (navigator.appName!="Netscape"))
{
alert("this section is best viewed with  IE or NN")
}

var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);
//=====================>
slides=new Array(max+1);
slides[0]=imagePath+"tulips.jpg"
slides[1]=imagePath+"apples.jpg"
slides[2]=imagePath+"bones.jpg"
slides[3]=imagePath+"peper.jpg"
slides[4]=imagePath+"warmth.jpg"
slides[5]=imagePath+"rhapsody.jpg"
slides[6]=imagePath+"posters.jpg"
slides[7]=imagePath+"pinklake.jpg"
slides[8]=imagePath+"parliament1.jpg"
slides[9]=imagePath+"parliament2.jpg"
slides[10]=imagePath+"parliament.jpg"
slides[11]=imagePath+"midlife.jpg"
slides[12]=imagePath+"hotairballoons.jpg"
slides[13]=imagePath+"gatineau4.jpg"
slides[14]=imagePath+"gatineau3.jpg"
slides[15]=imagePath+"gate.jpg"
slides[16]=imagePath+"flags.jpg"


 //======================================>



var toFlag=false;
var ik;
var noXX=0;

function nothing()
{noXX=0;alert("")}


function viaNext()
{
 
if(toStop!=0)
{
clearTimeout(intervalID)
  toStop=0
  autoflag=0
verify=0
  
next()

}
else
{
next()
}
}

//===  Next Ends  =>



function viaFirst()
{
if(toStop!=0)
{ 

clearTimeout(intervalID)
  toStop=0
  autoflag=0
verify=0
i=0
firstLastPhoto()
}

else
{
i=0
firstLastPhoto()
}
}

//================>
function viaLast()
{

if(toStop!=0)
{


clearTimeout(intervalID)
  toStop=0
  autoflag=0
verify=0
i=max
firstLastPhoto()
}

else
{

i=max
 
firstLastPhoto()

}


}

//==================>


function viaSpeed()
{
  toSpeed()
}

//===>
function  viaSlow()
{

toSlow()
}

 
//============ to clear ==============>




  function toClear()
{

clearTimeout(intervalID)
  toStop=0
  autoflag=0
verify=0

}



//=============================>

function viaStop()

{
if(toStop!=0)
{

clearTimeout(intervalID)
  toStop=0
  autoflag=0
  verify=0

}
}

//==========================>

//====== via auto ==============>


function  viaAuto()
{

if(toStop==0)
{
toStop=100
autoFlag=0  
next() 
}

else
{

clearTimeout(intervalID)
  toStop=0
  autoflag=0
verify=0
toStop=100
 
next() 
}

}
//============== end via auto=====================>

var verify=0;
//=============  END STARTS ===========>

function auto()
{


if (toStop!=0)
{
if(verify==1){clearTimeout(intervalID),verify=0}

if(autoFlag==0)
{
autoFlag=1
verify=1
intervalID=setTimeout("auto()",speed)
}

else
{

clearTimeout(intervalID)
verify=0
autoFlag=0

next()


}

}
}

//=====================>

var kik=0;
function next()
{

if(i>=max)
{
kik=0;
}

else
{
kik=i+1;
}
document.glass.src=slides[kik]


i=kik
}
//======================================>





function viaBack()
{

if(toStop!=0)
{ 


clearTimeout(intervalID)
  toStop=0
  autoflag=0
verify=0
toBack()

}
else
{
toBack()
}

}


function toBack()
{


if(i==0)
{
i=max+1
}
i=i-1
document.glass.src=slides[i]
}



function firstLastPhoto()
{
 document.glass.src=slides[i]

}



function toSlow()
{


speed+=400
}

function toSpeed()
{

if(speed>=600)
{
speed-=400
}

else
{
alert("I am afraid auto will become unstable if you want auto faster") 
}
}

//==>

//end hiding-->

