function debug(){	// a simple wrapper for the Firebug console.log function	try	{                $A(arguments).each( function(string) { console.log(string); } );	}	catch(e)	{	}}function toggleDisplay(id,mode){	var element = document.getElementById(id);	if (mode == undefined)	{		element.mode == undefined && (element.mode = 0);	}	else	{		element.mode = 1 - mode;	}	if (element.mode = 1 - element.mode)	{		element.style.display = "block";	}	else	{		element.style.display = "none";	}	return element.mode;}function changeImage(id,value){	var object = document.getElementById(id);	var array = value.split("|");	object.width = array[1];	object.height = array[2];	object.src = documentRootRel + array[0];}function getIndex(object,value){	var index;	for (var i=0;i<object.options.length;i++) object.options[i].value == value && (index = i);	return index;}function mysIFR(baseID, show){	if (typeof sIFR == "function" && show)	{//		sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"flash/font.swf", sColor:"#000000", sHoverColor:"#e0192c", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0}));	}}Array.prototype.toHash = function(){	var hash = new Hash();	this.each(function(value, index) { hash.set(index, value); });	return hash;}Hash.prototype.toPHPQueryString = function(name){	this.each(function(pair, index) { Object.isArray(pair.value) && (pair.value = pair.value.toHash()); Object.isHash(pair.value) ? this.set(pair.key, pair.value.toPHPQueryString(name + '[' + pair.key + ']')) : this.set(pair.key, name + '[' + pair.key + ']=' + encodeURIComponent(pair.value)); }, this);	return this.values().join('&');}function phpAjaxQuery(className, methodName, arguments){	return [className, $H({ 'class': className, method: methodName, arguments: Object.isArray(arguments) ? arguments : [] })].toPHPQueryString('cms');}if (typeof (Lightview) == 'object'){	Lightview.options.radius = 0;	Lightview.options.overlay.opacity = 0.7;}function ShowLightview (url, options){	if (url.length > 0)	{		if (typeof (options) != 'object')		{			var options = new Hash ();		}		options.radius = 0;		Lightview.show ({ rel : "iframe", href : url, options : options });	}}function CloseLightview (url){	parent.CloseIFrameLightview (url)}function CloseIFrameLightview (url){	document.observe ('lightview:hidden', function (event) {		if (url)		{			document.location = url;		}	});	Lightview.hide ();}function checkAuth(element,pageID){	var url;	new Ajax.Request('/ajax.php', { method: 'post', asynchronous: false, parameters : { 'cms[auth|checkauth]': pageID }, onSuccess: function (transport) { url = transport.responseText; } });	if (url)	{		var referrer = element.readAttribute ('href');		ShowLightview(url + (referrer ? "?referrer=" + escape (referrer) : ""), {width : 718, height : 224});		return false;	}	else	{		return true;	}}var Module = Class.create ({});
