if ( typeof(Libero) == "undefined" ) {
	Libero = {
		Version: '1.0.0'
    };
}

Libero.Stash = {};

// test prototype library
if ( typeof(Prototype) == "undefined" ) {
	var Class = {
		create: function() {
			return function() {
				this.initialize.apply(this, arguments);
			}
		}
	};
	Object.extend = function(destination, source) {
		for (var property in source) {
			destination[property] = source[property];
  		}
		return destination;
	};
}

// Libero.HF: header footer class utilities  
Libero.HF = Class.create();

Libero.HF.show = function (id) {
	if (document.getElementById) {
		var el = document.getElementById(id);
		if (el) {
			el.style.display = 'block';
		}
	}
}

Libero.HF.hide = function (id) {
	if (document.getElementById) {
		var el = document.getElementById(id);
		if (el) {
			el.style.display = 'none';
		}
	}
}

Libero.HF.toggle = function(id) {
	if (document.getElementById) {
		var el = document.getElementById(id);
		if (el) {
			if (el.style.display == 'block') {
				el.style.display = 'none';
			}
			else {
				el.style.display = 'block';
			}
		}
	}
}

Libero.HF.ariannaSearch = function (url, empty_url, cksrv_a, cksrv_b, cksrv_c, q, encode) {
	encode = encode == undefined ? 1 : encode;
	// empty query
	if ( q.match(/^\s*$/) && empty_url != undefined ) {
		ckSrv(empty_url,cksrv_a,cksrv_b,cksrv_c,null);
		return false; 		
	}
	else {
		ckSrv(url + ( encode ? encodeURIComponent(q) : q ),cksrv_a,cksrv_b,cksrv_c,null);
		return false; 
	}
}

// Adv
function adv_flashDisp (flashobj) {
	if (typeof(flashobj)!='undefined'&&flashobj!='') {
		document.write(flashobj);
	}
}

