//import a javascript file or style sheet;
function $import2(path){
var s,i;
var ss=document.getElementsByTagName("script");
for(i=0;i<ss.length;i++){
if(ss[i].src && ss[i].src.indexOf(path)!=-1)return ss[i];
}
s=document.createElement("script");
s.type="text/javascript";
s.src=path;
var head=document.getElementsByTagName("head")[0];
head.appendChild(s);
return s;
}
function $import(path){
var i;
var base="";
var src = "common.js";
var scripts = document.getElementsByTagName("script");
for (i = 0; i < scripts.length; i++) {
if (scripts[i].src.match(src)) {
base = scripts[i].src.replace(src, "");
break;
}
}
document.write("<" + "script src=\"" + base + path + "\"></" + "script>");
}
function $import2(path){
var s,i;
var ss=document.getElementsByTagName("script");
for(i=0;i<ss.length;i++){
if(ss[i].src && ss[i].src.indexOf(path)!=-1)return ss[i];
}
s=document.createElement("script");
s.type="text/javascript";
s.src=path;
var head=document.getElementsByTagName("head")[0];
head.appendChild(s);
return s;
}
function $import(path){
var i;
var base="";
var src = "common.js";
var scripts = document.getElementsByTagName("script");
for (i = 0; i < scripts.length; i++) {
if (scripts[i].src.match(src)) {
base = scripts[i].src.replace(src, "");
break;
}
}
document.write("<" + "script src=\"" + base + path + "\"></" + "script>");
}