// IS object
document.IS = new IS();

// IS class
function IS() {}

// IS methods
// Permits to toogle (show or hide) an element.
IS.prototype.toggleElement = function(id) {
    var element = document.getElementById(id);
    (element.style.display == 'block')? element.style.display = 'none' : element.style.display = 'block';
}

// Hide the element
IS.prototype.hideElement = function(id) {
	var element = document.getElementById(id);
    element.style.display = 'none';
}

// Show the element with a specified style
IS.prototype.showElement = function(id, style) {
	var element = document.getElementById(id);
    element.style.display = style;
}

function email( name, address, link, subject, text ) {
	var dest = name +'@'+ address;
	var param = '';
//	var class = ( ( classType ) ? (' class="'+classType+'"') : '' );
	var classType = ' class="email"';
	link = ( link ) ? link : dest;
	var subject2 =  ( ( navigator.userAgent.indexOf('Win') != -1 ) ? escape( subject ) : subject );
	subject = subject2;

	if( ( subject ) || ( text ) ) {
		if( subject ) param = '?subject=' + subject;
		if( text ) param += ( ( subject ) ? '&body=' : '?body=' ) + text;
	}
	document.write( '<a href="mailto:' + dest + param +'"'+classType+'>' + link + '</a>' );
}

var Utils = {
 
	// public method for url encoding
	escape : function (str) {
		if (navigator.appVersion.indexOf("Win")!=-1) return escape(str);
		else return str.replace(/'/g,"%27");
	}
 
}