// JavaScript Document

/* ------------------------------------------------------ */
/* browser detection and settings
 */
	
function getBrowser()
{
	this.ver	= navigator.appVersion;
	this.dom	= document.getElementById ? 1 : 0;

	this.NS4	= ( document.layers && !this.dom ) ? 1 : 0;
	this.NS6	= ( this.dom && parseInt( this.ver ) >= 5 ) ? 1 : 0; 
	this.IE		= ( document.all ) ? 1 : 0;
}
g_oBrowser	= new getBrowser();
var g_sSource = "";

function preloadImages()
{
	if( document.images )
	{
		if( !document.g_aImgs )
		{
			document.g_aImgs = new Array();
		}
		
		var inc = 0;
		inc = document.g_aImgs.length;
		for( var i = 0; i < arguments.length; i++ )
		{
			document.g_aImgs[inc]			= new Image();
			document.g_aImgs[inc].src	= arguments[i];
			inc++;
		}
	}
}

function chimg( sObj, sOperation )
{
	var sType	= sObj.src.slice( sObj.src.lastIndexOf( "." ) );
	var sPath	= sObj.src.slice( 0, sObj.src.lastIndexOf( "_" ) );
	sObj.src = sPath + "_" + sOperation + sType;
}

function showPic( sObj, sPicNew )
{
	g_sSource = document.getElementById( sObj ).innerHTML;
	document.getElementById( sObj ).innerHTML = '<a href="#" onClick="restore(\''+sObj+'\')"><img src="'+sPicNew+'" border="0"></a>';
}

function showPicFullsize( sObj, sPicNew, sPicBig, sText )
{
	g_sSource = document.getElementById( sObj ).innerHTML;
	document.getElementById( sObj ).innerHTML = '<a href="'+sPicBig+'" target="_blank" onClick="restore(\''+sObj+'\')"><img src="'+sPicNew+'" border="0"></a>' +"<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n"+ '<a href="'+sPicBig+'" target="_blank">'+sText+'</a>';
}

function restore( sObj )
{
	document.getElementById( sObj ).innerHTML = g_sSource;
}