// Global functions...
function expand(id) {
  queue.add('includes/'+id+'.inc.php','','retour');
  return false;
  //this.add = function(url, params, function_name, object, values, methods)
}

function retour(str) {
  str = unescape(str);
  document.getElementById('container_projects').innerHTML = str;
}


function escape_string( string_to_escape ){
  return encodeURIComponent( string_to_escape );
}

function unescape_string( string_to_unescape ){
  return decodeURIComponent(string_to_unescape);
}


function get_xmlhttp(){
  var xmlhttp=null;
  
  try{
    xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  }catch(e){
    try{
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }catch(e){
      xmlhttp=new XMLHttpRequest();
    }
  }
  return xmlhttp;
}

function chr(code){
  return String.fromCharCode(code);
}

function glue(str,add,glue){
  if(!glue){
      glue='&';
  }
  
  if(str!='' && str!=null && add!='' && add!=null){
    str += glue;
  }

  return str + add;
}
