var photos=new Array()
var which=0

/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
photos[0]=pict_path+"1.jpg"
photos[1]=pict_path+"2.jpg"
photos[2]=pict_path+"3.jpg"

function backward(){
	if (which>0){
		window.status=''
		which--
		document.images.photoslider.src=photos[which]
	}
	setButton();
}

function forward(){
	if (which<photos.length-1){
		which++
		document.images.photoslider.src=photos[which]
	}
	setButton();	
}

function setButton()
{
	if (which>0)
	{
		gp.writeIt("<a href=\"#\" name=\"B2\" onClick=\"backward()\"><img src=\"images\/icon_previous.gif\" width=\"19\" height=\"19\" hspace=\"2\" vspace=\"0\" border=\"0\" align=\"absmiddle\">previous<\/a>");
	}
	else
	{
		gp.writeIt("");
	}

	if (which<photos.length-1)
	{
		gf.writeIt("<a href=\"#\" name=\"B1\" onClick=\"forward()\">next<img src=\"images\/icon_next.gif\" width=\"19\" height=\"19\" hspace=\"2\" vspace=\"0\" border=\"0\" align=\"absmiddle\"><\/a>");
	}
	else
	{
		gf.writeIt("");
	}
}

//Browsercheck (needed) ***************
function lib_bwcheck(){ 
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.opera5=this.agent.indexOf("Opera 5")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
  return this
}
bw=new lib_bwcheck(); //Browsercheck object

//Debug function ******************
function lib_message(txt){alert(txt); return false}

//Lib objects  ********************
function lib_obj(obj,nest){ 
  if(!bw.bw) return lib_message('Old browser')
  nest=(!nest) ? "":'document.'+nest+'.'
  this.evnt=bw.dom? document.getElementById(obj):
    bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;	
  if(!this.evnt) return lib_message('The layer does not exist ('+obj+')' 
    +'- \nIf your using Netscape please check the nesting of your tags!')
  this.css=bw.dom||bw.ie4?this.evnt.style:this.evnt; 
  this.ref=bw.dom||bw.ie4?document:this.css.document;
  return this
}

//Writing content to object ***
lib_obj.prototype.writeIt = function(text,startHTML,endHTML){
	if(bw.ns4){
    if(!startHTML){startHTML=""; endHTML=""}
	  this.ref.open("text/html"); 
    this.ref.write(startHTML+text+endHTML); 
    this.ref.close()
	}else this.evnt.innerHTML=text
}
