// Auto-Sizing Image Popup Window
// Set the horizontal and vertical position for the popup
PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){
	if (isNN){
		imgWin=window.open('about:blank','',optNN);
	}
	if (isIE){
		imgWin=window.open('about:blank','',optIE);
	}
	with (imgWin.document){
		writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
		writeln('<sc'+'ript>');
		writeln('var isNN,isIE;');
		writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('isNN=(navigator.appName=="Netscape")?1:0;');
		writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
		writeln('function reSizeToImage(){');
		writeln('if (isIE){');
		writeln('window.resizeTo(300,300);');
		writeln('width=300-(document.body.clientWidth-document.images[0].width);');
		writeln('height=300-(document.body.clientHeight-document.images[0].height);');
		writeln('window.resizeTo(width,height);}');
		writeln('if (isNN){');       
		writeln('window.innerWidth=document.images["George"].width;');
		writeln('window.innerHeight=document.images["George"].height;}}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');
		writeln('</sc'+'ript>');
		if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onclick="self.close()">')
		else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()" onclick="self.close()">');
		writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
		close();		
	}
}


// Open centered Popup Window Script-
// © DHTML Shock (www.dhtmlshock.com)
// To add more shock to your site, visit www.DHTML Shock.com
function OpenbrWindow(theURL,winName,features, myWidth, myHeight, iscenter) {
  if(window.screen)if(iscenter)if(iscenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}


<!--
function open_console(ref_url, name, height, width) {
	window.open(ref_url, name, 'toolbar=no,height='+height+',width='+width+',directories=no,status=no,scrollbars=yes,resize=yes,menubar=no');
}

var preload = 0;
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

if ((browserName == "Netscape" && browserVer >= 3) || (navigator.userAgent.indexOf("MSIE 4") > 0) || (navigator.userAgent.indexOf("MSIE 5") > 0) || (navigator.userAgent.indexOf("MSIE 6") > 0))
    preload = 1;

//Preload Images
if (preload) {
	photo = new Image(131,30);
    photo.src = "images/menu_photo02.gif";
	details = new Image(130,30);
    details.src = "images/menu_details02.gif";
	rates = new Image(130,30);
    rates.src = "images/menu_rates02.gif";
	weather = new Image(130,30);
    weather.src = "images/menu_weather02.gif";
	map = new Image(130,30);
    map.src = "images/menu_location02.gif";
	contact = new Image(77,31);
    contact.src = "images/contact02.gif";
	
}

// Copyright 1997, SwapImg by Vizitech, LLC
function swapImg(img_name, img_file) {
	if(preload)
    document[img_name].src = img_file;
}

function rel() {
	if (navigator.userAgent.indexOf("MSIE 4") > 0)
	location.reload(true);
}

// Play WAV in IE
document.write('<bgsound src="#" id=mysound loop=1 autostart="true">');
function playsound(thesound) {
	if (document.all)
	document.all.mysound.src = thesound;
}

//-->

<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//  End -->


/***********************************************
* Fade-in image slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

	var slideshow_width='200px' //SET IMAGE width
	var slideshow_height='150px' //SET IMAGE height
	var pause=1000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
	
	var fadeimages=new Array()
	//SET 1) IMAGE PATHS, 2) optional link, 3), optional link target:
	fadeimages[0]=["/images/slides/slide1.jpg", "", ""] //plain image syntax
	fadeimages[1]=["/images/slides/slide2.jpg", "", ""]
	fadeimages[2]=["/images/slides/slide3.jpg", "", ""]
	fadeimages[3]=["/images/slides/slide4.jpg", "", ""]
	fadeimages[4]=["/images/slides/slide5.jpg", "", ""]
	fadeimages[5]=["/images/slides/slide6.jpg", "", ""]
	fadeimages[6]=["/images/slides/slide7.jpg", "", ""]
	fadeimages[7]=["/images/slides/slide8.jpg", "", ""]
	fadeimages[8]=["/images/slides/slide9.jpg", "", ""]
	fadeimages[9]=["/images/slides/slide10.jpg", "", ""]
	fadeimages[10]=["/images/slides/slide11.jpg", "", ""]
	fadeimages[11]=["/images/slides/slide12.jpg", "", ""]	
	fadeimages[12]=["/images/slides/slide13.jpg", "", ""]	
	fadeimages[13]=["/images/slides/slide14.jpg", "", ""]		
	// fadeimages[1]=["photo2.jpg", "http://www.google.com", ""] //image with link syntax
	// fadeimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax

	////NO need to edit beyond here/////////////

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

	var ie4=document.all
	var dom=document.getElementById
	var curpos=10
	var degree=10
	var curcanvas="canvas0"
	var curimageindex=0
	var nextimageindex=1
	
	function fadepic(){
		if (curpos<100){
			curpos+=10
			if (tempobj.filters)
			tempobj.filters.alpha.opacity=curpos
			else if (tempobj.style.MozOpacity)
			tempobj.style.MozOpacity=curpos/101
		} else {
			clearInterval(dropslide)
			nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
			tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
			tempobj.innerHTML=insertimage(nextimageindex)
			nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
			var tempobj2=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
			tempobj2.style.visibility="hidden"
			setTimeout("rotateimage()",pause)
		}
	}

	function insertimage(i){
		var tempcontainer=fadeimages[i][1]!=""? '<a href="'+fadeimages[i][1]+'" target="'+fadeimages[i][2]+'">' : ""
		tempcontainer+='<img src="'+fadeimages[i][0]+'" border="0">'
		tempcontainer=fadeimages[i][1]!=""? tempcontainer+'</a>' : tempcontainer
		return tempcontainer
	}

	function rotateimage(){
		if (ie4||dom){
			resetit(curcanvas)
			var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
			crossobj.style.zIndex++
			tempobj.style.visibility="visible"
			var temp='setInterval("fadepic()",50)'
			dropslide=eval(temp)
			curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
		}
	else
	document.images.defaultslide.src=fadeimages[curimageindex][0]
	curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
	}
	
	function resetit(what){
		curpos=10
		var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
		if (crossobj.filters)
		crossobj.filters.alpha.opacity=curpos
		else if (crossobj.style.MozOpacity)
		crossobj.style.MozOpacity=curpos/101
	}

	function startit(){
		var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
		crossobj.innerHTML=insertimage(curimageindex)
		rotateimage()
	}

	if (ie4||dom)
	window.onload=startit
	else
	setInterval("rotateimage()",pause)


