/**
 *A collection of Javascript functions which do not fit any where else.
 */

var OntuitionLMS = {};
 
/**
 *Parse a string into an array.
 */
OntuitionLMS.parseQuery = function( arg ){
    
  var result = {};
  
  var split = arg.split( '&' );
  
  for( var k = 0; k < split.length; k++){
    
    if( split[k].length > 0){
      
      var tmp = split[k].split( '=' );
      
      var left  = decodeURIComponent(tmp[0]);
      var right = decodeURIComponent(tmp[1]);
      
      result[left] = right;
    }
  }
  
  return result;
}

