PageSourceSearch

http://www.thegreattao.com/GeneratedItems/CSScriptLib.js

js thegreattao.com collected 2026-10-02 11:57:20 UTC 83,434 bytes, 2,421 lines download raw bytes

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

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.