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

📄 script.js

📁 介绍ss7信令的好胶片
💻 JS
📖 第 1 页 / 共 3 页
字号:
function LoadSld()
{
	var sld=GetObj("SlideObj")
	if( !g_supportsPPTHTML ) {		
		sld.style.visibility="visible"
		return
	}

	if( MakeNotesVis() ) return

	runAnimations = _InitAnimations();
	
	if( IsWin("PPTSld") )
		parent.SldUpdated(GetSldId())
	g_origSz=parseInt(SlideObj.style.fontSize)
	g_origH=sld.style.posHeight
	g_origW=sld.style.posWidth
	g_scaleHyperlinks=(document.all.tags("AREA").length>0)
	if( g_scaleHyperlinks )
		InitHLinkArray()
	if( g_scaleInFrame||(IsWin("PPTSld") && parent.IsFullScrMode() ) )
		document.body.scroll="no"
	_RSW()
	if( IsWin("PPTSld") && parent.IsFullScrMode() )
		FullScrInit();
	
	MakeSldVis();
	ChkAutoAdv()

	if( runAnimations )
	{
		if( document.all("NSPlay") )
			document.all("NSPlay").autoStart = false;

		if( sld.filters && sld.filters.revealtrans )
			setTimeout( "document.body.start()", sld.filters.revealtrans.duration * 1000 );
		else
			document.body.start();
	}
}

function MakeSldVis() 
{
	var fTrans=g_showAnimation && SldHasTrans()
	if( fTrans )	
	{
		if( g_bgSound ) {
			idx=g_bgSound.indexOf(",");
			pptSound.src=g_bgSound.substr( 0, idx );
			pptSound.loop= -(parseInt(g_bgSound.substr(idx+1)));
		}
		SlideObj.filters.revealtrans.Apply()	
    }
	SlideObj.style.visibility="visible"
	if( fTrans )
		SlideObj.filters.revealtrans.Play()
}
function MakeNotesVis() 
{
	if( !IsNts() ) return false 
	SlideObj.style.display="none"
	nObj = document.all.item("NotesObj")
	parent.SetHasNts(0)
	if( nObj ) { 
		nObj.style.display=""
		parent.SetHasNts(1)
	}
	return 1
}
function ChkAutoAdv()
{
	if(SldHasTrans())
		SlideObj.onfilterchange=AutoAdv
	else
		AutoAdv()
}
function AutoAdv()
{
	if(!IsWin("PPTSld") || !gUseSldTimings )return
	var sld=GetCurSld()
	if( (sld.mAdvDelay>0) && !parent.IsFramesMode() )
		setTimeout("parent.GoToNextSld()",sld.mAdvDelay)
}
function GetObj(id)
{
	if(g_supportsPPTHTML) return document.all(id);
	else return document.getElementById(id);
}
function SldHasTrans() { return SlideObj.style.filter != ""; }
function GetSldId() 
{
	var regExp = /file:\/\/\//i
	var pos = location.href.search(regExp)
	if (MHTMLPrefix != "" && pos != -1)
		sId = location.href.substring(pos)
	else
	{
		sId = RemoveFilePrefixFromHref(location.href);
		var regExp = /\//
		var fixedHref = sId
		var pos = -1
	
		pos = fixedHref.search(regExp)
		while (pos != -1)
		{
			fixedHref = fixedHref.replace(regExp, "\\")
			pos = fixedHref.search(regExp)
		}
	
		if (g_fBaseHyperlink == true)
			sId = "file:///" + fixedHref;
		else
			sId = fixedHref.substring(fixedHref.lastIndexOf('\\') + 1)
	}
	
	return sId
}
function HideMenu() { if( frames["PPTSld"] && PPTSld.document.all.item("ctxtmenu") && PPTSld.ctxtmenu.style.display!="none" ) { PPTSld.ctxtmenu.style.display='none'; return true } return false }
function IsWin( name ) { return window.name == name }
function IsNts() { return IsWin("PPTNts") }
function IsSldOrNts() { return( IsWin("PPTSld")||IsWin("PPTNts") ) }
function SupportsPPTAnimation() { return( navigator.platform == "Win32" && navigator.appVersion.indexOf("Windows")>0 ) }
function SupportsPPTHTML()
{
	var appVer=navigator.appVersion, msie=appVer.indexOf("MSIE "), ver=0
	if( msie >= 0 )
		ver=parseFloat( appVer.substring( msie+5, appVer.indexOf(";",msie) ) )
	else
		ver=parseInt(appVer)

	return( ver >= 4 && msie >= 0 )
}
function _RSW()
{
	if( !g_supportsPPTHTML || IsNts() ||
	  ( !g_scaleInFrame && (!IsWin("PPTSld") || !parent.IsFullScrMode()) ) )
		return

        var padding=0;
        if( IsWin("PPTSld") && parent.IsFramesMode() ) padding=6

	cltWidth=document.body.clientWidth-padding
	cltHeight=document.body.clientHeight-padding
	factor=(1.0*cltWidth)/g_origW
	if( cltHeight < g_origH*factor )
		factor=(1.0*cltHeight)/g_origH

	newSize = g_origSz * factor
	if( newSize < 1 ) newSize=1

	s=SlideObj.style
	s.fontSize=newSize+"px"
	s.posWidth=g_origW*factor
	s.posHeight=g_origH*factor
	s.posLeft=(cltWidth-s.posWidth+padding)/2
	s.posTop=(cltHeight-s.posHeight+padding)/2

	if( g_scaleHyperlinks )
		ScaleHyperlinks( factor )
}
function _InitAnimations()
{
	animRuntimeInstalled = ''+document.body.localTime != 'undefined';
	isFullScreen = (window.name == "PPTSld") && !parent.IsFramesMode();
	g_animUseRuntime = g_showAnimation && animRuntimeInstalled && !(isFullScreen && parent.IsSldVisited());
	if( g_animUseRuntime ) {
		collSeq = document.all.tags("seq");
		if( collSeq != null ) {
			for(ii=0;ii<collSeq.length;ii++) {
				if( collSeq[ii].getAttribute( "p:nodeType" ) == "mainSeq" ) {
					g_animMainSequence = collSeq[ii];
					break;
				}
			}
		}
	
		if( g_animItemsToHide && document.body.playAnimations != false ) {
			for(jj = 0; jj < g_animItemsToHide.length; jj++) {
				if( hideObj = GetObj(g_animItemsToHide[jj]) )
					hideObj.runtimeStyle.visibility="hidden";
			}
		}

		if( g_animInteractiveItems ){
			for(jj = 0; jj < g_animInteractiveItems.length; jj++) {
				if( triggerObj = GetObj(g_animInteractiveItems[jj]) )
					triggerObj.runtimeStyle.cursor="hand";
			}
		}
		
		if( gUseSldTimings && ''+g_animSlideTime != 'undefined' ) {
			adjustedTime = document.body.calculateAutoAdvanceTimes( g_animSlideTime, g_animEffectTimings );
			if( IsWin("PPTSld") && adjustedTime != g_animSlideTime ) {
			   var sld = GetCurSld();
			   sld.mAdvDelay = adjustedTime * 1000;
			}
		}
	}

	return g_animUseRuntime;
}

gSldJump = 0, gSldJumpTrack = 0, gSldJumpIdx = "";

function _KPH()
{ 
	if( IsNts() ) return;

	if( !parent.IsFramesMode() && event.keyCode == 27 && !HideMenu() )
		parent.window.close( self );
	else if( event.keyCode == 32 ) {
		if( window.name == "PPTSld" )
			parent.PPTSld.DocumentOnClick();
		else
			parent.GoToNextSld();
	}

	CatchNumKeys( parent, event );
}

function CatchNumKeys( win, event ) {
	if( win.IsFullScrMode() && (48<=event.keyCode) && (event.keyCode<=57) ) {
		gSldJump = 1;
		gSldJumpIdx += (event.keyCode-48).toString();
	}
	if( win.IsFullScrMode() && gSldJump && event.keyCode == 13 ) {
		var numSlds = parent.GetSldList().mList.length
		if ( gSldJumpIdx > numSlds )
			gSldJumpIdx = numSlds;
		if ( gSldJumpIdx >= 0 ) {
			if ( gSldJumpIdx == 0 )
				gSldJumpIdx = 1;
			var jumpTo = parseInt(gSldJumpIdx);
			gSldJump = 0; gSldJumpIdx = "";
			win.GoToSld( parent.GetSldList().mList[jumpTo-1].mSldHref )
		}
	}
}

function _KDH()
{
	if( event.keyCode == 8 ) {
		event.returnValue = 0;
		parent.GoToPrevSld();
	}
}
function PlaySound( href, loop ){
	href= unescape(href);
	if( window.event ) window.event.cancelBubble = true;
	pptSound.src = href;
	pptSound.loop = loop ? -1 : 0;
}
function DocumentOnClick()
{
	if( IsNts() || parent.HideMenu() ) return;

	if( ( g_allowAdvOnClick && (window.name=="PPTSld") && !parent.IsFramesMode() ) ||
	    (event && event.keyCode==32) ) {
		
		if( g_animUseRuntime && g_animMainSequence && g_animMainSequence.cangonext )
			return;

		parent.GoToNextSld();
	}
}


var g_supportsPPTHTML = SupportsPPTHTML(), g_scaleInFrame = 1, gId="", g_bgSound="",
    g_scaleHyperlinks = false, g_allowAdvOnClick = 1, g_showInBrowser = 0, gLoopCont = 0, gUseSldTimings = 1;
var g_showAnimation = g_supportsPPTHTML && SupportsPPTAnimation() && ( (window.name=="PPTSld" && !parent.IsFramesMode()) || g_showInBrowser );var g_animManager = null;
var g_animUseRuntime = false;
var g_animItemsToHide, g_animInteractiveItems, g_animSlideTime;
var g_animMainSequence = null;

var ENDSHOW_MESG="放映结束,单击鼠标退出。", SCREEN_MODE="Frames", gIsEndShow=0, NUM_VIS_SLDS=131, SCRIPT_HREF="script.js", FULLSCR_HREF="fullscreen.htm";
var gCurSld = gPrevSld = 1, g_offset = 0, gNtsOpen = gHasNts = gOtlTxtExp = 0, gHasNarration = 0, gOtlOpen = true
window.gPPTHTML=SupportsPPTHTML()
var g_fBaseHyperlink = false;
var gMainDoc=new Array(new hrefList("slide0009.htm",1,-1,1),new hrefList("slide0197.htm",1,-1,1),new hrefList("slide0198.htm",1,-1,1),new hrefList("slide0200.htm",1,-1,1),new hrefList("slide0201.htm",1,-1,1),new hrefList("slide0202.htm",1,-1,1),new hrefList("slide0203.htm",1,-1,1),new hrefList("slide0204.htm",1,-1,1),new hrefList("slide0205.htm",1,-1,1),new hrefList("slide0206.htm",1,-1,1),new hrefList("slide0207.htm",1,-1,1),new hrefList("slide0208.htm",1,-1,1),new hrefList("slide0209.htm",1,-1,1),new hrefList("slide0210.htm",1,-1,1),new hrefList("slide0211.htm",1,-1,1),new hrefList("slide0212.htm",1,-1,1),new hrefList("slide0282.htm",1,-1,1),new hrefList("slide0283.htm",1,-1,1),new hrefList("slide0284.htm",1,-1,1),new hrefList("slide0215.htm",1,-1,1),new hrefList("slide0285.htm",1,-1,1),new hrefList("slide0216.htm",1,-1,1),new hrefList("slide0213.htm",1,-1,1),new hrefList("slide0214.htm",1,-1,1),new hrefList("slide0287.htm",1,-1,1),new hrefList("slide0288.htm",1,-1,1),new hrefList("slide0218.htm",1,-1,1),new hrefList("slide0219.htm",1,-1,1),new hrefList("slide0220.htm",1,-1,1),new hrefList("slide0221.htm",1,-1,1),new hrefList("slide0222.htm",1,-1,1),new hrefList("slide0223.htm",1,-1,1),new hrefList("slide0224.htm",1,-1,1),new hrefList("slide0225.htm",1,-1,1),new hrefList("slide0226.htm",1,-1,1),new hrefList("slide0227.htm",1,-1,1),new hrefList("slide0228.htm",1,-1,1),new hrefList("slide0229.htm",1,-1,1),new hrefList("slide0230.htm",1,-1,1),new hrefList("slide0232.htm",1,-1,1),new hrefList("slide0233.htm",1,-1,1),new hrefList("slide0234.htm",1,-1,1),new hrefList("slide0290.htm",1,-1,1),new hrefList("slide0235.htm",1,-1,1),new hrefList("slide0236.htm",1,-1,1),new hrefList("slide0289.htm",1,-1,1),new hrefList("slide0291.htm",1,-1,1),new hrefList("slide0237.htm",1,-1,1),new hrefList("slide0238.htm",1,-1,1),new hrefList("slide0239.htm",1,-1,1),new hrefList("slide0240.htm",1,-1,1),new hrefList("slide0241.htm",1,-1,1),new hrefList("slide0242.htm",1,-1,1),new hrefList("slide0243.htm",1,-1,1),new hrefList("slide0244.htm",1,-1,1),new hrefList("slide0245.htm",1,-1,1),new hrefList("slide0246.htm",1,-1,1),new hrefList("slide0247.htm",1,-1,1),new hrefList("slide0248.htm",1,-1,1),new hrefList("slide0249.htm",1,-1,1),new hrefList("slide0250.htm",1,-1,1),new hrefList("slide0251.htm",1,-1,1),new hrefList("slide0252.htm",1,-1,1),new hrefList("slide0253.htm",1,-1,1),new hrefList("slide0254.htm",1,-1,1),new hrefList("slide0255.htm",1,-1,1),new hrefList("slide0256.htm",1,-1,1),new hrefList("slide0257.htm",1,-1,1),new hrefList("slide0309.htm",1,-1,1),new hrefList("slide0310.htm",1,-1,1),new hrefList("slide0311.htm",1,-1,1),new hrefList("slide0312.htm",1,-1,1),new hrefList("slide0313.htm",1,-1,1),new hrefList("slide0326.htm",1,-1,1),new hrefList("slide0327.htm",1,-1,1),new hrefList("slide0314.htm",1,-1,1),new hrefList("slide0315.htm",1,-1,1),new hrefList("slide0316.htm",1,-1,1),new hrefList("slide0321.htm",1,-1,1),new hrefList("slide0325.htm",1,-1,1),new hrefList("slide0329.htm",1,-1,1),new hrefList("slide0328.htm",1,-1,1),new hrefList("slide0330.htm",1,-1,1),new hrefList("slide0331.htm",1,-1,1),new hrefList("slide0332.htm",1,-1,1),new hrefList("slide0322.htm",1,-1,1),new hrefList("slide0324.htm",1,-1,1),new hrefList("slide0333.htm",1,-1,1),new hrefList("slide0334.htm",1,-1,1),new hrefList("slide0323.htm",1,-1,1),new hrefList("slide0297.htm",1,-1,1),new hrefList("slide0298.htm",1,-1,1),new hrefList("slide0299.htm",1,-1,1),new hrefList("slide0300.htm",1,-1,1),new hrefList("slide0301.htm",1,-1,1),new hrefList("slide0302.htm",1,-1,1),new hrefList("slide0303.htm",1,-1,1),new hrefList("slide0304.htm",1,-1,1),new hrefList("slide0305.htm",1,-1,1),new hrefList("slide0306.htm",1,-1,1),new hrefList("slide0308.htm",1,-1,1),new hrefList("slide0307.htm",1,-1,1),new hrefList("slide0335.htm",1,-1,1),new hrefList("slide0336.htm",1,-1,1),new hrefList("slide0337.htm",1,-1,1),new hrefList("slide0338.htm",1,-1,1),new hrefList("slide0339.htm",1,-1,1),new hrefList("slide0340.htm",1,-1,1),new hrefList("slide0341.htm",1,-1,1),new hrefList("slide0342.htm",1,-1,1),new hrefList("slide0343.htm",1,-1,1),new hrefList("slide0344.htm",1,-1,1),new hrefList("slide0345.htm",1,-1,1),new hrefList("slide0346.htm",1,-1,1),new hrefList("slide0347.htm",1,-1,1),new hrefList("slide0348.htm",1,-1,1),new hrefList("slide0349.htm",1,-1,1),new hrefList("slide0350.htm",1,-1,1),new hrefList("slide0351.htm",1,-1,1),new hrefList("slide0352.htm",1,-1,1),new hrefList("slide0353.htm",1,-1,1),new hrefList("slide0354.htm",1,-1,1),new hrefList("slide0355.htm",1,-1,1),new hrefList("slide0356.htm",1,-1,1),new hrefList("slide0357.htm",1,-1,1),new hrefList("slide0358.htm",1,-1,1),new hrefList("slide0359.htm",1,-1,1),new hrefList("slide0360.htm",1,-1,1),new hrefList("slide0361.htm",1,-1,1),new hrefList("slide0362.htm",1,-1,1),new hrefList("slide0363.htm",1,-1,1));

/*********************************************
 Frameset functions

 These functions control slide navigation
 and state of the frameset.
**********************************************/

function RemoveFilePrefixFromHref(href)
{
	var regExp = /^file:\/\/\//i;
	return href.replace(regExp, "")
}

function FullScrInit()
{
	g_allowAdvOnClick = GetCurSld().mAdvOnClk
	document.body.style.backgroundColor="black"
	document.oncontextmenu=parent._CM;
	document.onkeydown = _KDH;
	document.ondragstart=Cancel
	document.onselectstart=Cancel
	self.focus()
}

function Redirect( frmId )
{	
	var str=document.location.hash,idx=str.indexOf('#'), sId=GetSldId()
	if(idx>=0) str=str.substr(1);
	if( window.name != frmId && ( sId != str) ) {
		obj = GetObj("Main-File")
		window.location.href=obj.href+"#"+sId
		return 1
	}
	return 0
}

var MHTMLPrefix = CalculateMHTMLPrefix(); 
function CalculateMHTMLPrefix()
{
	if ( document.location.protocol == 'mhtml:') { 
		href=new String(document.location.href) 
		Start=href.indexOf('!')+1 
		End=href.lastIndexOf('/')+1 
		if (End < Start) 
			return href.substring(0, Start) 
		else 
		return href.substring(0, End) 
	}
	return '';
}

function GetTags(base,tag)
{
	if(g_supportsPPTHTML) return base.all.tags(tag);
	else return base.getElementsByTagName(tag);
}


function UpdNtsPane(){ if(frames["PPTNts"]) PPTNts.location.replace( MHTMLPrefix+GetHrefObj( gCurSld ).mNtsHref ) }

function UpdNavPane( sldIndex ){ if(gNavLoaded) PPTNav.UpdNav() }

function UpdOtNavPane(){ if(gOtlNavLoaded) PPTOtlNav.UpdOtlNav() }

function UpdOtlPane(){ if(gOtlLoaded) PPTOtl.UpdOtl() }

function SetHasNts( fVal )
{
	if( gHasNts != fVal ) {
		gHasNts=fVal
		UpdNavPane()
	}
}

function ToggleOtlText()
{
	gOtlTxtExp=!gOtlTxtExp
	UpdOtlPane()
}

function ClearMedia()
{
	// Clear any sounds playing before launching another browser window. Otherwise,

⌨️ 快捷键说明

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