//BROWSER SNIFFER

function Is() {
    this.ie4 = document.all && !document.getElementById;
	this.ns4 = document.layers;
	this.ie5 = document.all && document.getElementById;
	this.ns6 = document.getElementById && !document.all;
}

var is = new Is()

if(is.ns4) {
	doc = "document";
	sty = "";
	htm = ".document"
}
else if(is.ie4 || is.ie5) {
	doc = "document.all";
	sty = ".style";
	htm = ""
}
else if(is.ns6) {
	doc = "document.getElementById(";
	sty = ").style";
	htm = ""
}

//PRELOADER
function preLoad() 
{
	image1 = new Image();
	image1.src = "images/gallery/GAR_0009.jpg";


	return true;
}


function showLayer(layer)
{
	showLyr = eval(doc + '["' + layer + '"]' + sty);
	showLyr.visibility = "visible";
}

function hideLayer(layer)
{
	hideLyr = eval(doc + '["' + layer + '"]' + sty);
	hideLyr.visibility = "hidden";
}

var win=null;
function NewWindowHood(mypage,myname,w,h,scroll){
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
}

function NewWindow(mypage, name)
{
	settings='top=0,left=0,scrollbars=yes,location=yes,directories=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes';
	win=top.open(mypage, name);
}

var step=1
var whichimage=1
function slideit(){
	if (!document.images)
		return
	//If the browser is IE 4.x
	if (document.all)
		slide.filters.blendTrans.apply()
	if(!is.ns4)
		document.slide.src=eval("image"+step+".src")
	//If the browser is IE 4.x
	if (document.all)
		slide.filters.blendTrans.play()
	whichimage=step
	if (step<3)
		step++
	else
		step=1
	setTimeout("slideit()",5000)
}
