function getParamsFromString( loc ) { var params = {}; if (loc.length>0 ) { var parts = loc.slice(1).split('&'); if( parts.length>0 ) for( i=0 ; i