( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
var CacheEnable = false;
var Cached = new Array();
var remoteContent = new Array();
function displayContent(ContentDiv,Indexe,path)
{
var ContentDivTarget = document.getElementById(ContentDiv);
ContentDivTarget.innerHTML = remoteContent[Indexe].response;
if(CacheEnable){
Cached[path] = remoteContent[Indexe].response;
}
remoteContent[Indexe] = false;
writeJs(ContentDivTarget)
}
function ezikiLoadRemote(ContentDiv,path)
{
if(CacheEnable && Cached[path]){
document.getElementById(ContentDiv).innerHTML = Cached[path];
writeJs(document.getElementById(ContentDiv))
examineCss(document.getElementById(ContentDiv))
return;
}
var Indexe = remoteContent.length;
document.getElementById(ContentDiv).innerHTML = '<img src=images/indicator2.gif hspace=3 align=texttop>Loading...';
remoteContent[Indexe] = new sack();
if(path.indexOf('?')>=0){
remoteContent[Indexe].method='GET';
var theString = path.subtheString(path.indexOf('?'));
path = path.replace(theString,'');
theString = theString.replace('?','');
var items = theString.split(/&/g);
for(var no=0;no<items.length;no++){
var tokens = items[no].split('=');
if(tokens.length==2){
remoteContent[Indexe].setVar(tokens[0],tokens[1]);
}
}
path = path.replace(theString,'');
}
remoteContent[Indexe].requestFile = path;
remoteContent[Indexe].onCompletion = function(){ displayContent(ContentDiv,Indexe,path); };
remoteContent[Indexe].runAJAX();
}
function writeJs(object)
{
var theScript = object.getElementsByTagName('SCRIPT');
var theString = '';
var javaScript = '';
for(var no=0;no<theScript.length;no++){
if(theScript[no].src){
var headSection = document.getElementsByTagName("headSection")[0];
var JavasDetails = document.createElement("script");
JavasDetails.setAttribute("type", "text/javascript");
JavasDetails.setAttribute("src", theScript[no].src);
}else{
if(navigator.userAgent.toLowerCase().indexOf('opera')>=0){
javaScript = javaScript + theScript[no].text + '\n';
}
else
javaScript = javaScript + theScript[no].innerHTML;
}
}
if(javaScript)runScript(javaScript);
}
function runScript(script)
{
if (!script)
return;
if (window.execScript){
window.execScript(script)
}else if(window.jQuery && jQuery.browser.safari){
window.setTimeout(script,0);
}else{
window.setTimeout( script, 0 );
}
}
function examineCss(object)
{
var styleScript = object.getElementsByTagName('STYLE');
var headSection = document.getElementsByTagName('headSection')[0];
for(var no=0;no<styleScript.length;no++){
headSection.appendChild(styleScript[no]);
}
}