[syntax="javascript"]function explode(inputstring, separators, includeEmpties){
inputstring = new String(inputstring);
separators = new String(separators);
if (separators === undefined || separators === null) {
separators = " :;";
}
fixedExplode = new Array(1);
currentElement = "";
count = 0;
var chart = '';
for (x = 0, x2 = inputstring.length; x < x2; x++) {
chart = inputstring.charAt(x);
if (separators.indexOf(chart) !== -1) {
if ((includeEmpties > 0 || includeEmpties === true) && currentElement !== "") {
fixedExplode[count] = currentElement;
count++;
currentElement = "";
}
}
else {
currentElement += chart;
}
}
if ((includeEmpties > 0 && includeEmpties === true) || currentElement !== "") {
fixedExplode[count] = currentElement;
}
return fixedExplode;
}[/syntax]