//www.cryer.co.uk © 2004 and www.brainerror.net ver 1.3 © June 7,2004 
//were reference for the following Javascript slide show code 
function changeOpac(opacity, id) 
{ 
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100); 
	object.MozOpacity = (opacity / 100); 
	object.KhtmlOpacity = (opacity / 100); 
	object.filter = "alpha(opacity=" + opacity + ")"; 
} 

function blendimage(divid, imageid, imagefile, millisec) 
{ 
	var speed = Math.round(millisec / 10); 
	var timer = 0; 

//set the current image as background 
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")"; 

//make image transparent 
	changeOpac(0, imageid); 

//make new image 
	document.getElementById(imageid).src = imagefile; 

//fade in image 
	for(i = 0; i <= 100; i++) 
	{ 
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed)); 
		timer++; 
	} 
} 

var slideCache = new Array(); 

function RunSlideShow(divid,imageid,imageFiles,displaySecs) 
{ 
	var imageSeparator = imageFiles.indexOf(";"); 
	var nextImage = imageFiles.substring(0,imageSeparator); 

	changeOpac(0, imageid); 
	blendimage(divid,imageid,nextImage,100); 

	var futureImages= imageFiles.substring(imageSeparator+1,imageFiles.length)+ ';' + nextImage; 
	setTimeout("RunSlideShow('"+divid+"','"+imageid+"','"+futureImages+"',"+displaySecs+")",displaySecs*1000); 

	// Cache the next image to improve performance. 
	imageSeparator = futureImages.indexOf(";"); 
	nextImage = futureImages.substring(0,imageSeparator); 
	if (slideCache[nextImage] == null) 
	{ 
		slideCache[nextImage] = new Image; 
		slideCache[nextImage].src = nextImage; 
	} 
}

function focusframe()
{
if (parent.cview) parent.cview.focus();
}

function showmap()
{
		var html = '<HTML>\n<HEAD>\n';
		html += '<ti' + 'tle>Location Map';
		html +=' </ti' + 'tle>';
		html += '<li' + 'nk rel=stylesheet type=text/css href=chartview.css />'
		html += '\n</HE' + 'AD>\n<BODY>\n';
		html += '<img src=\"images/large-map.gif';
		html += '\" width=\"402\" height=\"600\" /';
		html += '><br';
		html += ' />';
		//html += '<p><a href=\"javascript:window.close();\"';
		//html += '>Close</';
		//html += 'a>';
		//html += '</';
		//html += 'p>';
		html += '\n</bo' + 'dy>\n</ht' + 'ml>';
		var wWidth;
		var wHeight;
		var sBars;		
		if(screen.height < 750)
		{
			sBars="yes";
			wHeight= screen.height - 150;
			wWidth=420;
		}
		else
		{
			wHeight=600;
			wWidth=402
			sBars="no";
		}
		
		var chartWin = window.open("","mapSpecial", "toolbar=no,menubar=yes,status=yes,scrollbars="+sBars+",width="+wWidth+",height="+wHeight+",innerWidth=402,innerHeight="+wHeight+",left=100,top=5", false);
		chartWin.document.open();
		chartWin.document.write(html);
		chartWin.document.close();

}

function showchart(chartName, chartTitle)
{
		var html = '<HTML>\n<HEAD>\n';
		html += '<ti' + 'tle>';
		html += chartTitle;
		html +=' </ti' + 'tle>';
		html += '<li' + 'nk rel=stylesheet type=text/css href=chartview.css />'
		html += '\n</HE' + 'AD>\n<BODY>\n';
		html += '<img src=\"images/';
		html += chartName;
		html += '\" width=\"978\" height=\"603\" /';
		html += '><br';
		html += ' />';
		//html += '<p><a href=\"javascript:window.close();\"';
		//html += '>Close</';
		//html += 'a>';
		//html += '</';
		//html += 'p>';
		html += '\n</bo' + 'dy>\n</ht' + 'ml>';
		var wWidth;
		var wHeight;
		var sBars;		
		if(screen.width < 800)
		{
			wWidth=610;
			wHeight=400;
			sBars="yes";
		}
		else if (screen.width < 900)
		{
			wWidth=760;
			wHeight=460;
			sBars="yes";
		}
		else
		{
			wWidth=1000;
			wHeight=605;
			sBars="no";
		}
		
		var chartWin = window.open("","chartSpecial", "toolbar=no,menubar=yes,status=yes,scrollbars="+sBars+",width="+wWidth+",height="+wHeight+",innerWidth="+wWidth+",innerHeight="+wHeight+",left=5,top=5", false);
		chartWin.document.open();
		chartWin.document.write(html);
		chartWin.document.close();
}