// JavaScript Document
//<!--
function setImage(imgID, imgName) {
	var theImage = top.document.images[imgID];
	theImage.src = imgPath + imgName;
	bigImage = bigImgPath + imgName;
	//bigImage = replaceCharacter(bigImgPath + imgName, ' ', '-');
	//alert("bigImage name: " + bigImage);
}

function jumpToImage(imgName) {
	setImage("theImage", imgName);
}

function openBigImgWindow() {
	var theWindow = window.open( "", "picWindow", "toolbar,resizable,fullscreen" );
	theWindow.moveTo (0,0);
	if (document.all) {
		theWindow.resizeTo (screen.availWidth, screen.availHeight);
	}
	else if (document.layers || document.getElementById) {
		if (theWindow.outerHeight < screen.availHeight || theWindow.outerWidth < screen.availWidth){
			theWindow.outerHeight = screen.availHeight;
			theWindow.outerWidth = screen.availWidth;
		}
	}

	var d = theWindow.document;
	var x = theWindow.screen.availWidth;
	var y = theWindow.screen.availHeight;
	x *= .90;
	y *= .90;
	
	var head = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n' +
'"http://www.w3.org/TR/html4/loose.dtd">\n' +
'<html><head><title>Stone Imagery</title>\n' +
'<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n' +
'<style type="text/css">\n<!--\nbody,td,th {color: #FFFFFF;	font-family: Verdana, Arial, Helvetica, sans-serif;' +
'font-size: 90%;}\na:link {color: #FFFFFF;}\na:visited {color: #FFFFFF;}\na:hover {color: #FF9900;' +
'text-decoration: underline;}\na:active {color: #FFFFFF;}\nbody {'+
'background-color: #aaaaaa; margin-left: 0px; margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}\n-->\n'+
'</style>\n</head>\n<body>\n';

	d.write( head );		
	d.write( '<div align="center">\n' );
	d.write( '<table width='+x+' height='+y+' border=0 align=center cellspacing=0 cellpadding=6><tr bgcolor=#444444>\n' );
	d.write( '<td align="left">To print this image, right click on it and choose &quot;Print Picture...&quot;</td>\n' );
	d.write( '<td align="right"><a href="javascript:window.close();">Click here to close this window</a></td></tr>\n' );
	d.write( '<tr><td colspan="2" align="center"><img src="'+bigImage+'" height='+y+' border=0></td></tr></table>\n' );
	d.write( '</div>\n' );		
	d.write( '</body></html>\n');
	d.close();

//		return true;
}

function replaceCharacter(str, oldCharacter, newCharacter) {
	if(str != -1) {
		var strArray = str.split(oldCharacter);
		str = strArray.join(newCharacter);
		//alert(str);
	}
	return str;
}
//-->
