showtime = 0;
function slideshow() {
	if(showtime == 0) {
		showtime = setInterval("change()", 10000);
	} else {
		showtime = clearInterval(showtime);
		showtime = 0;
	}
}
var n = 0;
function change(){
	var lg_files=new Array("home-summer_lg.jpg","home-winter_lg.jpg");
	var sm_files=new Array("home-summer_sm.jpg","home-winter_sm.jpg");
	var num=(lg_files.length-1);
	if(n<num) {
		n = (n+1);
	} else {
	    n = 0;
		}
	photoId = 'lg_image';
	photo = document.getElementById(photoId);
	setOpacity(photo, 0);
	document.getElementById('lg_image').src = "_images/" +lg_files[n];
	photoId = 'sm_image';
	photo = document.getElementById(photoId);
	setOpacity(photo, 0);
	document.getElementById('sm_image').src = "_images/" +sm_files[n];
	init();
}
// Initialize fades
function init() {
	photoId = 'lg_image';
	photo = document.getElementById(photoId);
	setOpacity(photo, 0);
	photo.style.visibility = 'visible';
	fadeIn(photoId,0);	
	photoId = 'sm_image';
	photo = document.getElementById(photoId);
	setOpacity(photo, 0);
	photo.style.visibility = 'visible';
	fadeIn(photoId,0);	
}

// Fade out
function fadeOut(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity >= 0) {
		  setOpacity(obj, opacity);
		  opacity -= 15;
		  window.setTimeout("fadeOut('"+objId+"',"+opacity+")", 50);
		} else {
			hideLayer(objId);
		}
	}
}

// Fade in
function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
		  setOpacity(obj, opacity);
		  opacity += 10;
		  window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 50);
		}
	}
}

// Set appropriate opacity depending on browser
function setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
	
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}

				var windowBar_picture =	'titlebar=1, toolbar=0, menubar=0, statusbar=0, scrollbars=1, resizable=1, width=700, height=550, top=150, left=0';
				

				function pictureImage(content) {
					win = window.open("", "Picture_Window", windowBar_picture )
				
					if (win != null) {
						win.document.open('text/html');
						win.document.write("<html>");
						win.document.write("<head>");
						win.document.write("<title>picture window<\/title>");
						win.document.write("<\/head>");
						win.document.write("<body>");
						win.document.write("<center>");
						win.document.write("<img src=" + content + ">");
						win.document.write("<\/center>");
						win.document.write("<\/body>");
						win.document.write("<\/html>");
						win.document.close()
						}
				}

