// 2.0.1 | roland | 2008-11-20 | belvita.it
function email_output(user, domain, tld, type, text, get, tag) {
	email = user+'@'+domain+'.'+tld;
	if(!text) text = email;
	if(tag) tag = ' '+tag;
	email = '<a href="mailto:'+email+get+'"'+tag+'>';
	if(type == 'all') email = email+text+'</a>';
	document.write(email);
}

function window_open(url, name, features) {
	window.open(url, name, features);
}

function element_showhide(id) {
	el = document.getElementById(id);
	el.style.display = (el.style.display != 'inline') ? 'inline' : 'none';
}

// Optional
function event_add(obj, type, fn) {
 	if(obj.attachEvent) {
		obj['e'+type+fn] = fn;
		obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
		obj.attachEvent('on'+type, obj[type+fn]);
	} else {
		obj.addEventListener(type, fn, false);
	}
}

function lytebox_open(url, title) {
	var objLink = document.createElement('a');
	objLink.setAttribute('href', url);
	objLink.setAttribute('rel', 'lytebox');
	objLink.setAttribute('title', title);
	myLytebox.start(objLink, false, false);
}

// Custom