Changed the ClientMentInfo class to compatible with IE6, IE7, IE8, Vista, Windows7, and Firefox.
The Code is as follows:
// Obtain the object
Function getObject (objectId, top)
{
Doc = top? Optional topics top.doc ument: document;
If (typeof (objectId )! = "Object" & typeof (objectId )! = "Function ")
{
If (doc. getElementById & doc. getElementById (objectId ))
{
// W3C DOM
Return doc. getElementById (objectId );
}
Else if (doc. getElementsByName (objectId ))
{
Return doc. getElementsByName (objectId) [0];
}
Else if (doc. all & doc. all (objectId ))
{
// MSIE 4 DOM
Return doc. all (objectId );
}
Else if (doc. layers & doc. layers [objectId])
{
// NN 4 DOM.. note: this won't find nested layers
Return doc. layers [objectId];
}
Else
{
Return false;
}
} Else
Return objectId;
}
// Obtain the relative path
Function getRelativePath ()
{
Var url = location. href; // The current url
Var urlcs = String (location. search );
Url = url. replace (urlcs ,"");
Var path = url. length-url. replace (// g ,""). length-3; // The level is the length of the url containing/-no length of the contained/, and then the number of project headers /.
Var str = "";
For (var I = 0; I <path; I ++)
{
Str + = "../"; // returns the result of combining the string with a relative path.
}
Return str;
}
// Load other JS files or CSS files
Function loadjscssfile (filename, filetype, chkonce)
{
Filetype =! Filetype? "Js": filetype;
Var had = false;
If (filetype = "js ")
{
If (chkonce)
{
Var allScripts = document. getElementsByTagName ("script ");
For (var I = 0; I {
Try {
If (allScripts [I]. src. indexOf (filename)>-1)
{
Had = true;
Break;
}
} Catch (e ){}
}
}
If (! Had)
{
Document. write ("