rem: sitelist.sort(new Function("a", "b", "return a.site.title.toLowerCase() - b.site.title.toLowerCase()")); 
add: var sorter = function(a, b) { var str1 = a.site.title.toLowerCase(); var str2 = b.site.title.toLowerCase(); if (str1 > str2) return 1; else if (str1 < str2) return -1; return 0; } sitelist.sort(sorter); 
context: function renderSubscriptionView(collection, title) {   var sitelist = collection.list();   sitelist.sort(new Function("a", "b", "return a.site.title.toLowerCase() - b.site.title.toLowerCase()"));   res.data.title = title + " of user " + session.user.name;   res.data.sitelist = renderList(sitelist, "subscriptionlistitem");   res.data.body = session.user.renderSkinAsString("subscriptions");   res.handlers.context.renderSkin("page");   return;}
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/993/4a1ac5d84998f981fee6f7a097335c32d565585f/renderFunctions.js/buggy/code/MemberMgr/renderFunctions.js