The Code is as follows:
Function isAlien ()
{
Return isObject (a) & typeof a. constructor! = 'Function ';
}
Function isArray ()
{
Return isObject (a) & a. constructor = Array;
}
Function isBoolean ()
{
Return typeof a = 'boolean ';
}
Function isEmpty (o)
{
Var I, v;
If (isObject (o )){
For (I in o ){
V = o [I];
If (isUndefined (v) & isFunction (v )){
Return false;
}
}
}
Return true;
}
Function isFunction ()
{
Return typeof a = 'function ';
}
Function isNull ()
{
Return typeof a = 'object '&&! A;
}
Function isNumber ()
{
Return typeof a = 'number' & isFinite ();
}
Function isObject ()
{
Return (a & typeof a = 'object') | isFunction ();
}
Function isString ()
{
Return typeof a = 'string ';
}
Function isUndefined ()
{
Return typeof a = 'undefined ';
}
Function $ import (path, type, title)
{
Var s, I;
If (type = "js ")
{
Var ss = document. getElementsByTagName ("script ");
For (I = 0; I
{
If (ss [I]. src & ss [I]. src. indexOf (path )! =-1) return;
}
S = document. createElement ("script ");
S. type = "text/javascript ";
S. src = path;
}
Else if (type = "css ")
{
Var ls = document. getElementsByTagName ("link ");
For (I = 0; I
{
If (ls [I]. href & ls [I]. href. indexOf (path )! =-1) return;
}
S = document. createElement ("link ");
S. rel = "alternate stylesheet ";
S. type = "text/css ";
S. href = path;
S. title = title;
S. disabled = false;
}
Else return;
Var head = document. getElementsByTagName ("head") [0];
Head. appendChild (s );
}