function RetrieveFile(file)
{
fileName = file
+ "?" + new
Date().getTime();
obj = null;
try {
obj = new
XMLHttpRequest();
obj.overrideMimeType("text/xml");
}
catch(e){
try {obj = new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){ return null; }
}
if(!obj) return null;
try {
obj.open("GET",fileName,false);
obj.send(null);
}
catch(e){ return null; }
return
obj.responseText;
}
function
AddJavaScript(fileName)
{
if (RetrieveFile(fileName)==null) { return; }
var
myhead=document.getElementsByTagName('HEAD')[0];
var
myelement=document.createElement('SCRIPT');
myelement.type='text/javascript';
myelement.src=fileName;
myhead.appendChild(myelement);
}
AddJavaScript('/Custom/Js/Global.js');
AddJavaScript('/Custom/Js/Account.js');
|