var prefix = '';

/***********************/
/* tools object */
/**********************/
var Tools = new Object();
Object.extend( Tools, {
	openImageWindow : function ( imageId, windowTitle, customWidth )
	{
		if( !customWidth )
		{
			var wWidth = 500;
			var wHeight = 500;
		}
		else
		{
			var wWidth = customWidth;
			var wHeight = customWidth * 0.8;
		}
		
		/*
		try
		{
			var w = new Window( 'imageWindow', 
				{
					className: 'alphacube',
					width: wWidth,
					height: wHeight,
					zIndex: 1000,
					resizable: true,
					title: windowTitle,
					showEffect: Element.show,
					hideEffect: Element.hide,
					draggable: true
				}
			);
			
		}
		catch( e )
		{
			// alert( 'Exception: ' + e );
		}
		
		w.setDestroyOnClose();

		w.setAjaxContent( url, 
			{
			parameters : requestParameters,
			method: 'get'
			}, true, false );
		*/
		
		var requestParameters = 'id=' + imageId;
		
		var url = prefix + '/kep.php';
		
		// go with the flow, use the simplest method..
		window.open( url +'?'+ requestParameters, 'Image'+ imageId, 'width=580,height=550,scrollbars=no,toolbar=no,status=no,menubar=no,location=no' );
		
	}
}
);


/* other extensions */
Array.prototype.find = function (s)
{
	for( var i = 0; i < this.length; i++ )
	{
		if( this[i] == s )
		{
			return true;
		}
	}
	return false;
};
