1
|
//\/////
|
2
|
|
3
|
//\ overLIB Crossframe Support Plugin
|
4
|
|
5
|
//\ This file requires overLIB 4.10 or later.
|
6
|
|
7
|
//\
|
8
|
|
9
|
//\ overLIB 4.05 - You may not remove or change this notice.
|
10
|
|
11
|
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
|
12
|
|
13
|
//\ Contributors are listed on the homepage.
|
14
|
|
15
|
//\ See http://www.bosrup.com/web/overlib/ for details.
|
16
|
|
17
|
//\/////
|
18
|
|
19
|
//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
|
20
|
|
21
|
if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.10))alert('overLIB 4.10 or later is required for the Cross Frame Support Plugin.');else{registerCommands('frame');
|
22
|
|
23
|
function parseFrameExtras(pf,i,ar){var k=i,v;
|
24
|
|
25
|
if(k<ar.length){if(ar[k]==FRAME){v=ar[++k];if(pf=='ol_')ol_frame=v;else opt_FRAME(v);return k;}}
|
26
|
|
27
|
return-1;}
|
28
|
|
29
|
function opt_FRAME(frm){o3_frame=frm;over=createDivContainer('overDiv');return 0;}
|
30
|
|
31
|
function frmDepth(thisFrame,ofrm){var retVal='';
|
32
|
|
33
|
for(var i=0;i<thisFrame.length;i++){if(thisFrame[i].length>0){retVal=frmDepth(thisFrame[i],ofrm);if(retVal=='')continue;}else if(thisFrame[i]!=ofrm)continue;retVal='['+i+']'+retVal;break;}
|
34
|
|
35
|
return retVal;}
|
36
|
|
37
|
function getFrmRef(srcFrm,tgetFrm){var rtnVal=''
|
38
|
|
39
|
if(tgetFrm!=srcFrm){var tFrm=frmDepth(top.frames,tgetFrm)
|
40
|
|
41
|
var sFrm=frmDepth(top.frames,srcFrm)
|
42
|
|
43
|
if(sFrm.length==tFrm.length){l=tFrm.lastIndexOf('[')
|
44
|
|
45
|
if(l){while( sFrm.substring(0,l)!=tFrm.substring(0,l) )
|
46
|
|
47
|
l=tFrm.lastIndexOf('[',l-1)
|
48
|
|
49
|
tFrm=tFrm.substr(l)
|
50
|
|
51
|
sFrm=sFrm.substr(l)}}
|
52
|
|
53
|
var cnt=0,p='',str=tFrm
|
54
|
|
55
|
while((k=str.lastIndexOf('['))!=-1){cnt++
|
56
|
|
57
|
str=str.substring(0,k)}
|
58
|
|
59
|
for(var i=0;i<cnt;i++)p=p+'parent.'
|
60
|
|
61
|
rtnVal=p+'frames'+sFrm+'.'}
|
62
|
|
63
|
return rtnVal}
|
64
|
|
65
|
function chkForFrmRef(){if(o3_frame!=ol_frame)fnRef=getFrmRef(ol_frame,o3_frame)
|
66
|
|
67
|
return true;}
|
68
|
|
69
|
registerCmdLineFunction(parseFrameExtras);registerPostParseFunction(chkForFrmRef);
|
70
|
|
71
|
}
|
72
|
|