function framework_splash(parameters) {
	var content = new Element('div', { style: 'text-align: center;' }).update(new Element('a', { href: parameters['href'] }).update(new Element('img', { src: parameters['src'], style: 'margin-top: 20px;' })));
	new XPSWindow({ type: 'dialog', content: content, height: 500, width: 500, title: parameters['title'], style: 'background-color: #000000;' });
}

function framework_onMouseOverMenu(elem) {
	var obj = XPS_elem(elem);
	if (!obj) return;
	
	if (obj.style.backgroundPosition.match(/0px 0px/) == null) {
		obj.__menuItemSelected = true;
	}
	
	obj.setStyle({ backgroundPosition: '0px 56px' });
}

function framework_onMouseOutMenu(elem) {
	var obj = XPS_elem(elem);
	if (!obj) return;
	
	if (obj.__menuItemSelected) {
		obj.setStyle({ backgroundPosition: '0px 28px' });
	}
	else {
		obj.setStyle({ backgroundPosition: '0px 0px' });
	}
}

function wfs_xhr_DEPRECATED(module, action, parameters, callback) {
	var f_xhr = new XHRClass();
	var query = '?&wfs_xhr=1&wfs_xhr_module=' + module + '&wfs_xhr_action=' + action;
	for (var i in parameters) {
		if (i in Array.prototype) continue;
		query += '&wfs_xhr_param_' + i + '=' + escape(parameters[i]);
	}
	f_xhr.send(query, true, wfs_xhr_callback);
	
	function wfs_xhr_callback(reply) {
		if (reply.constructor == String) { callback(reply); return; }
		callback(f_xhr.reply2MultiDimensionalArray(reply));
	}
}

function framework_subMenuToggle(id) {
	var obj = XPS_elem(id);
	var icon = XPS_elem(id + '_icon');
	if (!obj) return;
	
	if (obj.style.display == 'none') {
		obj.show();
		icon.src = icon.src.replace('expand', 'collapse');
	}
	else {
		obj.hide();
		icon.src = icon.src.replace('collapse', 'expand');
	}
	
}
