//|UBB编辑器JS代码1.0|
//|作者:舜子(PuterJam)|
//|版权所有2005|
//|===========================|
varUBBBrowerInfo=newObject();
varsAgent=navigator.userAgent.toLowerCase();
UBBBrowerInfo.IsIE=sAgent.indexOf("msie")!=-1;
UBBBrowerInfo.IsGecko=!UBBBrowerInfo.IsIE;UBBBrowerInfo.IsNetscape=sAgent.indexOf("netscape")!=-1;
if(UBBBrowerInfo.IsIE){
UBBBrowerInfo.MajorVer=navigator.appVersion.match(/MSIE(.)/)[1];
UBBBrowerInfo.MinorVer=navigator.appVersion.match(/MSIE..(.)/)[1];}
else{
UBBBrowerInfo.MajorVer=0;UBBBrowerInfo.MinorVer=0;
};
UBBBrowerInfo.IsIE55OrMore=UBBBrowerInfo.IsIE&&(UBBBrowerInfo.MajorVer>5||UBBBrowerInfo.MinorVer>=5);
varUBBScriptLoader=newObject();
UBBScriptLoader.IsLoading=false;
UBBScriptLoader.Queue=newArray();
UBBScriptLoader.AddScript=function(scriptPath){
UBBScriptLoader.Queue[UBBScriptLoader.Queue.length]=scriptPath;
//if(!this.IsLoading)this.CheckQueue();
};
UBBScriptLoader.CheckQueue=function(){
if(this.Queue.length>0){
this.IsLoading=true;
varsScriptPath=this.Queue[0];
varoTempArray=newArray();
for(i=1;i
vare;
if(sScriptPath.lastIndexOf('.css')>0){
e=document.createElement('LINK');
e.rel='stylesheet';e.type='text/css';
}
else
{
e=document.createElement("script");
e.type="text/javascript";
e.language="javascript";
};
document.getElementsByTagName("head")[0].appendChild(e);
varoEvent=function(){
if(this.tagName=='LINK'||!this.readyState||this.readyState=='loaded')UBBScriptLoader.CheckQueue();};
if(e.tagName=='LINK'){
if(UBBBrowserInfo.IsIE)e.onload=oEvent;elseUBBScriptLoader.CheckQueue();
e.href=sScriptPath;
}
else{
e.onload=e.onreadystatechange=oEvent;e.src=sScriptPath;
};
}
else
{
this.IsLoading=false;
if(this.OnEmpty)this.OnEmpty();};
}
varEditMethod="normal"
varUBBTextArea
//UBBBrowerInfo.IsIE判断是否是IE
//UBBBrowerInfo.IsGecko判断是否是Gecko
//初试化代码
if(UBBBrowerInfo.IsIE){
UBBScriptLoader.AddScript('common/UBBCode_IE.js')
}
if(UBBBrowerInfo.IsGecko){
UBBScriptLoader.AddScript('common/UBBCode_Gecko.js')
}
UBBScriptLoader.CheckQueue();