// JS Document
var tasks = {
	_tfx: null,
	_sfx: null,
	_loaded: false,
	_opened: {},
literal: function(x) { return x*x; },
html: function(s) {
		return s
		.replace(/&/g, '&amp;')
		.replace(/"/g, '&quot;')
		.replace(/</g, '&lt;')
		.replace(/>/g, '&gt;')
		.replace(/'/g, '&#39;');
	},
browser: function() {
		var agent = navigator.userAgent.toLowerCase();
		
		this.IE = agent.indexOf('msie') != -1;
		this.Gecko = agent.indexOf('gecko') != -1;
		this.Opera = agent.indexOf('opera') != -1;
		this.Safari = agent.search(/(konqueror|safari|khtml)/i) > -1;
		this.Other= !this.IE && !this.Gecko && !this.Safari;
	},
flash: function(url, id, width, height) {
		s = '\
		<object type="application/x-shockwave-flash" data="' + url + '" width="' + width + '" height="' + height + '">\
		<param name="movie" value="' + url + '" />\
		<param name="wmode" value="transparent" />\
		</object>\
		';
		document.getElementById(id).innerHTML = s;
	},
toogle: function(id, obj) {
	var elem = (document.getElementById) ? document.getElementById(id) : ((document.all) ? document.all(id) : null);
	if (elem) {
		if (elem.style.display != 'none') { elem.style.display = 'none'; obj.innerHTML = langs.translate('en', '_more'); }
		else { elem.style.display = 'block'; obj.innerHTML = langs.translate('en', '_close'); }
	}
	},
	_last: null,
toogle_last: function(obj) {
	if (tasks._last != null && tasks._last != obj) {
		tasks._last.innerHTML = langs.translate('en', '_play');
	}
	tasks._last = obj;
	if (obj.innerHTML != langs.translate('en','_stop')) { obj.innerHTML = langs.translate('en', '_stop'); }
	else { obj.innerHTML = langs.translate('en', '_play'); }
	},
replace: function(x,y) {
	var t = null;
	t = x;
	x = y;
	y = t;
	return (y);
	},
get_cookie: function(n) {
	var search = n + '=';
	var value = '';
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search)
		if (offset != -1) {
			offset += search.length
			end = document.cookie.indexOf(';', offset);
			if (end == -1) end = document.cookie.length;
			value = unescape(document.cookie.substring(offset, end))
		}
	}
	return value;
	},
valid_cookie: function() {
	var result = tasks.get_cookie(n);
	if (result != '') { return true; }
	},
preload_images: function() {
	},
get: function(x) {
	tasks.set();
	},
set: function() {
	alert('ok');
	},
get_html_tags: function(obj) {

	}
	}
	

