home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.tcs3.com
/
ftp.tcs3.com.tar
/
ftp.tcs3.com
/
DRIVERS
/
Audio
/
Office2010
/
ProPlus.WW
/
ProPsWW2.cab
/
PPCORE.DLL
/
RCDATA
/
5915
< prev
next >
Wrap
Text File
|
2010-03-09
|
1KB
|
43 lines
var g_HLinkArray = new Array();
function IMapAreaObj( areaObj, coords )
{
this.areaObj = areaObj;
this.coords = coords;
}
function InitHLinkArray()
{
var appVer = navigator.appVersion;
var msie = appVer.indexOf ( "MSIE " )
var ver = 0;
if ( msie >= 0 )
ver = parseInt ( appVer.substring( msie+5 ) );
linkNum = 0;
for (i=0; i<document.all.tags("AREA").length; i++) {
areaObj = document.all.tags("AREA").item(i);
if( ( areaObj.id != "pptxscale" ) || ( ver > 4 ) )
g_HLinkArray[linkNum++] = new IMapAreaObj( areaObj, ParseCoords( areaObj.coords ) );
}
}
function ScaleHyperlinks( factor )
{
for( ii=0; ii< g_HLinkArray.length; ii++) {
coordsStr="";
imaObj = g_HLinkArray[ii];
for ( jj=0; jj < imaObj.coords.length-1; jj++ )
coordsStr += (imaObj.coords[jj]*factor) + ",";
coordsStr += (imaObj.coords[jj]*factor);
imaObj.areaObj.coords = coordsStr;
}
}
function ParseCoords( coordsStr )
{
var numArray = new Array();
var i = curPos = commaPos = 0;
while ( ( commaPos = coordsStr.indexOf(",", curPos) ) != -1 ) {
numArray[i++] = parseInt( coordsStr.substr( curPos, commaPos ) );
curPos = commaPos + 1;
}
numArray[i] = parseInt( coordsStr.substr( curPos ) );
return numArray;
}