1// -- Adobe GoLive JavaScript Library 2// -- Global Functions 3CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10); 4CSIsW3CDOM = ((document.getElementById) && !(IsIE()&&CSBVers<6)) ? true : false; 5function IsIE() { return CSAg.indexOf("MSIE") > 0;} 6function CSIEStyl(s) { return document.all.tags("div")[s].style; } 7function CSNSStyl(s) { if (CSIsW3CDOM) return document.getElementById(s).style; else return CSFindElement(s,0); } 8CSIImg=false; 9function CSInitImgID() {if (!CSIImg && document.images) { for (var i=0; i<document.images.length; i++) { if (!document.images[i].id) document.images[i].id=document.images[i].name; } CSIImg = true;}} 10function CSFindElement(n,ly) { if (CSBVers<4) return document[n]; 11 if (CSIsW3CDOM) {CSInitImgID();return(document.getElementById(n));} 12 var curDoc = ly?ly.document:document; var elem = curDoc[n]; 13 if (!elem) {for (var i=0;i<curDoc.layers.length;i++) {elem=CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }} 14 return elem; 15} 16function CSGetImage(n) {if(document.images) {return ((!IsIE()&&CSBVers<5)?CSFindElement(n,0):document.images[n]);} else {return null;}} 17CSDInit=false; 18function CSIDOM() { if (CSDInit)return; CSDInit=true; if(document.getElementsByTagName) {var n = document.getElementsByTagName('DIV'); for (var i=0;i<n.length;i++) {CSICSS2Prop(n[i].id);}}} 19function CSICSS2Prop(id) { var n = document.getElementsByTagName('STYLE');for (var i=0;i<n.length;i++) { var cn = n[i].childNodes; for (var j=0;j<cn.length;j++) { CSSetCSS2Props(CSFetchStyle(cn[j].data, id),id); }}} 20function CSFetchStyle(sc, id) { 21 var s=sc; while(s.indexOf("#")!=-1) { s=s.substring(s.indexOf("#")+1,sc.length); if (s.substring(0,s.indexOf("{")).toUpperCase().indexOf(id.toUpperCase())!=-1) return(s.substring(s.indexOf("{")+1,s.indexOf("}")));} 22 return ""; 23} 24function CSGetStyleAttrValue (si, id) { 25 var s=si.toUpperCase(); 26 var myID=id.toUpperCase()+":"; 27 var id1=s.indexOf(myID); 28 if (id1==-1) return ""; 29 s=s.substring(id1+myID.length+1,si.length); 30 var id2=s.indexOf(";"); 31 return ((id2==-1)?s:s.substring(0,id2)); 32} 33function CSSetCSS2Props(si, id) { 34 var el=document.getElementById(id); 35 if (el==null) return; 36 var style=document.getElementById(id).style; 37 if (style) { 38 if (style.left=="") style.left=CSGetStyleAttrValue(si,"left"); 39 if (style.top=="") style.top=CSGetStyleAttrValue(si,"top"); 40 if (style.width=="") style.width=CSGetStyleAttrValue(si,"width"); 41 if (style.height=="") style.height=CSGetStyleAttrValue(si,"height"); 42 if (style.visibility=="") style.visibility=CSGetStyleAttrValue(si,"visibility"); 43 if (style.zIndex=="") style.zIndex=CSGetStyleAttrValue(si,"z-index"); 44 } 45} 46function CSSetStylePos(s,d,p) { 47 if (CSIsW3CDOM)d==0?document.getElementById(s).style.left=p+"px":document.getElementById(s).style.top=p+"px"; 48 else if(IsIE())(d==0)?CSIEStyl(s).posLeft=p:CSIEStyl(s).posTop=p; 49 else (d==0)?CSNSStyl(s).left=p:CSNSStyl(s).top=p; 50} 51function CSGetStylePos(s,d) { 52 if (CSIsW3CDOM){CSIDOM();return parseInt((d==0)?document.getElementById(s).style.left:document.getElementById(s).style.top);} 53 else if (IsIE()) {CSIEWinInit();return(d==0)?CSIEStyl(s).posLeft:CSIEStyl(s).posTop;} 54 else {return (d==0)?CSNSStyl(s).left:CSNSStyl(s).top;} 55} 56CSIEWInit=false; 57function CSIEWinInit() { if(CSIEWInit==true) return; else CSIEWInit=true; if (IsIE()&&(CSAg.indexOf("Win")!=-1)&&CSBVers==4) { var i=0; var lyr=document.all.tags("div")[i++]; while(lyr) {lyr.style.posLeft=lyr.offsetLeft; lyr.style.posTop=lyr.offsetTop; lyr=document.all.tags("div")[i++];}}} 58CSLoopIsRunning = false; CSFctArray = new Array; CSTimeoutID = null; 59function CSLoop() { 60 CSLoopIsRunning = false; 61 for (i=0;i<CSFctArray.length;i++) { 62 var curFct = CSFctArray[i]; 63 if (curFct) { 64 if (curFct.DoFunction(curFct)) { CSLoopIsRunning = true; curFct.counter++; } 65 else CSFctArray[i] = 0; 66 } 67 } 68 if (CSLoopIsRunning) CSTimeoutID = setTimeout("CSLoop()", 1); 69} 70function CSStartFunction(fct,data) { 71 if (!CSLoopIsRunning) { CSFctArray = 0; CSFctArray = new Array; } 72 var fctInfo = new Object; 73 fctInfo.DoFunction = fct; fctInfo.counter = 0; fctInfo.data = data; 74 CSFctArray[CSFctArray.length] = fctInfo; 75 if (!CSLoopIsRunning) CSLoop(); 76} 77function CSStopFunction(sceneName) { 78 var i; 79 for (i=0;i<CSFctArray.length;i++) { 80 var curFct = CSFctArray[i]; 81 if (curFct){ if (curFct.data.name == sceneName){ CSFctArray[i] = 0; return; } } 82 } 83} 84function CSStopComplete() { 85 if (CSTimeoutID == null) return; 86 clearTimeout (CSTimeoutID); CSLoopIsRunning = false; CSTimeoutID = null; 87}
88function CSMoveLoop(fInf) { 89 var ticks = 60 * (((new Date()).getTime()) - fInf.data.startTime)/1000; 90 var f = ticks/fInf.data.ticks; 91 if (f < 1) { CSSetStylePos(fInf.data.layer,0,fInf.data.start[0] * (1-f) + fInf.data.end[0] * f); 92 CSSetStylePos(fInf.data.layer,1,fInf.data.start[1] * (1-f) + fInf.data.end[1] * f); return true; } 93 else { CSSetStylePos(fInf.data.layer,0,fInf.data.end[0]); 94 CSSetStylePos(fInf.data.layer,1,fInf.data.end[1]); } 95 return false; 96} 97function CSSlideObj (layer,start,end,ticks,startTime) { 98 this.layer=layer;this.start=start;this.end=end;this.ticks=ticks;this.startTime=startTime; 99} 100function CSSlideLayer(l,pos,anim,ticks) { 101 var x = pos[0]; var y = pos[1]; 102 if (l == '') return; 103 if (!anim) { CSSetStylePos(l,0,x); CSSetStylePos(l,1,y); } 104 else { var fctData = new CSSlideObj(l,new Array(CSGetStylePos(l,0),CSGetStylePos(l,1)),new Array(x,y),ticks,(new Date()).getTime()); CSStartFunction(CSMoveLoop,fctData); } 105} 106function CSSetStyleVis(s,v) { 107 if (CSIsW3CDOM){CSIDOM();document.getElementById(s).style.visibility=(v==0)?"hidden":"visible";} 108 else if(IsIE())CSIEStyl(s).visibility=(v==0)?"hidden":"visible"; 109 else CSNSStyl(s).visibility=(v==0)?'hide':'show'; 110} 111function CSGetStyleVis(s) { 112 if (CSIsW3CDOM) {CSIDOM();return(document.getElementById(s).style.visibility=="hidden")?0:1;} 113 else if(IsIE())return(CSIEStyl(s).visibility=="hidden")?0:1; 114 else return(CSNSStyl(s).visibility=='hide')?0:1; 115} 116function CSGetLayerClip (el) { 117 CSIDOM(); 118 if (el.isIE) return (new CSRect(0,0,el.offsetWidth,el.offsetHeight)); 119 else if (CSBVers>=5) return (new CSRect(0,0,parseInt(el.style.width),parseInt(el.style.height))); 120 else return (new CSRect(el.clip.left,el.clip.top,el.clip.width,el.clip.height)); 121} 122function CSSetLayerClip (el,clipRect) { 123 var l,t,r,b; 124 l=clipRect.left; t=clipRect.top; r=l+clipRect.width; b=t+clipRect.height; 125 if(el.isIE) { el.style.clip = "rect("+ t + " " + r + " " + b + " " + l + ")"; } 126 else if (CSBVers>=5) el.style.clip = "rect("+ t + "px, " + r + "px, " + b + "px, " + l + "px)"; 127 else { el.clip.left=l; el.clip.top=t; el.clip.width=clipRect.width; el.clip.height=clipRect.height; } 128 CSSetStyleVis(el.layer); 129} 130function CSRect (left,top,width,height) { 131this.left=left; this.top=top; this.width=width; this.height=height; 132} 133function CSCreateTransElement (layer, steps) { 134 var el; 135 if (IsIE()) el=document.all.tags("div")[layer]; 136 else if (CSBVers>=5) el=document.getElementById(layer); 137 else el=CSNSStyl(layer); 138 if (el==null) return null; 139 if (el.locked && (el.locked == true)) return null; 140 el.isIE=IsIE(); 141 el.clipRect=CSGetLayerClip(el); 142 if (el.clipRect==null) return null; 143 el.maxValue=steps; 144 if (el.maxValue<=0) el.maxValue=30; 145 el.modus=""; el.layer=layer; 146 el.width=el.clipRect.width; el.height=el.clipRect.height; 147 el.locked = true; 148 return el; 149} 150function CSDisposeTransElement (el) { el.locked = false; } 151CSStateArray = new Object; 152CSCookieArray = new Object; 153CSCookieValArray = new Object; 154function CSWriteCookie(action) { 155 var name = "DFT" + action[1]; 156 var hrs = action[2]; 157 var path = action[3]; 158 var domain = action[4]; 159 var secure = action[5]; 160 var exp = new Date((new Date()).getTime() + hrs * 3600000); 161 var cookieVal = ""; 162 for(var prop in CSCookieArray) { 163 if(("DFT" + CSCookieArray[prop]) == name) { 164 if(cookieVal != "") cookieVal += "&"; 165 cookieVal += prop + ":" + escape(CSStateArray[prop]); 166 } 167 } 168 if(hrs != 0) 169 cookieVal += "; expires=" + exp.toGMTString(); 170 if(path != "") 171 cookieVal += "; path=" + path; 172 if(domain != "") 173 cookieVal += "; domain=" + domain; 174 if(secure == true) 175 cookieVal += "; secure"; 176 document.cookie = name + '=' + cookieVal; 177} 178function CSReadCookie(action) { 179 var name = "DFT" + action[1]; 180 var cookies = document.cookie; 181 if(cookies == "") return; 182 var start = cookies.indexOf(name); 183 if(start == -1) return; 184 start += name.length + 1; 185 var end = cookies.indexOf(";", start); 186 if(end == -1) end = cookies.length; 187 var cookieVal = cookies.substring(start, end); 188 var arr = cookieVal.split('&'); 189 for(var i = 0; i < arr.length; i++) { 190 var a = arr[i].split(':'); 191 CSStateArray[a[0]] = unescape(a[1]); 192 } 193} 194function CSDefineState(action) { 195 CSCookieArray[action[1]] = action[3]; 196} 197function CSSetState(action) { 198 CSStateArray[action[1]] = action[2]; 199} 200function CSInitState(action) { 201 if(typeof(CSStateArray[action[1]]) == "undefined") 202 CSStateArray[action[1]] = action[2]; 203} 204function CSCheckState(action) { 205 var obj1 = CSStateArray[action[1]];
206 var obj2 = action[2]; 207 if(typeof(obj1) == "object") { 208 for(var i=0;i<obj1.length;i++) { 209 if(obj1[i] != obj2[i]) 210 return false; 211 } 212 return true; 213 } 214 var res; 215 var op = action[3]; 216 if(op == "==") res = (CSStateArray[action[1]] == action[2]); 217 else if(op == "!=") res = (CSStateArray[action[1]] != action[2]); 218 else if(op == ">" ) res = (CSStateArray[action[1]] > action[2]); 219 else if(op == ">=") res = (CSStateArray[action[1]] >= action[2]); 220 else if(op == "<" ) res = (CSStateArray[action[1]] < action[2]); 221 else if(op == "<=") res = (CSStateArray[action[1]] <= action[2]); 222 return res; 223} 224function CSScriptInit() { 225if(typeof(skipPage) != "undefined") { if(skipPage) return; } 226idxArray = new Array; 227for(var i=0;i<CSInit.length;i++) 228 idxArray[i] = i; 229CSAction2(CSInit, idxArray); 230} 231function CSScriptExit() { 232idxArray = new Array; 233for(var i=0;i<CSExit.length;i++) 234 idxArray[i] = i; 235CSAction2(CSExit, idxArray); 236} 237CSInit = new Array; 238CSExit = new Array; 239CSStopExecution=false; 240function CSAction(array) {return CSAction2(CSAct, array);} 241function CSAction2(fct, array) { 242 var result; 243 for (var i=0;i<array.length;i++) { 244 if(CSStopExecution) return false; 245 var aa = fct[array[i]]; 246 if (aa == null) return false; 247 var ta = new Array; 248 for(var j=1;j<aa.length;j++) { 249 if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){ 250 if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];} 251 else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));} 252 else ta[j]=aa[j];} 253 } else ta[j]=aa[j]; 254 } 255 result=aa[0](ta); 256 } 257 return result; 258} 259CSAct = new Object; 260CSIm=new Object(); 261function CSIShow(n,i) { 262 if (document.images) { 263 if (CSIm[n]) { 264 var img=CSGetImage(n); 265 if (img&&typeof(CSIm[n][i].src)!="undefined") {img.src=CSIm[n][i].src;} 266 if(i!=0) self.status=CSIm[n][3]; else self.status=" "; 267 return true; 268 } 269 } 270 return false; 271} 272function CSILoad(action) { 273 im=action[1]; 274 if (document.images) { 275 CSIm[im]=new Object(); 276 for (var i=2;i<5;i++) { 277 if (action[i]!='') {CSIm[im][i-2]=new Image(); CSIm[im][i-2].src=action[i];} 278 else CSIm[im][i-2]=0; 279 } 280 CSIm[im][3] = action[5]; 281 } 282} 283function newImage(arg) { 284 if (document.images) { 285 rslt = new Image(); 286 rslt.src = arg; 287 return rslt; 288 } 289} 290userAgent = window.navigator.userAgent; 291browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10); 292mustInitImg = true; 293function initImgID() {di = document.images; if (mustInitImg && di) { for (var i=0; i<di.length; i++) { if (!di[i].id) di[i].id=di[i].name; } mustInitImg = false;}} 294function findElement(n,ly) { 295 d = document; 296 if (browserVers < 4) return d[n]; 297 if ((browserVers >= 6) && (d.getElementById)) {initImgID; return(d.getElementById(n))}; 298 var cd = ly ? ly.document : d; 299 var elem = cd[n]; 300 if (!elem) { 301 for (var i=0;i<cd.layers.length;i++) { 302 elem = findElement(n,cd.layers[i]); 303 if (elem) return elem; 304 } 305 } 306 return elem; 307} 308function changeImages() { 309 d = document; 310 if (d.images) { 311 var img; 312 for (var i=0; i<changeImages.arguments.length; i+=2) { 313 img = null; 314 if (d.layers) {img = findElement(changeImages.arguments[i],0);} 315 else {img = d.images[changeImages.arguments[i]];} 316 if (img) {img.src = changeImages.arguments[i+1];} 317 } 318 } 319} 320function CSClickReturn () { 321 var bAgent = window.navigator.userAgent; 322 var bAppName = window.navigator.appName; 323 if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0)) 324 return true; // dont follow link 325 else return false; // dont follow link 326} 327function CSButtonReturn () { return !CSClickReturn(); } 328function CSBrowserSwitch(action) { 329 var bAgent = window.navigator.userAgent; 330 var bAppName = window.navigator.appName; 331 var isNS = (bAppName.indexOf("Netscape") >= 0); 332 var isIE = (bAppName.indexOf("Explorer") >= 0); 333 var isWin = (bAgent.indexOf("Win") >= 0); 334 var isMac = (bAgent.indexOf("Mac") >= 0); 335 var vers = 0; 336 var versIdx = (bAgent.indexOf("Mozilla/")); 337 if(versIdx >= 0) 338 { 339 var sstr = bAgent.substring(versIdx + 8, versIdx + 9); 340 vers = parseInt(sstr) - 2; 341 } 342 var url = action[1]; 343 var platform = action[2]; 344 var versVec; 345 if(platform) 346 { 347 if(isNS && isMac) versVec = action[3]; 348 if(isIE && isMac) versVec = action[5]; 349 if(isNS && isWin) versVec = action[4]; 350 if(isIE && isWin) versVec = action[6]; 351 } 352 else 353 { 354 if(isNS) versVec = action[3]; 355 if(isIE) versVec = action[4]; 356 } 357 if(vers > (versVec.length-1)) 358 vers = versVec.length-1; 359 if(versVec[vers] == 0) 360 { 361 location = url; 362 CSStopExecution = true; 363 } 364} 365function CSURLPopupShow(formName, popupName, target) { 366 var form = (!IsIE()&&CSBVers>=5)?document.forms[formName]:CSFindElement(formName); 367 var popup = form.elements[popupName]; 368 window.open(popup.options[popup.selectedIndex].value, target); 369 popup.selectedIndex = 0; 370} 371function CSSetStyleDepth(s,depth) { 372 if (CSIsW3CDOM)document.getElementById(s).style.zIndex=depth; 373 else if (IsIE())CSIEStyl(s).zIndex=depth; 374 else CSNSStyl(s).zIndex=depth; 375} 376function CSGetStyleDepth(s) { 377 if (CSIsW3CDOM){CSIDOM();return document.getElementById(s).style.zIndex;} 378 else if (IsIE())return (CSIEStyl(s).zIndex); 379 else return (CSNSStyl(s).zIndex); 380} 381CSSeqArray = new Array; 382function CSSeqActionFct(seq,loopCount,continueLoop) { 383 if ((seq.loop < 2) || ((loopCount % 2) != 0)) { 384 for (var i=0;i<seq.actionCount;i++) { 385 if (seq.actions[3*i + 1] <= seq.frame) { 386 if ((loopCount > 1) && (seq.actions[3*i + 1] < seq.start)) continue; 387 if (seq.actions[3*i + 2] < loopCount) { 388 seq.actions[3*i + 2] = loopCount; CSLoopIsRunning = true;
389 CSAction(new Array(seq.actions[3*i + 0])); continueLoop = true; 390 } 391 } else { continueLoop = true; break; } 392 } 393 } else { 394 for (var i=seq.actionCount-1;i>=0;i--) { 395 if (seq.actions[3*i + 1] > seq.frame) { 396 if (seq.actions[3*i + 1] > seq.end) continue; 397 if (seq.actions[3*i + 2] < loopCount) { 398 seq.actions[3*i + 2] = loopCount; CSLoopIsRunning = true; 399 CSAction(new Array(seq.actions[3*i + 0])); continueLoop = true; 400 } 401 } else { continueLoop = true; break; } 402 } 403 } 404 return continueLoop; 405} 406function CSSeqFunction(fctInfo) 407{ 408 var seq = fctInfo.data; var oldFrame = seq.frame; 409 var newTicks = (new Date()).getTime(); 410 seq.frame = Math.round((seq.fps * (newTicks - seq.startTicks)/1000.0) - 0.5); 411 var continueLoop = false; var loopCount = 1; 412 413 if (seq.loop > 0) { 414 continueLoop = true; 415 if (seq.loop == 1) { 416 var iv = (seq.end - seq.start); 417 var f = Math.round(((seq.frame - seq.start) / iv) - 0.5); 418 if (f < 0) f = 0; 419 loopCount = f+1; 420 seq.frame = seq.start + ((seq.frame - seq.start) % (seq.end - seq.start)); 421 } else { 422 var iv = (seq.end - seq.start); 423 var f = Math.round(((seq.frame - seq.start) / iv) - 0.5);
424 if (f < 0) f = 0; 425 loopCount = f+1; 426 f = (seq.frame - seq.start) % (2 * iv); 427 if (f > iv) f = 2*iv - f; 428 seq.frame = seq.start + f; 429 } 430 } 431 continueLoop = CSSeqActionFct(seq,loopCount,continueLoop); 432 for (var i=0;i<seq.tracks.length;i++) { 433 var track = seq.tracks[i]; var frameCount = 0; var lastCount = 0; var partCount = 0; 434 var partIdx = track.parts.ticks.length; 435 for (var k=0;k<track.parts.ticks.length;k++) { 436 frameCount += track.parts.ticks[k]; 437 if (frameCount > seq.frame) { partIdx = k; partCount = seq.frame - lastCount; break; } 438 lastCount = frameCount; 439 } 440 if (partIdx < track.parts.ticks.length) { 441 var type=track.parts.moveType[partIdx]; 442 if(type==1) CSSetLinearPos (track, partIdx, partCount); 443 else if(type==2) CSSetCurvePos (track, partIdx, partCount); 444 else if(type==3) if (oldFrame != seq.frame) CSSetRandomPos (track, partIdx, partCount); 445 else { x = CSGetStylePos(track.layer,0); y = CSGetStylePos(track.layer,1); } 446 CSSetStyleVis(track.layer,track.parts.visibilities[partIdx]); 447 CSSetStyleDepth(track.layer,track.parts.depths[partIdx]); 448 continueLoop = true; 449 } else { 450 var partIdx = track.parts.moveType.length-1; 451 var posArray = track.parts.positions; 452 var x = posArray[partIdx * 6 + 0]; var y = posArray[partIdx * 6 + 1]; 453 CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y); 454 CSSetStyleVis(track.layer,track.parts.visibilities[partIdx]); 455 CSSetStyleDepth(track.layer,track.parts.depths[partIdx]); 456 } 457 } 458 return continueLoop; 459} 460function CSSetLinearPos (track, partIdx, partCount) { 461 var curTicks = track.parts.ticks[partIdx]; 462 var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6; 463 var posArray = track.parts.positions; 464 var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1]; 465 var x1,x2,y1,y2; 466 var factor = partCount/curTicks; 467 x1 = x; y1 = y; 468 x2 = posArray[pIdx2 + 0]; y2 = posArray[pIdx2 + 1]; 469 x = x1 * (1-factor) + x2 * factor; y = y1 * (1-factor) + y2 * factor; 470 CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y); 471} 472function CSSetCurvePos (track, partIdx, partCount) { 473 var curTicks = track.parts.ticks[partIdx]; 474 var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6; 475 var posArray = track.parts.positions; 476 var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1]; 477 var x1,x2,x3,x4,y1,y2,y3,y4; 478 var factor = partCount/curTicks; 479 var t = factor; var u = t * t; var v = u * t; 480 var val1 = 3*(u-t) - v + 1; var val2 = 3*(v+t - 2*u); var val3 = 3*(u-v); var val4 = v; 481 x1 = x; y1 = y; x2 = posArray[pIdx1 + 2]; y2 = posArray[pIdx1 + 3]; 482 x3 = posArray[pIdx1 + 4]; y3 = posArray[pIdx1 + 5]; 483 x4 = posArray[pIdx2 + 0]; y4 = posArray[pIdx2 + 1]; 484 x = x1 * val1 + x2 * val2 + x3 * val3 + x4 * val4; 485 y = y1 * val1 + y2 * val2 + y3 * val3 + y4 * val4; 486 CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y); 487} 488function CSSetRandomPos (track, partIdx, partCount) { 489 var curTicks = track.parts.ticks[partIdx]; 490 var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6; 491 var posArray = track.parts.positions; 492 var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1]; 493 var x1,x2,y1,y2; 494 var factor = partCount/curTicks; 495 x1 = x; y1 = y; 496 x2 = posArray[pIdx2 + 0]; y2 = posArray[pIdx2 + 1]; 497 var factorx = Math.random(); var factory = Math.random(); 498 x = x1 * (1-factorx) + x2 * factorx; y = y1 * (1-factory) + y2 * factory; 499 CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y); 500} 501function CSStartSeq(name) { 502 var seq = CSGetScene(name); var date = new Date() 503 seq.startTicks = date.getTime() 504 for (var i=0;i<seq.actionCount;i++) seq.actions[3*i+2] = 0; 505 CSStartFunction(CSSeqFunction,seq); 506} 507function CSSceneObj (name,fps,loop,start,end,frame,sTicks,numAct,acts,tracks) { 508 this.name=name;this.fps=fps;this.loop=loop;this.start=start;this.end=end; 509 this.frame=frame;this.startTicks=sTicks;this.actionCount=numAct; 510 this.actions=acts;this.tracks=tracks; 511} 512function CSTrackObj (name,partIdx,partCount,parts) { 513 this.layer=name;this.partIdx=partIdx;this.partCount=partCount;this.parts=parts; 514} 515function CSPartObj (ticks,pos,depths,vis,moveType) { 516 this.ticks=ticks;this.positions=pos;this.depths=depths;this.visibilities=vis; 517 this.moveType=moveType; 518} 519function CSGetScene (name) { 520 for (i=0;i<CSSeqArray.length;i++) { var seq = CSSeqArray[i]; if (seq.name==name) return seq; } 521 return 0; 522} 523function CSAutoStartScene(action) { CSStartSeq (action[1]); } 524// -- Action Functions
525function CSFieldValidate(action) { 526var form = action[1]; 527var elem = action[2]; 528var theEntry = document.forms[form].elements[elem].value 529var theFormElem = document.forms[form].elements[elem] 530var badEntry = "" 531 function theAlert () { 532 alert(action[6]); 533 theFormElem.select(); 534 theFormElem.focus(); 535 } 536 function isEmpty() { 537 if (theEntry == "") { 538 theAlert() 539 } 540 } 541 function isNumber() { 542 if (theEntry == "") { 543 theAlert() 544 } 545 for (i=0; i<theEntry.length; i++) { 546 if (theEntry.charAt(i) < "0" || theEntry.charAt(i) > "9") { 547 badEntry = "notnumber" 548 } 549 } 550 if (badEntry == "notnumber") { 551 theAlert() 552 } 553 } 554 555 function isAlpha() { 556 if (theEntry == "") { 557 theAlert() 558 } 559 for (i=0; i<theEntry.length; i++) { 560 if (theEntry.charAt(i) >= "0" && theEntry.charAt(i) <= "9") { 561 badEntry = "notalpha" 562 } 563 } 564 if (badEntry == "notalpha") { 565 theAlert() 566 } 567 } 568 569 function requiredChars() { 570 numofChars = theEntry.length 571 if (numofChars != action[4]) { 572 theAlert() 573 } 574 } 575 function exactString() { 576 if (theEntry != action[5]) { 577 theAlert() 578 } 579 } 580 581 function validEmail() { 582 invalidChars = " /:,;" 583 if (theEntry == "") { 584 badEntry = "badEmail" 585 } 586 for (i=0; i < 5; i++) { 587 badChar = invalidChars.charAt(i) 588 if (theEntry.indexOf(badChar,0) > -1) { 589 badEntry = "badEmail" 590 } 591 } 592 atsignLoc = theEntry.indexOf("@",1) 593 if (atsignLoc == -1) { 594 badEntry = "badEmail" 595 } 596 if (theEntry.indexOf("@",atsignLoc+1) > -1) { 597 badEntry = "badEmail" 598 } 599 dotLoc = theEntry.indexOf(".",atsignLoc) 600 if (dotLoc == -1) { 601 badEntry = "badEmail" 602 } 603 if (dotLoc+3 > theEntry.length) { 604 badEntry = "badEmail" 605 } 606 if (badEntry == "badEmail") { 607 theAlert() 608 } 609 } 610 function validCC() { 611 var theNumber = new Array(theEntry.length); 612 var i = 0 613 var total = 0 614 for (i = 0; i < theEntry.length; ++i) { 615 theNumber[i] = parseInt(theEntry.charAt(i)) 616 } 617 for (i = theNumber.length -2; i >= 0; i-=2) { 618 theNumber[i] *= 2; 619 if (theNumber[i] > 9) theNumber[i]-=9; 620 } 621 for (i = 0; i < theNumber.length; ++i) { 622 total += theNumber[i]; 623 } 624 isinteger = total/10 625 if(parseInt(isinteger)!=isinteger) { 626 theAlert() 627 } 628 } 629 630var type=action[3]; 631if(type==0) isEmpty() 632else if(type==1) isNumber() 633else if(type==2) isAlpha() 634else if(type==3) requiredChars() 635else if(type==4) exactString() 636else if(type==5) validEmail() 637else if(type==6) validCC() 638} 639 640function CSGetLayerPos(action) { 641 var layer = action[1]; 642 var x = CSGetStylePos(layer, 0); 643 var y = CSGetStylePos(layer, 1); 644 return new Array(x, y); 645} 646function CSGetFormElementValue(action) { 647 var form = action[1]; 648 var elem = action[2]; 649 return document.forms[form].elements[elem].value; 650} 651function initIArray() { 652this.length = initIArray.arguments.length; 653for (var i = 0; i < this.length; i++) 654this[i+1] = initIArray.arguments[i]; 655} 656function dailyImageURL(action) { 657var dateArray = new 658initIArray("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"); 659var today = new Date(); 660var day = dateArray[today.getDay()]; 661if (today.getDay() == 0) { day = "Sunday"; } 662var img = null; 663if (document.images) { 664 if (!IsIE()&&CSBVers<5) img = CSFindElement(action[1],0); 665 else img = document.images[action[1]]; 666 if (img) { 667 if (day == "Monday" && action[2] != "(Empty Reference!)" && action[2] != "(EmptyReference!)") img.src = action[2] 668 if (day == "Tuesday" && action[3] != "(Empty Reference!)" && action[3] != "(EmptyReference!)") img.src = action[3] 669 if (day == "Wednesday" && action[4] != "(Empty Reference!)" && action[4] != "(EmptyReference!)") img.src = action[4] 670 if (day == "Thursday" && action[5] != "(Empty Reference!)" && action[5] != "(EmptyReference!)") img.src = action[5] 671 if (day == "Friday" && action[6] != "(Empty Reference!)" && action[6] != "(EmptyReference!)") img.src = action[6] 672 if (day == "Saturday" && action[7] != "(Empty Reference!)" && action[7] != "(EmptyReference!)") img.src = action[7] 673 if (day == "Sunday" && action[8] != "(Empty Reference!)" && action[8] != "(EmptyReference!)") img.src = action[8] 674 } 675} 676} 677CSImages=new Array(); 678function CSPreloadImage(action) { 679 if (document.images) { CSImages[CSImages.length]=new Image(); CSImages[CSImages.length-1].src=action[1]; } 680} 681function CSRandomImg(action) { 682 var img = CSGetImage(action[1]); 683 if (img) 684 { 685 var v1 = Math.floor(Math.random() * 10); 686 var whichone = v1-(Math.floor(v1/3)*3); 687 img.src = action[whichone+2]; 688 } 689} 690function CSSetImageURL(action) { 691 var img=CSGetImage(action[1]); 692 if (img) img.src=action[2]; 693} 694function CSCloseWindow() { 695if (self.parent.frames.length != 0) { 696 self.parent.close() 697 } else { 698 window.close() 699 } 700} 701function WBConfirmLink(action) { 702 if (checkIt(action)) {
703 if (action[2] != "(Empty Reference!)" && action[2] != "(EmptyReference!)") { 704 if (action[3].length < 1) { 705 parent.location.href=action[2]; 706 } 707 else { 708 parent.frames[action[3]].location.href=action[2]; 709 } 710 } 711 } 712 return; 713} 714function checkIt(action) { 715 var carryOn = window.confirm(action[1]); 716 return carryOn; 717 } 718function CSCSSRedirect(action) { 719if (navigator.platform.indexOf("Win32") != -1) { os = "windows" }; 720if (navigator.platform.indexOf("Mac") != -1) { os = "mac" }; 721if (navigator.platform.indexOf("x") != -1 || navigator.platform.indexOf("BSD") != -1 || navigator.platform.indexOf("S") != -1) { os = "unix" }; 722if (navigator.appName.indexOf("Microsoft") != -1) { browser = "IE" }; 723if (navigator.appName.indexOf("Netscape") != -1) { browser = "NN" }; 724if (navigator.appVersion.indexOf("4.") != -1) { version = 4 }; 725if (navigator.appVersion.indexOf("5.") != -1) { version = 5 }; 726var tag='<LINK REL="styleSheet" TYPE="text/css" HREF="'+action[2]+'" >'; 727var type=action[1]; 728 if(type==0 && os=="mac" && browser=="NN" && version==4) { document.write(tag) } 729 else 730 if(type==1 && os=="mac" && browser=="NN" && version==5) { document.write(tag) } 731 else 732 if(type==2 && os=="windows" && browser=="NN" && version==4) { document.write(tag) } 733 else 734 if(type==3 && os=="windows" && browser=="NN" && version==5) { document.write(tag) } 735 else 736 if(type==4 && os=="unix" && browser=="NN" && version==4) { document.write(tag) } 737 else 738 if(type==5 && os=="unix" && browser=="NN" && version==5) { document.write(tag) } 739 else 740 if(type==6 && os=="mac" && browser=="IE") { document.write(tag) } 741 else 742 if(type==7 && os=="windows" && browser=="IE") { document.write(tag) } 743} 744function initArray() { 745this.length = initArray.arguments.length; 746for (var i = 0; i < this.length; i++) 747this[i+1] = initArray.arguments[i]; 748} 749function dailyRedirect(action) { 750var dateArray = new 751initArray("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"); 752var today = new Date(); 753var day = dateArray[today.getDay()]; 754if (today.getDay() == 0) { day = "Sunday"; } 755if (day == "Monday" && action[1] != "(Empty Reference!)" && action[1] != "(EmptyReference!)") window.location = action[1] 756if (day == "Tuesday" && action[2] != "(Empty Reference!)" && action[2] != "(EmptyReference!)") window.location = action[2] 757if (day == "Wednesday" && action[3] != "(Empty Reference!)" && action[3] != "(EmptyReference!)") window.location = action[3] 758if (day == "Thursday" && action[4] != "(Empty Reference!)" && action[4] != "(EmptyReference!)") window.location = action[4] 759if (day == "Friday" && action[5] != "(Empty Reference!)" && action[5] != "(EmptyReference!)") window.location = action[5] 760if (day == "Saturday" && action[6] != "(Empty Reference!)" && action[6] != "(EmptyReference!)") window.location = action[6] 761if (day == "Sunday" && action[7] != "(Empty Reference!)" && action[7] != "(EmptyReference!)") window.location = action[7] 762} 763function frameP(action) { 764 if(parent.frames.length==0) { 765 var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length); 766 window.location.href=action[1]+"?"+action[2]+"="+fileName; 767 } else { 768 if(top.location.search!="") { 769 var sFrame=top.location.search.substring(1,top.location.search.indexOf("=")); 770 if(name==sFrame) { 771 var sName=top.location.search.substring(top.location.search.indexOf("=")+1,top.location.search.length); 772 var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length); 773 if(fileName!=sName) { 774 location=sName; 775 } 776 } 777 } 778 } 779 } 780function CSGoBack1() { history.back() } 781function CSGotoLink(action) { 782 if (action[2].length) { 783 var hasFrame=false; 784 for(i=0;i<parent.frames.length;i++) { if (parent.frames[i].name==action[2]) { hasFrame=true; break;}} 785 if (hasFrame==true) 786 parent.frames[action[2]].location = action[1]; 787 else 788 window.open (action[1],action[2],""); 789 } 790 else location = action[1]; 791} 792function CSKeePress(action) { 793desiredKey1 = action[1]; 794calledAction1 = action[2]; 795desiredKey2 = action[3]; 796calledAction2 = action[4]; 797desiredKey3 = action[5]; 798calledAction3 = action[6]; 799desiredKey4 = action[7]; 800calledAction4 = action[8]; 801if (document.layers) { document.captureEvents(Event.KEYPRESS) ; } 802document.onkeydown = checkKey; 803function checkKey(e) { 804 e = (e) ? e : (window.event) ? window.event : ""; 805 if (e) { var keyPressed = "" 806 if (e.which) keyPressed = e.which; 807 else keyPressed = event.keyCode;
808 alphaNum = String.fromCharCode(keyPressed).toLowerCase(); 809 if (desiredKey1 == alphaNum) { CSAction(new Array(calledAction1)) }; 810 if (desiredKey2 == alphaNum) { CSAction(new Array(calledAction2)) }; 811 if (desiredKey3 == alphaNum) { CSAction(new Array(calledAction3)) }; 812 if (desiredKey4 == alphaNum) { CSAction(new Array(calledAction4)) }; 813 } 814} 815checkKey(); 816} 817function CSPAKkillframe() { 818if (self.parent.frames.length != 0) 819self.parent.location = document.location 820} 821function CSHistoryGo(action) { history.go(action[1]); } 822function CSOpenWindowPrompt(action) { 823var where = self.location.href 824var nw = prompt("Enter a new width:","") 825if (nw != null) { 826var nh = prompt("Enter a new height:","") 827} 828var wf = ""; 829wf = wf + "width=" + nw; 830wf = wf + ",height=" + nh; 831wf = wf + ",resizable=" + (action[1] ? "yes" : "no"); 832wf = wf + ",scrollbars=" + (action[2] ? "yes" : "no"); 833wf = wf + ",menubar=" + (action[3] ? "yes" : "no"); 834wf = wf + ",toolbar=" + (action[4] ? "yes" : "no"); 835wf = wf + ",directories=" + (action[5] ? "yes" : "no"); 836wf = wf + ",location=" + (action[6] ? "yes" : "no"); 837wf = wf + ",status=" + (action[7] ? "yes" : "no"); 838 if (nw == null || nh == null) { 839 return null 840 } else { 841 window.open(where,'testwin',wf); 842 } 843} 844function CSOpenWindow(action) { 845 var wf = ""; 846 wf = wf + "width=" + action[3]; 847 wf = wf + ",height=" + action[4]; 848 wf = wf + ",resizable=" + (action[5] ? "yes" : "no"); 849 wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no"); 850 wf = wf + ",menubar=" + (action[7] ? "yes" : "no"); 851 wf = wf + ",toolbar=" + (action[8] ? "yes" : "no"); 852 wf = wf + ",directories=" + (action[9] ? "yes" : "no"); 853 wf = wf + ",location=" + (action[10] ? "yes" : "no"); 854 wf = wf + ",status=" + (action[11] ? "yes" : "no"); 855 window.open(action[1],action[2],wf); 856} 857function CSPDFredirect(action) { 858 if(navigator.mimeTypes && navigator.mimeTypes["application/pdf"] && navigator.mimeTypes["application/pdf"].enabledPlugin) { 859 location.href=action[1] 860 } 861 else if (navigator.appName == "Microsoft Internet Explorer") { 862 x = confirm("The page you are trying to view requires the Adobe Portable Document Format (.PDF) browser plug-in or the Adobe Acrobat Reader application. We could not detect if your browser has this plug-in installed. To attempt to view the page anyway, click OK. Otherwise click CANCEL to view an alternate page") 863 if (x == true) location.href=action[1] 864 } 865 else { 866 x = confirm("Your browser may not be able to display PDF files. To attempt to view the PDF page anyway, click OK. Otherwise click CANCEL to view an alternate page") 867 if (x == true) location.href=action[1] 868 } 869} 870function CSRandomLinks(action){ 871var urlcounter = 0; 872if (action[2] != "(Empty Reference!)" && action[2] != "(EmptyReference!)") { ++urlcounter}; 873if (action[3] != "(Empty Reference!)" && action[3] != "(EmptyReference!)") { ++urlcounter}; 874if (action[4] != "(Empty Reference!)" && action[4] != "(EmptyReference!)") { ++urlcounter}; 875if (action[5] != "(Empty Reference!)" && action[5] != "(EmptyReference!)") { ++urlcounter}; 876if (action[6] != "(Empty Reference!)" && action[6] != "(EmptyReference!)") { ++urlcounter}; 877if (action[7] != "(Empty Reference!)" && action[7] != "(EmptyReference!)") { ++urlcounter}; 878if (parent.frames.length > 0) { 879if (action[1].length > 0) { parent.frames[action[1]].location=action[Math.floor(Math.random()*urlcounter)+2] } 880} 881else 882if (action[1].length > 0) { window.open(action[Math.floor(Math.random()*urlcounter)+2],action[1],"") } 883if (action[1].length == 0) { top.location=action[Math.floor(Math.random()*urlcounter)+2] } 884} 885function getCookie(thecookie){ 886 tempString= thecookie + "="; 887 if(document.cookie.length>0){ 888 start = document.cookie.indexOf(tempString); 889 if(start!=-1){ 890 end = document.cookie.indexOf(";",start); 891 if(end==-1){end=document.cookie.length;} 892 start += tempString.length; 893 return unescape(document.cookie.substring(start,end)) 894 } 895 } 896} 897function setCookie(thecookie,value,expire){ 898 cookieExpires = new Date 899 cookieExpires.setMonth(cookieExpires.getMonth() + 6) 900 document.cookie = thecookie + "=" + escape(value) + ";expires=" + cookieExpires.toGMTString(); 901} 902function testCookie(thecookie){ 903 if(getCookie(thecookie)){ 904 return(getCookie(thecookie)); 905 }else{ 906 return false; 907 } 908} 909function CSredPrompt(action) { 910 var thecookie = action[5] 911 if(testCookie(action[5]) && action[4] == true){ 912 location.href=getCookie(action[5]); 913 } else { 914 var x = 0; 915 } 916 917 function kill() { 918 alert(action[3]); 919 x = 1; 920 var enter = prompt(action[1],action[2]); 921 if (enter == action[6]){setCookie(action[5], action[7]);location.href=action[7];} 922 else if (enter == action[8]){setCookie(action[5], action[9]);location.href=action[9];} 923 else if (enter == action[10]){setCookie(action[5], action[11]);location.href=action[11];} 924 else if (enter == action[12]){setCookie(action[5], action[13]);location.href=action[13];} 925 else if (enter == action[15]){setCookie(action[5], action[16]);location.href=action[16];} 926 else if (enter == action[2]){kill();} 927 else if (enter == null) return 928 else kill() 929 } 930 if (x == 0) { 931 var enter = prompt(action[1],action[2]); 932 if (enter == action[6]){setCookie(action[5], action[7]);location.href=action[7];} 933 else if (enter == action[8]){setCookie(action[5], action[9]);location.href=action[9];} 934 else if (enter == action[10]){setCookie(action[5], action[11]);location.href=action[11];} 935 else if (enter == action[12]){setCookie(action[5], action[13]);location.href=action[13];} 936 else if (enter == action[14]){setCookie(action[5], action[15]);location.href=action[15];} 937 else if (enter == action[2]){kill();} 938 else if (enter == null) return 939 else kill() 940 } 941} 942function CSSlideNewWindow(action) { 943var wh = "" 944if (action[7] || action[8] || action[9] == true) wh=action[4]-125 945else wh = action[4] 946var wf = "";
947wf = wf + "width=" + action[3]; 948wf = wf + ",height=" + wh; 949wf = wf + ",resizable=" + (action[5] ? "yes" : "no"); 950wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no"); 951wf = wf + ",menubar=" + (action[7] ? "yes" : "no"); 952wf = wf + ",toolbar=" + (action[8] ? "yes" : "no"); 953wf = wf + ",directories=" + (action[9] ? "yes" : "no"); 954wf = wf + ",location=" + (action[10] ? "yes" : "no"); 955wf = wf + ",status=" + (action[11] ? "yes" : "no"); 956if(navigator.appVersion.charAt(0) >=4) { 957var sw=screen.width-20; 958var sh=screen.height; 959var newwidth=action[3]; 960var newheight=action[4]; 961var positionleft=(sw-newwidth)/2; 962var positiontop="" 963if (action[7] || action[8] || action[9] == true) positiontop=(sh-newheight)/3; 964positiontop=(sh-newheight)/2.5; 965} 966newwindow=window.open(action[1],action[2],wf); 967newwindow.focus() 968if(navigator.appVersion.charAt(0) >=4) { 969 for(width1 = 1 ; width1 < positionleft ; width1 = width1 + 10) 970 newwindow.moveTo(width1,positiontop) 971 } 972} 973function CSSVGredirect(action){ 974 if(navigator.mimeTypes && navigator.mimeTypes["image/svg-xml"] && navigator.mimeTypes["image/svg-xml"].enabledPlugin ) { 975 location.href=action[1] 976 } 977 else if (navigator.appName == "Microsoft Internet Explorer") { 978 x = confirm("The page you are trying to view requires the Adobe Scaling Vector Graphics (.SVG) browser plug-in. We could not detect if your browser has this plug-in installed. To attempt to view the page anyway, click OK. Otherwise click CANCEL to view an alternate page") 979 if (x == true) location.href=action[1] 980 } 981 else if(action[2] == true) { 982 alert(action[3]) 983 } 984} 985 986function CSSWFredirect(action) { 987 if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) { 988 location.href=action[1] 989 } 990 else if (navigator.appName == "Microsoft Internet Explorer") { 991 x = confirm("The page you are trying to view requires the Macromedia Flash (.SWF) browser plug-in. We could not detect if your browser has this plug-in installed. To attempt to view the page anyway, click OK. Otherwise click CANCEL to view an alternate page") 992 if (x == true) location.href=action[1] 993 } 994 else if(action[2] == true) { 995 alert(action[3]) 996 } 997} 998function CSPAKtrg2frames(action) { 999 parent.frames[action[1]].location.href = action[2] 1000 parent.frames[action[3]].location.href = action[4] 1001 } 1002function CSPakRemote(action) { 1003 if (TRversion()) { 1004 if (action[2].length < 1) { 1005 opener.location.href=action[1]; 1006 } 1007 else { 1008 opener.parent.frames[action[2]].location.href=action[1]; 1009 } 1010 } 1011 return; 1012} 1013function TRversion() { 1014 return (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 3) 1015 || (navigator.appName.indexOf("Explorer") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 3); 1016} 1017function CStextswapID(action) { 1018(action[2] != "") ? (updateobject = action[2]) : (updateobject = action[1]); 1019(action[5] == true) ? (whichfunction = "disappear()") : (whichfunction = "revert()"); 1020if(document.all) { originaltext = document.all(updateobject).innerHTML }; 1021if(document.getElementById) { originaltext = document.getElementById(updateobject).innerHTML}; 1022timeout = (action[4] != "") ? (action[4] * 1000) : 0; 1023if(document.getElementById) { originaltext = document.getElementById(updateobject).innerHTML}; 1024timeout = (action[4] != "") ? (action[4] * 1000) : 0; 1025if (document.all) { document.all(updateobject).innerHTML = action[6] + action[3] + action[7]; if (timeout != 0) setTimeout(whichfunction,timeout); } 1026 else { if (document.getElementById) { document.getElementById(updateobject).innerHTML = action[6] + action[3] + action[7]; 1027 if (timeout != 0) setTimeout(whichfunction,timeout) } 1028 } 1029} 1030function disappear() { if (document.all) { document.all(updateobject).innerHTML = "<div id=updateobject></div>" } 1031 else { if (document.getElementById) { document.getElementById(updateobject).innerHTML = "" } 1032 } 1033} 1034function revert() { if (document.all) { document.all(updateobject).innerHTML = originaltext } 1035 else { if (document.getElementById) { document.getElementById(updateobject).innerHTML = originaltext } 1036 } 1037} 1038function timeRedirect(action) { 1039var now = new Date(); 1040var hours = now.getHours(); 1041var timeValue = action[1]; 1042if (timeValue >= 12) { timeValue = timeValue - 12; } // deals with 24-hour time 1043if (action[2] == true) { timeValue += 12; } // deals with PM times 1044if (hours < timeValue && action[4] != "(Empty Reference!)" && action[4] != "(EmptyReference!)" && action[3] == true) { 1045window.location = action[4]; } 1046if (hours >= timeValue && action[6] != "(Empty Reference!)" && action[6] != "(EmptyReference!)" && action[5] == true) { 1047window.location = action[6]; } 1048} 1049function CSDocWrite(action) { document.write(action[1]); } 1050function CSshowdate(action) { 1051 form = action[1]; 1052 elem = action[2]; 1053 modified = new Date(document.lastModified);
1054 theMonth = modified.getMonth() + 1; 1055 theDate = modified.getDate(); 1056 theYear = (navigator.appVersion.indexOf("3.0") != -1) ? (modified.getYear()) : (modified.getFullYear()); 1057 theDay = modified.getDay(); 1058 days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); 1059 modified = new Date(document.lastModified); 1060 today = days[theDay]; 1061 if (action[3] == 0) todisplay = theMonth + "/" + theDate + "/" + theYear; 1062 if (action[3] == 1) todisplay = theDate + "/" + theMonth + "/" + theYear; 1063 if (action[3] == 2) todisplay = theYear + "/" + theMonth + "/" + theDate; 1064 if (action[3] == 3) todisplay = theYear + "/" + theDate + "/" + theMonth; 1065 if (action[4] == true) todisplay = today + ", " + todisplay; 1066 if(form != "" || elem != "") { document.forms[form].elements[elem].value = todisplay} ; 1067 if (action[5] == false) { alert(todisplay) } 1068 } 1069function CSshowdateID(action) { 1070(action[2] != "") ? (updateobject = action[2]) : (updateobject = action[1]); 1071modified = new Date(document.lastModified); 1072theMonth = modified.getMonth() + 1; 1073theDate = modified.getDate(); 1074theYear = (navigator.appVersion.indexOf("3.0") != -1) ? (modified.getYear()) : (modified.getFullYear()); 1075theDay = modified.getDay(); 1076days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); 1077today = days[theDay]; 1078if (action[3] == 0) todisplay = theMonth + "/" + theDate + "/" + theYear; 1079if (action[3] == 1) todisplay = theDate + "/" + theMonth + "/" + theYear; 1080if (action[3] == 2) todisplay = theYear + "/" + theMonth + "/" + theDate; 1081if (action[3] == 3) todisplay = theYear + "/" + theDate + "/" + theMonth; 1082if (action[4] == true) todisplay = today + ", " + todisplay; 1083if (document.all) { document.all(updateobject).innerHTML = action[6] + action[5] + todisplay + action[7] 1084 } else { 1085 if (document.getElementById) { document.getElementById(updateobject).innerHTML = action[6] + action[5] + todisplay + action[7] } 1086 } 1087} 1088function CSOpenAlert(action) { alert(action[1]); } 1089var actn1 = ""; 1090var actn2 = ""; 1091var pass="" 1092var z=23; 1093var y=28; 1094iCounter = 3; 1095if (Array) { 1096 var f= new Array(); 1097 var K= new Array(); 1098 var base= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z","a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z") 1099} 1100function inc(){ 1101iCounter-- 1102if (iCounter > 0) 1103 { 1104 if (confirm("\nPassword is incorrect.\n\n\n\nRetry?")) 1105 Check() 1106 } 1107 else 1108 alert('Access Denied'); 1109} 1110function Check(){ 1111pass = prompt("Enter your password.","") 1112if(pass==null || pass==""){ 1113 alert("You did not enter a password!"); 1114 if(pass==""){ 1115 Check() 1116 } 1117} 1118else{ 1119 var lpass=(pass.length)+1 1120 for (l=1; l<lpass; l++){ 1121 K[l]=pass.charAt(l) 1122 } 1123 var transmit=0; 1124 for (y=1; y<lpass; y++){ 1125 for(x=0; x<62; x++){ 1126 if (K[y]==base[x]){ 1127 transmit+=f[x] 1128 transmit*=y 1129 } 1130 } 1131 } 1132 if (transmit==parseInt(actn1)) 1133 go() 1134 else 1135 inc() 1136} 1137} 1138function go(){ 1139alert(actn2); 1140location.href=pass+".html"; 1141} 1142function PVpassword(action) { 1143if (Array) { 1144 actn1 = action[1]; 1145 actn2 = action[2]; 1146 z=23; 1147 y=28; 1148 for (x=0; x<10; x++){ 1149 f[x]=x<<9 1150 f[x]+=23 1151 } 1152 for (x=10; x<36; x++){ 1153 y=y<<1 1154 v= Math.sqrt(y) 1155 v = parseInt(v,16) 1156 v+=5 1157 f[x]=v 1158 y++ 1159 } 1160 for (x=36; x<62; x++){ 1161 z=z<<1 1162 v= Math.sqrt(z) 1163 v = parseInt(v,16) 1164 v+=74 1165 f[x]=v 1166 z++ 1167 } 1168 iCounter = 3; 1169 Check(); 1170} 1171} 1172function CSSetStatus(action) { self.status = action[1]; } 1173var gCSIEDragObject = null; 1174var gDragX,gDragY; 1175function CSSetupDrag (layerName) { 1176 this.x = 0; this.y = 0; 1177 if (IsIE()) { 1178 this.canDrag=true; 1179 this.layerObj=document.all.tags("div")[layerName]; 1180 this.layerObj.dragObj = this; 1181 document.ondragstart = CSIEStartDrag; 1182 document.onmousedown = CSIEMouseDown; 1183 document.onmouseup = CSIEStopDrag; 1184 } else { 1185 if (CSBVers>=5) 1186 { 1187 this.layerObj=document.getElementById(layerName); 1188 this.layerObj.addEventListener("mousedown", CSNS6StartDrag, true); 1189 this.layerObj.addEventListener("mouseup", CSNS6StopDrag, true); 1190 } 1191 else 1192 { 1193 this.layer=CSNSStyl(layerName);this.onmousemove=null; 1194 this.layer.document.theLayer=this; 1195 this.layer.document.captureEvents(Event.MOUSEDOWN); 1196 this.layer.document.onmousedown=CSNSStartDrag; 1197 this.layer.document.onmouseup=CSNSStopDrag; 1198 } 1199 } 1200} 1201function CSNS6StartDrag (ev) { 1202 CSIDOM(); 1203 ev.currentTarget.addEventListener("mousemove", CSNS6DoDrag, true); 1204 gDragX=ev.clientX; 1205 gDragY=ev.clientY; 1206 ev.preventDefault(); 1207} 1208function CSNS6DoDrag (ev) { 1209 var style=ev.currentTarget.style; 1210 style.left = parseInt(style.left)+(ev.clientX-gDragX)+"px"; 1211 style.top = parseInt(style.top)+(ev.clientY-gDragY)+"px"; 1212 gDragX=ev.clientX; 1213 gDragY=ev.clientY; 1214} 1215function CSNS6StopDrag (ev) { 1216 ev.target.removeEventListener("mousedown", CSNS6StartDrag, true); 1217 ev.target.removeEventListener("mouseup", CSNS6StopDrag, true); 1218 ev.currentTarget.removeEventListener("mousemove", CSNS6DoDrag, true); 1219 ev.preventDefault(); 1220} 1221function CSNSStartDrag (ev) { 1222 var clickInMe = false; 1223 if (ev.target != this) { 1224 for (var i=0;i<this.images.length;i++) { 1225 if (this.images[i] == ev.target) { clickInMe = true; break;} 1226 } 1227 } 1228 else clickInMe = true; 1229 if (clickInMe) 1230 { 1231 this.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); 1232 this.onmousemove=CSNSDoDrag; 1233 this.theLayer.x= ev.pageX; 1234 this.theLayer.y= ev.pageY; 1235 this.routeEvent(ev); 1236 return false; 1237 } 1238 this.onmousemove=null;this.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP); 1239 this.routeEvent(ev); 1240 return true; 1241} 1242function CSNSStopDrag (ev) { 1243 this.onmousemove=null;this.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);return false; 1244} 1245function CSNSDoDrag (ev) { 1246 this.theLayer.layer.moveBy(ev.pageX-this.theLayer.x, ev.pageY-this.theLayer.y); 1247 this.theLayer.x = ev.pageX; 1248 this.theLayer.y = ev.pageY; 1249 this.routeEvent(ev); 1250} 1251function CSIEStartDrag () { 1252 if(gCSIEDragObject != null && (gCSIEDragObject.tagName==event.srcElement.tagName)) 1253 event.returnValue=false; 1254} 1255function CSIEStopDrag () { gCSIEDragObject=null; document.onmousemove=null; } 1256function CSIEMouseDown () { 1257 if(event.button==1) { 1258 dragLayer = event.srcElement; 1259 while (dragLayer!=null) 1260 { 1261 if ((dragLayer.dragObj == null) && (dragLayer.tagName == "DIV")) 1262 break; 1263 if (dragLayer.dragObj != null) 1264 break; 1265 dragLayer=dragLayer.parentElement; 1266 } 1267 1268 if (dragLayer == null) return; 1269 if (dragLayer.dragObj!=null && dragLayer.dragObj.canDrag) { 1270 gCSIEDragObject = dragLayer; 1271 gCSIEDragObject.dragObj.x=event.clientX; 1272 gCSIEDragObject.dragObj.y=event.clientY; 1273 document.onmousemove = CSIEMouseMove; 1274 } 1275 } 1276} 1277function CSIEMouseMove () { 1278 gCSIEDragObject.dragObj.layerObj.style.pixelLeft+=(event.clientX-gCSIEDragObject.dragObj.x); 1279 gCSIEDragObject.dragObj.layerObj.style.pixelTop+=(event.clientY-gCSIEDragObject.dragObj.y); 1280 gCSIEDragObject.dragObj.x=event.clientX; 1281 gCSIEDragObject.dragObj.y=event.clientY; 1282 event.returnValue = false; 1283 event.cancelBubble = true; 1284} 1285var gDragArray = new Array(); 1286function CSDrag(action) { gDragArray[gDragArray.length] = new CSSetupDrag(action[1]); } 1287function CSFlipMove(action) { 1288 if (action[1] == '') return; 1289 var curX = CSGetStylePos(action[1],0); var curY = CSGetStylePos(action[1],1); 1290 var x1 = action[2][0]; 1291 var y1 = action[2][1]; 1292 if ((x1 != curX) || (y1 != curY)) CSSlideLayer(action[1],action[2],action[4],action[5]);
1293 else CSSlideLayer(action[1],action[3],action[4],action[5]); 1294} 1295if (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >=5) { 1296 leftH = ".left"; 1297 topV = ".top"; 1298 nndoc = "document.getElementById(layername).style"; 1299 iestyle = ""; 1300 offsetH = "window.pageXOffset"; 1301 offsetV = "window.pageYOffset"; 1302 } 1303 1304 else if (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >=4) { 1305 leftH = ".left"; 1306 topV = ".top"; 1307 nndoc = "document."; 1308 iestyle = ""; 1309 offsetH = "window.pageXOffset"; 1310 offsetV = "window.pageYOffset"; 1311 } 1312 1313 else if (navigator.appName == "Microsoft Internet Explorer") { 1314 leftH = ".pixelLeft"; 1315 topV = ".pixelTop"; 1316 nndoc = ""; 1317 iestyle = "document.getElementById(layername).style"; 1318 offsetH = "document.body.scrollLeft"; 1319 offsetV = "document.body.scrollTop"; 1320 } 1321function getnewPos() { 1322var currentH = eval(offsetH); 1323var currentV = eval(offsetV); 1324x = parseInt(currentH) + parseInt(xpos); 1325y = parseInt(currentV) + parseInt(ypos); 1326moveLayer(); 1327setTimeout("getnewPos()",10) 1328} 1329function CSFloatLayer(action) { 1330layername = action[1]; 1331ypos = action[2]; 1332xpos = action[3]; 1333if (navigator.appVersion.charAt(0) >=5 || navigator.appName == "Microsoft Internet Explorer") { 1334 leftPos = eval(nndoc + iestyle + leftH); 1335 topPos = eval(nndoc + iestyle + topV); 1336 } else { 1337 leftPos = eval(nndoc + layername + iestyle + leftH); 1338 topPos = eval(nndoc + layername + iestyle + topV); 1339 } 1340 getnewPos() 1341 } 1342function moveLayer() { 1343if (navigator.appVersion.charAt(0) >=5 || navigator.appName == "Microsoft Internet Explorer") { 1344 eval(nndoc + iestyle + topV + "=" + y); 1345 eval(nndoc + iestyle + leftH + "=" + x); 1346 } else { 1347 eval(nndoc + layername + iestyle + topV + "=" + y); 1348 eval(nndoc + layername + iestyle + leftH + "=" + x); 1349 } 1350} 1351var myLayer = false; 1352var offSetX = 1; 1353var offSetY = 1; 1354function CSMouseFollow(action,offX,offY){ 1355 myLayer = action[1]; 1356 if(offX){offSetX=offX;} 1357 if(offY){offSetY=offY;} 1358 if (navigator.appName == "Netscape") { 1359 document.captureEvents(Event.MOUSEMOVE); 1360 } else { 1361 if(navigator.appVersion.indexOf("Mac")!=-1){offSetX=offSetX-18;} 1362 } 1363 document.onmousemove = mouseLayer; 1364} 1365function mouseLayer(e){ 1366 if (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >=5) { 1367 document.getElementById(myLayer).style.left = (e.pageX+offSetX); 1368 document.getElementById(myLayer).style.top = (e.pageY+offSetY); 1369 } 1370 else if (navigator.appName == "Netscape") { 1371 document.layers[myLayer].moveBy( 1372 (e.pageX+offSetX) - document.layers[myLayer].left, 1373 (e.pageY+offSetY) - document.layers[myLayer].top); 1374 return true; 1375 } else { 1376 document.all[myLayer].style.pixelLeft = (event.x+offSetX); 1377 document.all[myLayer].style.pixelTop = (event.y+offSetY); 1378 event.cancelBubble = true; 1379 event.returnValue = false; 1380 } 1381} 1382function CSMoveBy(action) 1383{ 1384 x = CSGetStylePos(action[1], 0); 1385 y = CSGetStylePos(action[1], 1); 1386 x += parseInt(action[2]); 1387 y += parseInt(action[3]); 1388 x = CSSetStylePos(action[1], 0, x); 1389 y = CSSetStylePos(action[1], 1, y); 1390} 1391function CSMoveTo(action) { CSSlideLayer(action[1],action[2],action[3],action[4]); } 1392function CSPlayScene(action) { CSStartSeq (action[1]); } 1393var CSLastSound = null 1394function CSPlaySound(action) { 1395 if (eval('document.'+action[1])!=null) { 1396 if (CSLastSound != null && CSLastSound != action[1]) eval ('document.' + CSLastSound + '.stop()'); 1397 CSLastSound = action[1] 1398 if (window.navigator.userAgent.indexOf("MSIE") > 0) eval ('document.' + CSLastSound + '.run()'); 1399 else eval ('document.' + CSLastSound + '.play(true)'); 1400 } else { alert ("The current Plug-In cannot be controlled by JavaScript. Please try using LiveAudio or a compatible Plug-In!"); } 1401} 1402function CSShowHide(action) { 1403 if (action[1] == '') return; 1404 var type=action[2]; 1405 if(type==0) CSSetStyleVis(action[1],0); 1406 else if(type==1) CSSetStyleVis(action[1],1); 1407 else if(type==2) { 1408 if (CSGetStyleVis(action[1]) == 0) CSSetStyleVis(action[1],1); 1409 else CSSetStyleVis(action[1],0); 1410 } 1411} 1412SSnumimg=1; SSsens2=-1;SSsens3=-1 1413function CSSlideShow(action) 1414{ 1415SSmax=action[2]
1416SSimgNom=action[1] 1417SSloop=action[4] 1418SSsens=action[3] 1419SSpalin=action[5] 1420var SSimg = null; 1421 if (document.images) { 1422 if (!IsIE()&&CSBVers<5) SSimg = CSFindElement(SSimgNom,0); 1423 else SSimg = document.images[SSimgNom]; 1424SSstr=SSimg.src 1425SSn=SSstr.length 1426SSp=SSn-6 1427SSpstr=SSstr.substring(0,SSp) 1428SSnimg=SSstr.substring(SSp,SSp+2) 1429SSformat=SSstr.substring(SSp+2,SSn) 1430if (SSformat==".jpg" || SSformat==".JPG" || SSformat==".gif" || SSformat==".GIF") 1431{} 1432else 1433{ 1434 alert("Image extension must be .jpg or .gif (case sensitive). Images must be numbered 01, 02 ...") 1435} 1436slide(SSmax,SSformat,SSpstr,SSnimg,SSimgNom,SSloop,SSpalin) 1437} 1438} 1439function slide(SSmax,SSformat,SSpstr,SSnimg,SSimgNom,SSloop,SSpalin) 1440{ 1441if (SSsens2==true) {SSsens=true} 1442if (SSsens2==false) {SSsens=false} 1443if (SSsens==true) 1444{ 1445SSsuite=SSnumimg-1 1446 if (SSnumimg>SSmax)SSsuite=SSmax 1447 if (SSnumimg<=1 & SSloop==true & SSpalin!=true) { SSsuite=SSmax } 1448 if (SSnumimg<=1 & SSloop==true & SSpalin==true) { 1449 if (SSsens2==-1 & SSsens3==-1) {SSsuite=SSmax;SSsens3=1} else { SSsuite=SSnumimg+1; SSsens2=false }} 1450 if (SSnumimg<=1 & SSloop!=true & SSpalin!=true) { 1451 if (SSsens2==-1 & SSsens3==-1) { SSsuite=SSmax;SSsens3=1 } else {SSsuite=SSnumimg; SSfini()}} 1452} 1453else 1454{ 1455SSmax=SSmax-1 1456SSsuite=SSnumimg+1 1457 if (SSnumimg>SSmax & SSloop==true & SSpalin!=true) { SSsuite=1} 1458 if (SSnumimg>SSmax & SSloop==true & SSpalin==true) {SSsuite=SSnumimg-1; SSsens2=true } 1459 if (SSnumimg>SSmax & SSloop!=true & SSpalin!=true) { SSsuite=SSnumimg;SSfini() } 1460 if (SSnumimg<1) SSsuite=1 1461} 1462SSnumimg=SSsuite 1463if (SSsuite<10) { 1464 SSaller="0"+SSsuite 1465 } 1466 else SSaller=SSsuite 1467SSsource=SSpstr+SSaller+SSformat 1468var SSimg = null; 1469 if (document.images) { 1470 if (!IsIE()&&CSBVers<5) SSimg = CSFindElement(SSimgNom,0); 1471 else SSimg = document.images[SSimgNom]; 1472 if (SSimg) SSimg.src = SSsource; 1473 } 1474} 1475function SSfini() { 1476} 1477function CSSlideShowAuto(action) 1478{ 1479SSAfini=0 1480SSAnumimg=0 1481SSAmax=action[2] 1482SSAimgNom=action[1] 1483SSAtemps=action[3]*1000 1484if (action[4]==true) 1485 { 1486 SSAstop=true 1487 } 1488 else SSAstop=false 1489var SSAimg = null; 1490 if (document.images) { 1491 if (!IsIE()&&CSBVers<5) SSAimg = CSFindElement(SSAimgNom,0); 1492 else SSAimg = document.images[SSAimgNom]; 1493str=SSAimg.src 1494n=str.length 1495p=n-6 1496SSApstr=str.substring(0,p) 1497SSAnimg=str.substring(p,p+2) 1498SSAformat=str.substring(p+2,n) 1499if (SSAformat==".jpg" || SSAformat==".JPG" || SSAformat==".gif" || SSAformat==".GIF") 1500{} 1501else 1502{ 1503 alert("Image extension must be .jpg or .gif (case sensitive). Images must use 2 digit naming starting with 01, 02 ... plus extension") 1504} 1505if (SSAnimg.substring(0,1)=="0") 1506{ 1507SSAnumimg=Number(SSAnimg.substring(1,2)) 1508} 1509else 1510{SSAnumimg=Number(SSAnimg)} 1511SSAtempo(SSAmax,SSAimgNom,SSAtemps,SSAstop,SSApstr,SSAnimg,SSAformat) 1512} 1513} 1514function SSAtempo(SSAmax,SSAimgNom,SSAtemps,SSAstop,SSApstr,SSAnimg,SSAformat) 1515{ 1516setTimeout("slideAuto(SSAmax,SSAimgNom,SSAstop,SSApstr,SSAnimg,SSAformat)",SSAtemps) 1517} 1518function slideAuto(SSAmax,SSAimgNom,SSAstop,SSApstr,SSAnimg,SSAformat) 1519{ 1520if (SSAfini==1) { 1521SSAnumimg = SSAnumimg-2 1522CSSlideShowAutoPause() 1523} 1524else 1525{ 1526SSAmax=SSAmax-1 1527SSAsuite=SSAnumimg+1 1528 if (SSAnumimg>SSAmax) 1529 { 1530 SSAsuite=1 1531 if (SSAstop==true) SSAfini=1 1532 else 1533 SSAfini=0 1534 } 1535 if (SSAnumimg<1) SSAsuite=1 1536SSAnumimg=SSAsuite 1537if (SSAsuite<10) { 1538 SSAaller="0"+SSAsuite 1539 } 1540 else SSAaller=SSAsuite 1541SSAsource=SSApstr+SSAaller+SSAformat 1542var SSAimg = null; 1543 if (document.images) { 1544 if (!IsIE()&&CSBVers<5) SSAimg = CSFindElement(SSAimgNom,0); 1545 else SSAimg = document.images[SSAimgNom]; 1546 if (SSAimg) SSAimg.src = SSAsource; 1547 } 1548SSAtempo(SSAmax,SSAimgNom,SSAtemps,SSAstop,SSApstr,SSAnimg,SSAformat) 1549} 1550} 1551function CSSlideShowAutoPause() 1552{} 1553function CSSlideShowAutoStop(action) 1554{ 1555if (SSAfini==0) SSAfini=1 1556else SSAfini=0 ; SSAnumimg = SSAnumimg+2 ; slideAuto(SSAmax,SSAimgNom,SSAstop,SSApstr,SSAnimg,SSAformat) 1557} 1558function CSStopAll(action) { CSStopComplete (); } 1559function CSStopScene(action) { CSStopFunction (action[1]); } 1560function CSStopSound (action) {if (eval('document.'+action[1])!=null) { eval ('document.' + action[1] + '.stop()');}} 1561function CSStartWipe (action) 1562{ 1563 var el=CSCreateTransElement (action[1], action[2]); 1564 if (el==null) return; 1565 var dir=action[3]; 1566 if (dir=="_inLeft") {el.steps=el.clipRect.width/el.maxValue; el.modus="in";} 1567 else if (dir=="_inRight") {el.steps=el.clipRect.width/el.maxValue; el.modus="in";} 1568 else if (dir=="_outLeft") {el.steps=el.clipRect.width/el.maxValue; el.modus="out";} 1569 else if (dir=="_outRight") {el.steps=el.clipRect.width/el.maxValue; el.modus="out";} 1570 else if (dir=="_inTop") {el.steps=el.clipRect.height/el.maxValue; el.modus="in";} 1571 else if (dir=="_inBottom") {el.steps=el.clipRect.height/el.maxValue; el.modus="in";} 1572 else if (dir=="_outTop") {el.steps=el.clipRect.height/el.maxValue; el.modus="out";} 1573 else if (dir=="_outBottom") {el.steps=el.clipRect.height/el.maxValue; el.modus="out";} 1574 else if (dir=="_inCenter") {el.HSteps=el.clipRect.width/el.maxValue; el.VSteps=el.clipRect.height/el.maxValue; el.modus="in";} 1575 else if (dir=="_outCenter") {el.HSteps=el.clipRect.width/el.maxValue; el.VSteps=el.clipRect.height/el.maxValue; el.modus="out";} 1576 if (el.modus=="") return; 1577 el.currentValue=0; 1578 el.glDir=action[3]; 1579 CSStartFunction(CSDoWipe,el); 1580} 1581function CSDoWipe (info) 1582{ 1583 var el = info.data; 1584 if (el==null) return false; 1585 if (el.currentValue==el.maxValue) { CSFinishWipe(el); return false; } 1586 var r = new CSRect(el.clipRect.left,el.clipRect.top,el.clipRect.width,el.clipRect.height); 1587 var dir=el.glDir;
1588 if (dir=="_inLeft") {r.left=r.width-el.currentValue*el.steps;} 1589 else if (dir=="_inTop") {r.top=r.height-el.currentValue*el.steps;} 1590 else if (dir=="_inRight") {r.width=el.currentValue*el.steps;} 1591 else if (dir=="_inBottom") {r.height=el.currentValue*el.steps;} 1592 else if (dir=="_outLeft") {r.width=r.width-el.currentValue*el.steps;} 1593 else if (dir=="_outTop") {r.height=r.height-el.currentValue*el.steps;} 1594 else if (dir=="_outRight") {r.left=el.currentValue*el.steps;} 1595 else if (dir=="_outBottom") {r.top=el.currentValue*el.steps;} 1596 else if (dir=="_inCenter") {r=CSCenterRectIn(el,r);} 1597 else if (dir=="_outCenter") {r=CSCenterRectOut(el,r);} 1598 CSSetLayerClip(el,r); 1599 el.currentValue+=1; 1600 return true; 1601} 1602function CSFinishWipe (el) 1603{ 1604 if (el.modus=="in") CSSetLayerClip(el,el.clipRect); 1605 else { 1606 el.clipRect=new CSRect(0,0,el.width,el.height); 1607 CSSetLayerClip(el,el.clipRect); 1608 CSSetStyleVis(el.layer,0); 1609 } 1610 CSDisposeTransElement(el); 1611} 1612function CSCenterRectIn(el,r) 1613{ 1614 var hValue= el.currentValue*el.HSteps/2; 1615 var vValue= el.currentValue*el.VSteps/2; 1616 r.left=Math.round(r.left+r.width/2-hValue); 1617 r.top=Math.round(r.top+r.height/2-vValue); 1618 r.width=Math.round(hValue*2); 1619 r.height=Math.round(vValue*2); 1620 return r; 1621} 1622function CSCenterRectOut(el,r) 1623{ 1624 var hValue= el.currentValue*el.HSteps/2; 1625 var vValue= el.currentValue*el.VSteps/2; 1626 r.left+=Math.round(hValue); 1627 r.top+=Math.round(vValue); 1628 r.width-=Math.round(hValue*2); 1629 r.height-=Math.round(vValue*2); 1630 return r; 1631} 1632function CSshowtimedateID(action) { 1633 (action[2] != "") ? (updateobject = action[2]) : (updateobject = action[1]) 1634 showtime = action[3] 1635 usemilitary = action[4] 1636 showdate = action[5] 1637 dateformat = action[6] 1638 showday = action[7] 1639 leadin = action[8] 1640 opentag = action[9] 1641 closetag = action[10] 1642 theTimer = setTimeout("theClockDate()",10); 1643} 1644function theClockDate() { 1645 now = new Date() 1646 theMonth = now.getMonth() + 1 1647 theDate = now.getDate() 1648 theYear = now.getFullYear() 1649 theDay = now.getDay() 1650 hours = now.getHours() 1651 if(navigator.appVersion.indexOf("MSIE 5.0; Macintosh") != -1) { 1652 if (theMonth <= 11 && theMonth >= 4) { hours = hours + 1} 1653 } 1654 ampm = ((hours >= 12) ? "PM" : "AM"); 1655 hours = ((hours > 12 && usemilitary == false) ? hours -12 : hours); 1656 if (hours == 0) hours = 12; 1657 if (hours >= 1 && hours <=9) hours = "0" + hours; 1658 minutes = now.getMinutes() 1659 if (minutes < 10) minutes = "0" + minutes; 1660 time = ""; 1661 (showtime == true) ? (time = " " + hours + ":" + minutes) : (time = "",ampm=""); 1662 (usemilitary == true) ? (ampm="") : (ampm=ampm); 1663 days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); 1664 today = days[theDay]; 1665 if (showdate == true) { 1666 if (dateformat == 0) todisplay = theMonth + "/" + theDate + "/" + theYear; 1667 if (dateformat == 1) todisplay = theDate + "/" + theMonth + "/" + theYear; 1668 if (dateformat == 2) todisplay = theYear + "/" + theMonth + "/" + theDate; 1669 if (dateformat == 3) todisplay = theYear + "/" + theDate + "/" + theMonth; 1670 } else {todisplay = "" } 1671 if (showday == true) todisplay = today + ", " + todisplay; 1672 if (document.all) { document.all(updateobject).innerHTML = opentag + leadin + todisplay + time + " " + ampm + closetag; } 1673 else { 1674 if (document.getElementById) { document.getElementById(updateobject).innerHTML = opentag + leadin + todisplay + time + " " + ampm + closetag; } 1675} 1676theTimer = setTimeout("theClockDate()",2000); 1677} 1678function CSdigitalclock(action){ 1679img1 = CSGetImage(action[1]); 1680img2 = CSGetImage(action[2]); 1681img3 = CSGetImage(action[3]); 1682img4 = CSGetImage(action[4]); 1683usemilitary = action[5]; 1684giflocation = action[6]; 1685path = giflocation.substring(0, giflocation.length - 5); 1686extension = (giflocation.indexOf("jpg") != -1) ? (".jpg") : (".gif"); 1687digClock(); 1688} 1689function digClock() { 1690now = new Date(); 1691hours = now.getHours(); 1692theMonth = now.getMonth(); 1693if(navigator.appVersion.indexOf("MSIE 5.0; Macintosh") != -1) { 1694 if (theMonth <= 11 && theMonth >= 4) { hours = hours + 1 }; 1695 if (hours == 24) { hours = 0 }; 1696 } 1697minutes = now.getMinutes(); 1698hours = ((hours > 12 && usemilitary == false) ? hours -12 : hours); 1699if (hours >= 0 && hours <=9) hours = "0" + hours; 1700if (usemilitary == false && hours == 00) { hours = 12 }; 1701if (minutes >= 0 && minutes <=9) minutes = "0" + minutes; 1702hours = "" + hours; 1703minutes = "" + minutes; 1704hour1 = hours.substring(0,1); 1705hour2 = hours.substring(1,2); 1706minutes1 = minutes.substring(0,1); 1707minutes2 = minutes.substring(1,2); 1708updater(); 1709} 1710
1711function updater() { 1712img1.src = path + hour1 + extension; 1713img2.src = path + hour2 + extension; 1714img3.src = path + minutes1 + extension; 1715img4.src = path + minutes2 + extension; 1716theTimer = setTimeout("digClock()",1000); 1717} 1718function CSFixFct() { 1719 var d = document; var w = window; 1720 if (d.cs.csFix.w != w.innerWidth || d.cs.csFix.h != w.innerHeight) { 1721 d.location = d.location; } 1722} 1723function CSNSFix(action) { 1724 var d = document; var w = window; 1725 if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) { 1726 if (typeof d.cs == 'undefined') { 1727 d.cs = new Object; 1728 d.cs.csFix = new Object; 1729 } else if (CSIsFrame (w) == true) CSFixFct(); 1730 d.cs.csFix.w = w.innerWidth; 1731 d.cs.csFix.h = w.innerHeight; 1732 window.onresize = CSFixFct; 1733 } 1734} 1735function CSIsFrame (window) { 1736 var rootWindow = window.parent; 1737 if (rootWindow == 'undefined') return false; 1738 for (i = 0; i < rootWindow.frames.length; i++) 1739 if (window == rootWindow.frames[i]) return true; 1740 return false; 1741} 1742function CSprintdocument(action){ 1743if (navigator.appName .indexOf("Microsoft") != -1 && navigator.platform.indexOf("Mac") != -1 || navigator.appVersion.indexOf("3.0") != -1) { 1744alert("Please use your browser\'s print command to print this document."); 1745 } else { 1746 (action[1] != "") ? (parent.frames[action[1]].print()) : (parent.print()); 1747 } 1748} 1749function CSResizeWindow(action) { 1750 if(navigator.appVersion.charAt(0) >=4) { window.resizeTo (action[1],action[2]) } 1751} 1752function CSScrollDown(action){ 1753 if(navigator.appVersion.charAt(0) >=4) { 1754 var container = 0 1755 if (action[2] > 0) { 1756 while (container < action[1]) { 1757 window.scrollBy(0,action[2]); 1758 container = container + action[2]; 1759 } 1760 } 1761 } 1762} 1763function CSScrollLeft(action){ 1764 if(navigator.appVersion.charAt(0) >=4) { 1765 var container = 0 1766 if (action[2] > 0) { 1767 while (container < action[1]) { 1768 window.scrollBy(-action[2],0); 1769 container = container + action[2]; 1770 } 1771 } 1772 } 1773} 1774function CSScrollRight(action){ 1775 if(navigator.appVersion.charAt(0) >=4) { 1776 var container = 0 1777 if (action[2] > 0) { 1778 while (container < action[1]) { 1779 window.scrollBy(action[2],0); 1780 container = container + action[2]; 1781 } 1782 } 1783 } 1784} 1785function CSScrollstatus(action) { 1786phrase = action[1]; 1787speed = action[2]; 1788(action[3] != true) ? delay = setTimeout("CSScrollleftidle()",20) : delay = setTimeout("CSScrollrightidle()",20) 1789var thestring 1790leftphrase = " " + phrase 1791charnum = leftphrase.length; 1792stringnum = leftphrase.length; 1793size = leftphrase.length+1 1794} 1795function CSScrollrightidle() { 1796 stringnum--; 1797 (stringnum != 0) ? window.status = leftphrase.substring(charnum,stringnum) : stringnum = charnum 1798 delay = setTimeout("CSScrollrightidle()",speed); 1799 } 1800 1801function CSScrollleftidle() { 1802 thestring = leftphrase.substring(0,1); 1803 leftphrase += thestring 1804 leftphrase = leftphrase.substring(1,size); 1805 window.status = leftphrase.substring(0,size); 1806 delay = setTimeout("CSScrollleftidle()",speed); 1807} 1808function CSScrollUp(action){ 1809 if(navigator.appVersion.charAt(0) >=4) { 1810 var container = 0 1811 if (action[2] > 0) { 1812 while (container < action[1]) { 1813 window.scrollBy(0,-action[2]); 1814 container = container + action[2]; 1815 } 1816 } 1817 } 1818} 1819function CSSearchEngine(action) { 1820var form = action[1] 1821var elem = action[2] 1822var theEntry 1823if(action[3]==true) { theEntry = action[4] } 1824else { theEntry = document.forms[form].elements[elem].value } 1825var type=action[5]; 1826if(type==0) engine="http://search.adobe.com/cgi-bin/query?mss=simple&pg=q&what=web&fmt=.&where=www_search_main&superq="+theEntry+"&rd=all&q="+theEntry+"&x=39&y=10" //Adobe.com 1827else if(type==1) engine="http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=.&q="+theEntry //Altavista 1828else if(type==2) engine="http://groups.google.com/groups?q="+theEntry+"&hl=en&lr=&safe=off&btnG=Google+Search&site=groups"; //Google Deja News (Usenet) 1829else if(type==3) engine="http://www.excite.com/search.gw?trace=a&search="+theEntry; //Excite 1830else if(type==4) engine="http://www.search.hotbot.com/hResult.html?SM=MC&MT="+theEntry+"&DV=7&RG=.com&DC=10&DE=2&OPs=MDRTP&_v=2&DU=days&SW=web&search.x=23&search.y=8"; //HotBot 1831else if(type==5) engine="http://www.google.com/search?q="+theEntry+"&btnG=Google+Search" //Google 1832else if(type==6) engine="http://search.msn.com/results.asp?RS=CHECKED&FORM=MSNH&v=1&q="+theEntry; //MSN 1833else if(type==7) engine="http://www.lycos.com/cgi-bin/pursuit?query="+theEntry+"&matchmode=and&cat=lycos&x=33&y=10"; //Lycos 1834else if(type==8) engine="http://shopper.cnet.com/shopping/search/results/1,10214,0-1257,00.html?tag=st%2Esh%2E1257%2Esbsr&qt="+theEntry+"&cn=&ca=1257" //Shopper.com 1835else if(type==9) engine="http://search.excite.com/search.gw?c=web&lk=webcrawler&onload=&s="+theEntry;//Webcrawler 1836else if(type==10) engine="http://search.yahoo.com/bin/search?p="+theEntry //Yahoo 1837if (theEntry=="") { alert("Please enter a search keyword!") } 1838else { newWindow=window.open(engine, action[6],"toolbar,location,directories,status,menubar,scrollbars,resizable=1") } 1839} 1840 1841function CSSetBackColor(action) { document.bgColor = action[1]; } 1842function CSshowtime(action) { 1843message = action[1] 1844military = action[2] 1845offset = action[3] 1846dst = action[4] 1847statuscheck = action[5] 1848formcheck = action[6] 1849form = action[7]; 1850elem = action[8]; 1851var dstoffset = 0 1852theTimer = setTimeout("theClock()",10); 1853} 1854 1855function theClock() { 1856clearTimeout(theTimer); 1857var now = new Date();
1858var correct = now.toGMTString(); 1859time_string = correct.split(' '); 1860hm = time_string[4]; 1861hm_string = hm.split(':'); 1862var hours = hm_string[0] - 0; 1863var suffix = " A.M." 1864if (dst == true) dstoffset = 1 1865hours = hours + offset + dst; 1866 if (hours < 0) hours +=24 1867 if (hours > 11 && hours < 24) suffix = " P.M." 1868 if (hours > 12 && military == false) hours -=12; 1869 1870var minutes = now.getMinutes(); 1871var timeValue12 = "" + ((hours > 12) ? hours -12 : hours) 1872if (timeValue12 == 0) timeValue12 = 12 1873var timeValue24 = "" + ((hours > 23) ? hours -24 : hours) 1874timeValue12 += ((minutes < 10) ? ":0" : ":") + minutes 1875timeValue12 += suffix 1876timeValue24 += ((minutes < 10) ? ":0" : ":") + minutes 1877 if(military == false) { 1878 WorldTime = message + timeValue12; 1879 } else { 1880 WorldTime = message + timeValue24 1881 } 1882 if(statuscheck == true) window.status = WorldTime 1883 if(formcheck == true) document.forms[form].elements[elem].value = WorldTime 1884theTimer = setTimeout("theClock()",5000); 1885} 1886function CSActionGroup (action) { 1887 for(var i=1;i<action.length;i++) { CSAction(new Array(action[i])); } 1888} 1889function CSCallAction(action) 1890{ 1891 CSAction(new Array(action[1])); 1892} 1893function CSCallFunction(action) 1894{ 1895 var str = action[1]; 1896 str += "("; 1897 str += action[2]; 1898 str += ");" 1899 return eval(str); 1900} 1901function CSConditionAction(action) { 1902 if (action[1]) { 1903 if (CSAction(new Array(action[1])) == true) { 1904 if (action[2]) CSAction(new Array(action[2])); 1905 } else if (action[3]) CSAction(new Array(action[3])); 1906 } 1907} 1908function CSIdleObject (action) { 1909 this.conditionAction = action[2]; 1910 this.trueAction = action[3]; 1911 this.falseAction = action[4]; 1912 this.exitIdleIfTrue = action[1]; 1913 this.lastState = false; 1914} 1915function CSIdleAction(action) { 1916 idleObj = new CSIdleObject (action); 1917 CSStartFunction (CSDoIdle,idleObj); 1918} 1919function CSDoIdle (param) { 1920 idleObject=param.data; 1921 if (idleObject.conditionAction) { 1922 gCurrentIdleObject = idleObject; 1923 var result = CSAction(new Array(idleObject.conditionAction)); 1924 if (result == true && idleObject.lastState==false) { 1925 idleObject.lastState = result; 1926 if (idleObject.trueAction) { 1927 CSAction(new Array(idleObject.trueAction)); 1928 if (idleObject.exitIdleIfTrue == true) return false; 1929 } 1930 } else if (result == false && idleObject.lastState == true) { 1931 idleObject.lastState = false; 1932 if (idleObject.falseAction) { 1933 CSAction(new Array(idleObject.falseAction)); 1934 } 1935 } 1936 } 1937 return true; 1938} 1939function CSLayerIntersect (condition) 1940{ 1941 var l1,t1,r1,b1,l2,t2,r2,b2; 1942 if (IsIE()) { 1943 var layer1=document.all.tags("div")[condition[1]]; 1944 var layer2=document.all.tags("div")[condition[2]]; 1945 l1=layer1.style.pixelLeft; t1=layer1.style.pixelTop; r1=layer1.offsetWidth+l1; b1=layer1.offsetHeight+t1; 1946 l2=layer2.style.pixelLeft; t2=layer2.style.pixelTop; r2=layer2.offsetWidth+l2; b2=layer2.offsetHeight+t2; 1947 } else { 1948 var layer1=CSNSStyl(condition[1]); 1949 var layer2=CSNSStyl(condition[2]); 1950 if (CSBVers>=5) 1951 { 1952 CSIDOM(); 1953 l1=parseInt(layer1.left); t1=parseInt(layer1.top); r1=parseInt(layer1.width)+l1; b1=parseInt(layer1.height)+t1; 1954 l2=parseInt(layer2.left); t2=parseInt(layer2.top); r2=parseInt(layer2.width)+l2; b2=parseInt(layer2.height)+t2; 1955 } 1956 else 1957 { 1958 l1=layer1.x; t1=layer1.y; r1=layer1.clip.width+l1; b1=layer1.clip.height+t1; 1959 l2=layer2.x; t2=layer2.y; r2=layer2.clip.width+l2; b2=layer2.clip.height+t2; 1960 } 1961 } 1962 var w = (r1 < r2 ? r1 : r2) - (l1 > l2 ? l1 : l2) 1963 var h = (b1 < b2 ? b1 : b2) - (t1 > t2 ? t1 : t2) 1964 return ((w >= 0) && (h >= 0)); 1965} 1966CSCurrentPressedKey = -1; 1967function CSKeyPress(ev) { 1968 var code; 1969 if(IsIE()) CSCurrentPressedKey = event.keyCode; 1970 else CSCurrentPressedKey = ev.which; 1971} 1972document.onkeypress = CSKeyPress; 1973function CSKeyCompare(condition) 1974{ 1975 var eq = (condition[1] == CSCurrentPressedKey); 1976 if(eq) 1977 CSCurrentPressedKey = -1; 1978 return eq; 1979} 1980function CSTimeout (condition) { 1981 var result = false; 1982 if (typeof (gCurrentIdleObject) == "undefined") return result; 1983 if (gCurrentIdleObject.lastTime) { 1984 var t=new Date(); 1985 if (t.getTime() >= gCurrentIdleObject.lastTime) { 1986 if (t.getTime() >= gCurrentIdleObject.nextTime) { 1987 gCurrentIdleObject.lastTime = t.getTime() + condition[1]*1000; 1988 gCurrentIdleObject.nextTime = gCurrentIdleObject.lastTime + condition[1]*1000; 1989 return false; 1990 } 1991 return true; 1992 } 1993 } else { 1994 var t=new Date(); 1995 gCurrentIdleObject.lastTime = t.getTime() + condition[1]*1000; 1996 gCurrentIdleObject.nextTime = gCurrentIdleObject.lastTime + condition[1]*1000; 1997 } 1998 return result; 1999} 2000function CSDeleteCookie(action) 2001{ 2002var name=action[1] 2003var value=action[2] 2004var jours=-12000 2005path="/" 2006domain=null 2007var expdate = new Date (); 2008expdate.setTime (expdate.getTime() + (jours * 60 * 60 * 1000)); 2009SetCookie(name,value,expdate) 2010} 2011function SetCookie (name, value) { 2012 var argv = SetCookie.arguments; 2013 var argc = SetCookie.arguments.length; 2014 var expires = (argc > 2) ? argv[2] : null; 2015 var secure = (argc > 5) ? argv[5] : false; 2016 document.cookie = name + "=" + escape (value) + 2017 ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 2018 ((path == null) ? "" : ("; path=" + path)) + 2019 ((domain == null) ? "" : ("; domain=" + domain)) + 2020 ((secure == true) ? "; secure" : ""); 2021} 2022function CSvisits(action) { 2023mycookie = action[8] 2024cookieExpires = new Date 2025cookieExpires.setMonth(cookieExpires.getMonth() + 12) 2026visits = eval(cookieVal(mycookie)) 2027visits++ 2028document.cookie = mycookie+"="+visits+";expires=" + cookieExpires.toGMTString() 2029 2030function cookieVal(cookieName) { 2031 thisCookie = document.cookie.split("; ") 2032 for (i=0; i<thisCookie.length; i++) { 2033 if (cookieName == thisCookie[i].split("=")[0]) { 2034 return thisCookie[i].split("=")[1] 2035 } 2036 } 2037 return 0 2038} 2039 if(visits == 1 && action[1] == true) alert(action[2]) 2040 else 2041 if(action[5] == true) alert(action[3] + " " + visits) 2042 if(action[6] == true) { 2043 if(visits == action[7]) 2044 alert(action[4]) 2045 } 2046} 2047 2048function CSVisitorCookie(action) 2049{ 2050resultat = "visitor" 2051cookiename = action[1] 2052goUrl = action[2] 2053var arg = cookiename + "="; 2054 var alen = arg.length; 2055 var clen = document.cookie.length; 2056 var i = 0; 2057 while (i < clen) { 2058 var j = i + alen; 2059 if (document.cookie.substring(i, j) == arg) 2060 return CSVisitorGetCookie (j); 2061 i = document.cookie.indexOf(" ", i) + 1; 2062 if (i == 0) break; 2063 }
2064 VisitorSetCookie(cookiename) 2065 return null; 2066} 2067function CSVisitorGetCookie (offset) { 2068 var endstr = document.cookie.indexOf (";", offset); 2069 if (endstr == -1) 2070 endstr = document.cookie.length; 2071 valeur=unescape(document.cookie.substring(offset, endstr)) 2072 if (valeur==resultat) 2073 VisitorGotoLink(goUrl) 2074 else 2075 VisitorSetCookie(cookiename) 2076} 2077function VisitorGotoLink(goUrl) { 2078location = goUrl 2079} 2080function VisitorSetCookie(cookiename) 2081{ 2082var value="visitor" 2083var jours=500*24 2084path="/" 2085domain=null 2086var expdate = new Date (); 2087expdate.setTime (expdate.getTime() + (jours * 60 * 60 * 1000)); 2088SetCookie(cookiename,value,expdate) 2089} 2090function SetCookie (cookiename, value) { 2091 var argv = SetCookie.arguments; 2092 var argc = SetCookie.arguments.length; 2093 var expires = (argc > 2) ? argv[2] : null; 2094 var secure = (argc > 5) ? argv[5] : false; 2095 document.cookie = cookiename + "=" + escape (value) + 2096 ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 2097 ((path == null) ? "" : ("; path=" + path)) + 2098 ((domain == null) ? "" : ("; domain=" + domain)) + 2099 ((secure == true) ? "; secure" : ""); 2100} 2101// EOF 2102 2103 2104function changeImagesArray(array) { 2105 if (preloadFlag == true) { 2106 var d = document; var img; 2107 for (var i=0; i<array.length; i+=2) { 2108 img = null; var n = array[i]; 2109 if (d.images) {img = d.images[n];} 2110 if (!img && d.getElementById) {img = d.getElementById(n);} 2111 if (img) {img.src = array[i+1];} 2112 } 2113 } 2114}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.