function makeArray( obj, undefined ) {
if ( !obj ) return [];
var out = [], i = 0, j = 0;
if ( typeof obj.length === "number" ) {
for ( var l = obj.length; j < l; j++ ) {
out[ i++ ] = obj[ j ];
}
} else {
while ( obj[ j ] !== undefined ) {
out[ i++ ] = obj[ j++ ];
}
}
out.length = i;
return out;
}
function ajaxLoad(url, target) {
ajaxGet(url, function(content) {
var container = document.getElementById(target);
container.innerHTML = content;
var scripts = makeArray( container.getElementsByTagName("script") );
for (var i = 0; i < scripts.length; ++i) {
eval(scripts[i].innerHTML);
}
});
}