/**
 * Dient als Comparator für die Methode Array.sort und
 * definiert, wie Characters verglichen werden sollen.
 * Ignoriert Groß- Kleinschreibung und sortiert Umlaute
 * zu den entsprtechenden Selbstlauten.
 * (ä == a, ß == s, usw.)
 * @param a erstes Argument
 * @param b zweites Argument
 * @return  0, wenn beide Argumente gleich sind
 *  	-1, wenn a größer als b ist
 *  	 1, sonst
 */
 /* sql="SELECT * FROM (SELECT (@num:=@num+1) AS idd, nodes.rid as id FROM itemnodes as nodes, xmfshopitems as items, xmfshopitemcats as itemcats, xmfshopitemcats as parentcats WHERE {queryx:raw} AND itemcats.rid=nodes.rid AND itemcats.parentid=parentcats.rid AND nodes.pid=items.pid  GROUP BY nodes.rid ORDER BY parentcats.bezeichnung,itemcats.bezeichnung ) as data" */

function stringComparison(a, b)	{
	a = a[2].toLowerCase();
	a = a[2].replace(/ä/g,"a");
	a = a[2].replace(/ö/g,"o");
	a = a[2].replace(/ü/g,"u");
	a = a[2].replace(/ß/g,"s");

	b = b[2].toLowerCase();
	b = b[2].replace(/ä/g,"a");
	b = b[2].replace(/ö/g,"o");
	b = b[2].replace(/ü/g,"u");
	b = b[2].replace(/ß/g,"s");

	return(a==b)?0:(a>b)?1:-1;
}

function vergleiche2D(x,y)
{
	if(x[2]<y[2]){res=-1} else if(y[2]<x[2]){res=1} else{res=0}
	return(res);
}

Array.prototype.multiSort = function(index)
{
	// Written By: WillyDuitt@hotmail.com | 03-10-2005 \\;
	for(var i=0; i<this.length; i++)
	{
		var temp = this[i].splice(index,1);
		this[i].unshift(temp);
	} 
	return this.sort();
} 