⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gogoprod.js

📁 Ansoft_Designer视频教程
💻 JS
📖 第 1 页 / 共 5 页
字号:
return;while(_lA>nParentLimitX)
{_JB.moveEnd("word",-1);bDoIt=1;_lA=_kA+_JB.boundingWidth;}if(bDoIt)
{_JB.moveEnd("word",1);_lA=_kA+_JB.boundingWidth;while(_lA>nParentLimitX)
{_JB.moveEnd("character",-1);bDoIt=1;_lA=_kA+_JB.boundingWidth;}_JB.moveEnd("character",-2);pDiv.innerText=pDiv.innerText.substr(0,_JB.text.length)+"...";}}function _y()
{datObj=new Date("5:05am Jan 14 1969");szTest=datObj.toLocaleString();_eA=szTest.slice(szTest.lastIndexOf("05")+2,szTest.lastIndexOf("00"));}function _EA(tm)
{var nSeconds=tm;var nHours=Math.floor(nSeconds / 3600);nSeconds-=(nHours*3600);var nMins=Math.floor(nSeconds / 60);nSeconds=Math.round(nSeconds-(nMins*60));if(nSeconds==60)
{nSeconds=0;nMins++;}var szTime=nHours+_eA;if(nMins<10)
szTime+="0";szTime+=nMins+_eA;if(nSeconds<10)
szTime+="0";szTime+=nSeconds;return szTime;}function _CA()
{if(g_bTOCGenerated)
return;var _LB,i,_fA=_ZA.length,_ZB,_iB,nStartTime=0,bFirstPass=1;_ZB='';rgtmIndent=new Array();rgtmDur=new Array();for(i=0;i<MAX_TOC_INDENT;i++)
rgtmIndent[i]=g_nDuration;for(i=_fA-1;i>=0;i--)
{_LB=_ZA[i];if(_LB.GetTOCTitle())
{iIndent=_LB.GetTOCIndent();var tmLast=rgtmIndent[iIndent];for(j=iIndent;j<MAX_TOC_INDENT;j++)
rgtmIndent[j]=_LB.GetTime();rgtmDur[i]=tmLast-_LB.GetTime();}}for(i=0;i<_fA;i++)
{_LB=_ZA[i];_iB=_LB.GetTOCTitle();if(_iB)
{tm= _LB.GetTime();iIndent=_LB.GetTOCIndent();var _zB=iIndent*16;var _bB='TOC_ClickEntry('+_LB.nID.toString()+')';var szEventID=_LB.nID.toString();var szToolTip=_iB+","+g_szLength+" -- "+ _EA(rgtmDur[i]);var szCursor="";var nEntry=_LB.GetMediaFileEntry();_ZB+='<div id=_TOC'+ szEventID+' WMEventID="'+szEventID+'" WMEntry='+nEntry+' class=TOCEntryNormal style="'+szCursor+'text-indent:'+ _zB +'px" NOWRAP title="'+szToolTip+'" onclick="'+ _bB+'" onkeydown="'+_bB+'" TABINDEX=1>'+_iB+'</div>';}}g_rgTOC=new Array();TOCContentDiv.innerHTML=_ZB;var pDivs=TOCContentDiv.all.tags("DIV");for(i=0;i<pDivs.length;i++)
{g_rgTOC[g_rgTOC.length]=pDivs(i);}g_rgTOC.sort(new Function("x","y","if (parseInt(x.WMEventID)<parseInt(y.WMEventID)) return -1;else return 1;"));g_bTOCGenerated=1;}function TOC_ClickEntry(nID)
{if(event.type.toLowerCase()== "keydown")
if(event.keyCode!=13)
return;if(IsPresentationNotLocalOnNT4())
return;g_nIgnoreThisEvent=-1;_u(nID,0);event.returnValue=0;}function _DA()
{var _LB=_XA;var pTag,i;for(i=g_rgTOC.length-1;i>=0;i--)
{if(_LB.nID>=parseInt(g_rgTOC[i].WMEventID))
{pTag=g_rgTOC[i];break;}}if(pTag==null&&g_rgTOC.length)
{pTag=g_rgTOC[0];}if(pTag!=null)
{if(_bA!=null)
_bA.className="TOCEntryNormal";pTag.className="TOCEntryNowPlaying";var _rA=TOCContentDiv.offsetHeight+TOCContentDiv.scrollTop;var nOffset=pTag.offsetTop+pTag.offsetHeight;if((nOffset-2)> _rA)
TOCContentDiv.scrollTop=nOffset-TOCContentDiv.offsetHeight;else
{if(pTag.offsetTop<TOCContentDiv.scrollTop)
{TOCContentDiv.scrollTop=pTag.offsetTop;}}EllipsifyTOC(_bA);_bA=pTag;EllipsifyTOC(pTag);try
{if(g_bPreviewMode)
pTag.blur();else
pTag.focus();}catch(e)
{ }}else
{}setTimeout("MediaPlayer_UpdateNextPrevButtons();",1);}function LinkLayout_OnReadyStateChange()
{if(g_nPlayStatus==_H)
{var _gB=LINKLAYOUT.readyState;if(_gB=="complete")
{setTimeout("window.onresize()",1);EllipsifyTOC();if(!_I())
{SlidesDiv.children.item("SlidesFrame").style.visibility=SlidesDiv.style.visibility;HTML1Div.children.item("HTML1Frame").style.visibility=HTML1Div.style.visibility;}}else if(_gB=="loading")
{}}}function SlidesFrame_OnReadyStateChange()
{var srcElement=window.event.srcElement
if(srcElement.readyState=="complete"&&srcElement.src!="")
{SlidesDiv.style.visibility="visible";}else
{SlidesDiv.style.visibility="hidden";}}function HTML1Frame_OnReadyStateChange()
{var _gB=window.event.srcElement.readyState;var srcElement=window.event.srcElement;if(srcElement.readyState=="complete"&&srcElement.src!="")
{HTML1Div.style.visibility="visible";}else
{HTML1Div.style.visibility="hidden";}}function PrerollScreen_SetStatus()
{InitCustomDIVTagLists();if(g_nPlayStatus==_G||g_nPlayStatus==_F)
{_jB=CONST_PREROLL_IMAGE_SCRIPT;_jB=_jB.replace(new RegExp("%1!s!","i"),unescape(g_szLoadingImg));_jB=_jB.replace(new RegExp("%2!s!","i"),g_szLoadingImgWidth);_jB=_jB.replace(new RegExp("%3!s!","i"),g_szLoadingImgHeight);LoadingWaitDiv_ImgDiv.innerHTML=_jB;LoadingWaitDiv_TitleDiv.innerHTML=unescape(g_szLoadingTitle);LoadingWaitDiv_PresenterDiv.innerHTML=unescape(g_szLoadingPresenter);LoadingWaitDiv_DescDiv.innerHTML=unescape(g_szLoadingDesc);if(g_bPrerollOnlyMode)
{LoadingWaitDiv_Play.innerHTML="";LoadingWaitDiv_Anm.src=CONST_PREROLL_IMGSTATIC;}else
{LoadingWaitDiv_Play.innerHTML=unescape(g_szLoadingWait);LoadingWaitDiv_Play.title=unescape(g_szLoadingWait);LoadingWaitDiv_Anm.src=CONST_PREROLL_ANIMATION;}LoadingWaitDiv_Play.className=CONST_PREROLL_LOADINGTEXT;if(g_szLoadingImg=="")
LoadingWaitDiv_ImgDiv.style.display="none";}else if(g_nPlayStatus==CONST_PS_READY)
{LoadingWaitDiv_Play.innerHTML=unescape(g_szLoadingPlay);LoadingWaitDiv_Play.title=unescape(g_szLoadingPlay);g_bPausedForDownload=0;LoadingWaitDiv_Anm.src=CONST_PREROLL_IMGSTATIC;LoadingWaitDiv_Play.className=CONST_PREROLL_LOADEDTEXT;try
{LoadingWaitDiv_A.focus();}catch(e)
{ }}else
{PlayerPlayPause.title=g_PlayPauseTip;PlayerPrevious.title=g_PreviousTip;PlayerNext.title=g_NextTip;if(g_szDiscussionServerURL.length&&!g_bPreviewMode)
{PlayerDiscussion.style.visibility="visible";PlayerDiscussion.title=g_DiscussionTip;}}setTimeout("window.onresize()",1);}function PrerollScreen_DisplayTags()
{InitCustomDIVTagLists();if(g_nPlayStatus==_H||g_fCreatingThumbnail)
{if(g_rgrgCustomDIVLists["WMPrerollDisplay"])
{var i;for(i=0;g_rgrgCustomDIVLists&&i<g_rgrgCustomDIVLists["WMPrerollDisplay"].length;i++)
{var pTag=g_rgrgCustomDIVLists["WMPrerollDisplay"][i];if(pTag.currentStyle.WMPrerollDisplay=="inline")
pTag.style.display="none";else if(pTag.currentStyle.WMPrerollDisplay=="none")
pTag.style.display="inline";}if(!g_rgrgCustomDIVLists)
return 0;}}else
{if(g_rgrgCustomDIVLists["WMPrerollDisplay"])
{var i;for(i=0;g_rgrgCustomDIVLists&&i<g_rgrgCustomDIVLists["WMPrerollDisplay"].length;i++)
{var pTag=g_rgrgCustomDIVLists["WMPrerollDisplay"][i];if(pTag.currentStyle.WMPrerollDisplay=="inline")
pTag.style.display="inline";else if(pTag.currentStyle.WMPrerollDisplay=="none")
pTag.style.display="none";}if(!g_rgrgCustomDIVLists)
return 0;}}return 1;}function SetDynamicDivDimensions()
{InitCustomDIVTagLists();var i;if(g_rgrgCustomDIVLists["WMBodyWidth"])
{for(i=0;i<g_rgrgCustomDIVLists["WMBodyWidth"].length;i++)
{var divtag=g_rgrgCustomDIVLists["WMBodyWidth"][i];var szVis=divtag.style.visibility;if(szVis.length&&szVis=="hidden")
continue;if(divtag.currentStyle.WMBodyWidth)
{divtag.runtimeStyle.width=document.body.clientWidth;}}}if(g_rgrgCustomDIVLists["WMBodyHeight"])
{for(i=0;i<g_rgrgCustomDIVLists["WMBodyHeight"].length;i++)
{var divtag=g_rgrgCustomDIVLists["WMBodyHeight"][i];var szVis=divtag.style.visibility;if(szVis.length&&szVis=="hidden")
continue;var nTop=GetStyleValue_Integer(divtag.currentStyle.top);var nOffset=GetStyleValue_Integer(divtag.currentStyle.WMBodyHeight);if(document.body.clientHeight>=nTop+nOffset)
{divtag.runtimeStyle.height=(document.body.clientHeight+document.body.scrollTop)-nTop-nOffset;}}}if(g_rgrgCustomDIVLists["WMParentHeight"])
{for(i=0;i<g_rgrgCustomDIVLists["WMParentHeight"].length;i++)
{var divtag=g_rgrgCustomDIVLists["WMParentHeight"][i];var _rA=GetStyleValue_Integer(divtag.parentElement.currentStyle.height);if(document.body.clientHeight>=1&&divtag.parentElement.style.visibility=="visible"&&_rA>=divtag.currentStyle.WMParentHeight)
{divtag.runtimeStyle.height=_rA-divtag.currentStyle.WMParentHeight;}}}if(DiscussionDiv.style.visibility=="visible")
{DiscussionGripImage.runtimeStyle.left=(document.body.clientWidth-CONST_DISCUSSION_GRIP_WIDTH) / 2;SetDivContentHeight();}}function GetStyleValue_Integer(tagVal)
{if(isNaN(parseInt(tagVal)))
{return 0;}else
{return parseInt(tagVal);}}function SetDivContentHeight()
{var htMin=GetStyleValue_Integer(DiscussionContentDiv.currentStyle.WMMinHeight);var ht=(document.body.clientHeight+document.body.scrollTop)-(GetStyleValue_Integer(DiscussionDiv.style.top)+SCROLLBARHEIGHT);if(ht>htMin)
DiscussionContentDiv.style.height= ht;else
DiscussionContentDiv.style.height= htMin;}function _g()
{if(_dA==null)
return;var enm=new Enumerator(ViewDiv.all.tags("table"));var str=new String();var _GA=0;for(;!enm.atEnd();enm.moveNext())
{str=enm.item().id;if(_J(str.substr(0,7),"Replies"))
{var obj=new Object();obj.id=str.substr(7,str.length);obj.state=document.all.item(str).style.display;var _WB=new String();_WB="Arrow"+obj.id;_WB=document.all.item(_WB).src;obj.file =_WB;_dA[_GA++]=obj;}}}function _v()
{if(_dA==null)
return;var _GA=0;for(;_GA<_dA.length;_GA++)
{var strID=new String();strID="Replies"+_dA[_GA].id;if(document.all.item(strID))
{document.all.item(strID).style.display=_dA[_GA].state;var _WB=new String();_WB="Arrow"+_dA[_GA].id;document.all.item(_WB).src=_dA[_GA].file;}}}function _e()
{try
{var d=g_OSE_DServers.Add(g_szDiscussionServerURL ,g_szDiscussionServerURL);d.SetAsDefault();_PA=g_OSE.OpenDiscussions(location.href);}catch (e)
{return 0;}return 1;}function CreateDiscussionServerObjects()
{try
{g_OSE=new ActiveXObject("OSE.Global");g_OSE_DServers=new ActiveXObject("OSE.DiscussionServers");}catch(e)
{ViewDiv.innerHTML="<br><CENTER><SPAN class=DiscussErrorText>"+g_szDiscussionActiveXDownloadFailed+"</SPAN></CENTER>";return;}if(g_OSE!=null&&g_OSE_DServers!=null)
{if(_e())
RefreshDiscussions();else
ViewDiv.innerHTML="<br><CENTER><SPAN class=DiscussErrorText>"+g_szDiscussionConnectionFailed+"</SPAN></CENTER>";}}function AddNewTopic()
{MediaPlayer_Pause();try
{var nTime=GetPresentationTime();var szPos=_EA(nTime);for(i=1;i<=_PA.Count;i++)
{if(_J(_PA(i).Bookmark,szPos))
{alert(_PA(i).Bookmark+" "+g_szDiscussionTopicExists);MediaPlayer_PlayPause();return;}}var arg=new Array();arg[0]=szPos;arg[1]="AddTopic";arg[2]="";arg[3]="";var text=showModalDialog("AdEdDlg.htm",arg,"status:no;dialogHeight=345px;dialogWidth=450px;resizable=yes;help=no;");if(text!=null)
{_PA.Add(text[0],nTime.toString(),szPos);_PA(_PA.Count).Discussions.Add(text[1],text[2],"1");CreateDiscussionServerObjects();}}catch (e)
{alert(e.description);}MediaPlayer_Play();}function Reply (level)
{MediaPlayer_Pause();try
{var obj=_h(level,"Reply");var arg=new Array();arg[0]=_PA(obj.top).Bookmark;arg[1]="Reply";arg[2]=_PA(obj.top).Discussions(obj.bottom).Subject;arg[3]=_PA(obj.top).Discussions(obj.bottom).Text;arg[4]=_PA(obj.top).Subject;var text=showModalDialog("AdEdDlg.htm",arg,"status:no;dialogHeight=345px;dialogWidth=450px;resizable=yes;help=no;");if(text!=null)
{if(obj.numBottom!=_PA(obj.top).Discussions.Count)
{for(i=1;i<=_PA(obj.top).Discussions.Count;i++)
{num=parseInt(_PA(obj.top).Discussions(i).Bookmark);if(num>obj.numBottom)
{num+=1;_PA(obj.top).Discussions(i).AutoCommit=0;_PA(obj.top).Discussions(i).Bookmark=num.toString();_PA(obj.top).Discussions(i).Commit();}}}obj.numBottom+=1;_PA(obj.top).Discussions.Add(text[1],text[2],obj.numBottom.toString());CreateDiscussionServerObjects();}}catch(e)
{alert(e.description);}MediaPlayer_Play();}function Edit (level)
{MediaPlayer_Pause();try
{var obj=_h(level,"Edit");var arg=new Array();arg[0]=_PA(obj.top).Bookmark;arg[1]="Edit";arg[2]=_PA(obj.top).Discussions(obj.bottom).Subject;arg[3]=_PA(obj.top).Discussions(obj.bottom).Text;arg[4]=_PA(obj.top).Subject;var text=showModalDialog("AdEdDlg.htm",arg,"status:no;dialogHeight=345px;dialogWidth=450px;resizable=yes;help=no;");if(text!=null)
{_PA(obj.top).Discussions(obj.bottom).AutoCommit=0;_PA(obj.top).Discussions(obj.bottom).Subject=text[1];_PA(obj.top).Discussions(obj.bottom).Text=text[2];_PA(obj.top).Discussions(obj.bottom).Commit();CreateDiscussionServerObjects();}}catch(e)
{alert(e.description);}MediaPlayer_Play();}function Delete (level)
{MediaPlayer_Pause();try
{var obj=_h(level,"Delete");var _TB=g_szDiscussionConfirmDeleteDiscussion;if(_PA(obj.top).Discussions.Count==1)
_TB=g_szDiscussionConfirmDeleteTopic;if(confirm(_TB))
{_PA(obj.top).Discussions(obj.bottom).Delete();for(i=1;i<=_PA(obj.top).Discussions.Count;i++)
{var num=parseInt(_PA(obj.top).Discussions(i).Bookmark);if(num>obj.numBottom)
{num-=1;_PA(obj.top).Discussions(i).AutoCommit=0;_PA(obj.top).Discussions(i).Bookmark=num.toString();_PA(obj.top).Discussions(i).Commit();}}if(_PA(obj.top).Discussions.Count==0)
_PA(obj.top).Delete();CreateDiscussionServerObjects();}}catch(e)
{alert(e.description);}MediaPlayer_Play();}function RefreshDiscussions()
{if(g_OSE!=null&&g_OSE_DServers!=null&&_PA!=null)
{_g();var rgTop=new Array(_PA.Count);for(i=0;i<rgTop.length;i++)
rgTop[i]=_PA(i+1);rgTop.sort(SortByField("Bookmark"));var view="";var level ="";view+="<TABLE><TR>";view+="<TD class=DiscussAddRefreshTopic onclick=AddNewTopic() onmouseover=\"this.style.cursor=\'hand\'\">"+g_szDiscussionAddNewTopic+"</TD>";view+="<TD class=DiscussAddRefreshTopic onclick=CreateDiscussionServerObjects() onmouseover=\"this.style.cursor=\'hand\'\">"+g_szDiscussionRefreshTopics+"</TD>";view+="</TR></TABLE>";for(i=0;i<rgTop.length;i++)
{view+="";view+="<TABLE cellpadding=0 cellspacing=0 width=100% ID=Topic"+(rgTop[i].Text)+" class=DiscussTopic style=\"border-collapse:collapse\"><TR>";view+= "<TD>&nbsp;<IMG ID=Arrow"+i+" align=middle onclick=ExpandCollapse("+i+") style=\"cursor:hand\" src=\""+g_InitialCSSDirectory+"/PArrow.gif\">&nbsp;</td>";view+= "<TD width=75% onclick=SetTopic(\"Topic"+rgTop[i].Text+"\") title=\""+g_szDiscussionTopicTooltip+"\" align=left>"+rgTop[i].Subject+"</TD>";view+= "<TD width=25% onclick=SetTopic(\"Topic"+rgTop[i].Text+"\") title=\""+g_szDiscussionTopicTooltip+"\" align=right style=\"padding-right:10px\">"+_EA(rgTop[i].Text)+"&#32;<IMG src=\""+g_InitialCSSDirectory+"/Clock.gif\" "+rgTop[i].Bookmark+"</TD>";view+="</TR></TABLE>";var rgBottom=new Array();for(k=1;k<=rgTop[i].Discussions.Count;k++)
{rgBottom[rgTop[i].Discussions(k).Bookmark-1]=rgTop[i].Discussions(k);}if(rgBottom.length!=rgTop[i].Discussions.Count)
alert ("Bottom array #"+i+" has "+rgBottom.length+"  element(s) instead of "+rgTop[i].Discussions.Count);view+="<TABLE ID=Replies"+i+" width=100% style=\"border-collapse:collapse;display:none;\">";for(j=1;j<=rgBottom.length;j++)
{level=rgTop[i].Bookmark+"/"+rgBottom[j-1].Bookmark;_LA=0;if(j>1)
{_XB=rgBottom[j-1].Subject;_YB=rgBottom[j-2].Subject;_LA=_J(_XB,_YB);}if(!_LA)
view+="<TR><TD colspan=5 class=DiscussSubject>"+g_szDiscussionSubject+": <B>"+rgBottom[j-1].Subject+"</B></TD></TR>";view+="<TR><TD class=DiscussAuthor width=35%>"+rgBottom[j-1].Author+"</TD>";view+="<TD class=DiscussReplyEditDelete width=10% align=center>";view+="<SPAN ID=Reply"+level+" onclick=Reply(this.id) onmouseover=\"this.style.cursor=\'hand\'\">"+g_szDiscussionReply+"</SPAN></TD>";view+="<TD class=DiscussReplyEditDelete width=10% align=center>";view+="<SPAN ID=Edit" +level+" onclick=Edit(this.id) onmouseover=\"this.style.cursor=\'hand\'\">"+g_szDiscussionEdit+"</SPAN></TD>";view+="<TD class=DiscussReplyEditDelete width=10% align=center>";view+="<SPAN ID=Delete"+level+" onclick=Delete(this.id) onmouseover=\"this.style.cursor=\'hand\'\">"+g_szDiscussionDelete+"</SPAN></TD>";var dtUTC=new Date(rgBottom[j-1].TimeStamp);var dtLcl=new Date(Date.UTC(dtUTC.getYear(),dtUTC.getMonth(),dtUTC.getDate(),dtUTC.getHours(),dtUTC.getMinutes(),dtUTC.getSeconds(),dtUTC.getMilliseconds()));view+="<TD class=DiscussTimeStamp width=35% align=right>"+dtLcl.toString()+"</TD></TR>";view+="<TR><TD colspan=5 class=DiscussText>"+rgBottom[j-1].Text+"</TD></TR>";}view+="</TABLE>";view+="<BR>";}ViewDiv.innerHTML=view;_v();}else
{ViewDiv.innerHTML="<CENTER><SPAN class=DiscussErrorText>"+g_szDiscussionConnectionFailed +"</SPAN></CENTER>";return;}}function _h(level,action)
{var obj=new Object();var str=new String(level);var index=str.search("/");var strTop=str.substring(action.length,index);var numBottom=parseInt(str.substr(index+1,str.length));var l=1;while(l<=_PA.Count)
{if(_J(_PA(l).Bookmark,strTop))
break;l++;}var s=1;while(s<=_PA(l).Discussions.Count)
{if(parseInt(_PA(l).Discussions(s).Bookmark)==numBottom)
break;s++;}obj.top=l;obj.bottom=s;obj.numBottom=numBottom;return obj;}function SetTopic(refTime)
{var str=new String(refTime);str=str.substr(5,str.length);var _LB=null,i,_oA=_ZA.length;_LB=_ZA[0];for(i=1;i<_oA;i++)
{if(_ZA[i].fTime>parseFloat(str))
{break;}_LB=_ZA[i];}_u(_LB.nID,1);MediaPlayer_SetCurrentLocation(_LB.GetMediaFileEntry(),parseFloat(str));}f

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -