home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 September (Special)
/
Chip-Special_2002-09_Digitalni-Video.bin
/
software
/
premiere
/
ARCHIVE.Z
/
CSNSFix.js
< prev
next >
Wrap
Text File
|
2001-01-26
|
2KB
|
83 lines
<!--
//
// $Name: hbh_03 $
// $RCSfile: CSNSFix.js,v $
// $Revision: 1.3 $
//
CSStopExecution = false;
CSInit = new Array;
function CSScriptInit() {
if(typeof(skipPage) != "undefined") {
if(skipPage) return;
}
idxArray = new Array;
for(var i=0;i<CSInit.length;i++) {
idxArray[i] = i;
}
CSAction2(CSInit, idxArray);
}
CSStopExecution = false;
function CSAction(array) {
return CSAction2(CSAct, array);
}
function CSAction2(fct, array) {
var result;
for (var i=0;i<array.length;i++) {
if(CSStopExecution) return false;
var actArray = fct[array[i]];
if(actArray == null) return false;
var tempArray = new Array;
for(var j=1;j<actArray.length;j++) {
if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
if(actArray[j][0] == "VAR") {
tempArray[j] = CSStateArray[actArray[j][1]];
}
else {
if(actArray[j][0] == "ACT") {
tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
}
else
tempArray[j] = actArray[j];
}
}
else
tempArray[j] = actArray[j];
}
result = actArray[0](tempArray);
}
return result;
}
CSAct = new Object;
function CSFixFct() {
var d = document; var w = window;
if (d.cs.csFix.w != w.innerWidth || d.cs.csFix.h != w.innerHeight) {
d.location = d.location;
}
}
function CSNSFix(action) {
var d = document; var w = window;
if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
if (typeof d.cs == 'undefined') {
d.cs = new Object;
d.cs.csFix = new Object;
}
else if (CSIsFrame (w) == true) {
CSFixFct();
}
d.cs.csFix.w = w.innerWidth;
d.cs.csFix.h = w.innerHeight;
window.onresize = CSFixFct;
}
}
function CSIsFrame (window) {
var rootWindow = window.parent;
if (rootWindow == 'undefined') {
return false;
}
for (i = 0; i < rootWindow.frames.length; i++) {
if (window == rootWindow.frames[i]) return true;
}
return false;
}
// -->