var ns6=document.getElementById&&!document.all
var ie=document.all

function showText(thetext, whichdiv){
	if (ie) eval("document.all."+whichdiv).innerHTML=thetext;
	else if (ns6) document.getElementById(whichdiv).innerHTML=thetext;
}

function showText(thetext, whichdiv,append){
	if(append==1) {
		if (ie) eval("document.all."+whichdiv).innerHTML += thetext;
		else if (ns6) document.getElementById(whichdiv).innerHTML += thetext;
	} else {
		if (ie) eval("document.all."+whichdiv).innerHTML = thetext;
		else if (ns6) document.getElementById(whichdiv).innerHTML = thetext;
	}
}

function defaultFunctionHelp(){
	showText('Click on the different modules to activate them. Click a second time on the module control button to disable the module.', 'function_help');
}
function defaultEvolutionHelp(){
	showText('Click on the different modules to activate them. Click a second time on the module control button to disable the module.', 'evolution_help');
}
function defaultSequenceHelp(){
	showText('Click on the different modules to activate them. Click a second time on the module control button to disable the module.', 'sequence_help');
}
function defaultStructureHelp(){
	showText('Click on the different modules to activate them. Click a second time on the module control button to disable the module.', 'structure_help');
}
function defaultMoreInfoHelp(){
	showText('Click on the different modules to activate them. Click a second time on the module control button to disable the module.', 'moreinfo_help');
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

String.prototype.startsWith = function(str) 
{return (this.match("^"+str)==str)}
