Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-inclu.../js
File: colorpicker.js
// ===================================================================
[0] Fix | Delete
// Author: Matt Kruse <matt@mattkruse.com>
[1] Fix | Delete
// WWW: http://www.mattkruse.com/
[2] Fix | Delete
//
[3] Fix | Delete
// NOTICE: You may use this code for any purpose, commercial or
[4] Fix | Delete
// private, without any further permission from the author. You may
[5] Fix | Delete
// remove this notice from your final code if you wish, however it is
[6] Fix | Delete
// appreciated by the author if at least my web site address is kept.
[7] Fix | Delete
//
[8] Fix | Delete
// You may *NOT* re-distribute this code in any way except through its
[9] Fix | Delete
// use. That means, you can include it in your product, or your web
[10] Fix | Delete
// site, or any other form where the code is actually being used. You
[11] Fix | Delete
// may not put the plain javascript up on your site for download or
[12] Fix | Delete
// include it in your javascript libraries for download.
[13] Fix | Delete
// If you wish to share this code with others, please just point them
[14] Fix | Delete
// to the URL instead.
[15] Fix | Delete
// Please DO NOT link directly to my .js files from your site. Copy
[16] Fix | Delete
// the files to your server and use them there. Thank you.
[17] Fix | Delete
// ===================================================================
[18] Fix | Delete
[19] Fix | Delete
[20] Fix | Delete
/* SOURCE FILE: AnchorPosition.js */
[21] Fix | Delete
[22] Fix | Delete
/*
[23] Fix | Delete
AnchorPosition.js
[24] Fix | Delete
Author: Matt Kruse
[25] Fix | Delete
Last modified: 10/11/02
[26] Fix | Delete
[27] Fix | Delete
DESCRIPTION: These functions find the position of an <A> tag in a document,
[28] Fix | Delete
so other elements can be positioned relative to it.
[29] Fix | Delete
[30] Fix | Delete
COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
[31] Fix | Delete
positioning errors - usually with Window positioning - occur on the
[32] Fix | Delete
Macintosh platform.
[33] Fix | Delete
[34] Fix | Delete
FUNCTIONS:
[35] Fix | Delete
getAnchorPosition(anchorname)
[36] Fix | Delete
Returns an Object() having .x and .y properties of the pixel coordinates
[37] Fix | Delete
of the upper-left corner of the anchor. Position is relative to the PAGE.
[38] Fix | Delete
[39] Fix | Delete
getAnchorWindowPosition(anchorname)
[40] Fix | Delete
Returns an Object() having .x and .y properties of the pixel coordinates
[41] Fix | Delete
of the upper-left corner of the anchor, relative to the WHOLE SCREEN.
[42] Fix | Delete
[43] Fix | Delete
NOTES:
[44] Fix | Delete
[45] Fix | Delete
1) For popping up separate browser windows, use getAnchorWindowPosition.
[46] Fix | Delete
Otherwise, use getAnchorPosition
[47] Fix | Delete
[48] Fix | Delete
2) Your anchor tag MUST contain both NAME and ID attributes which are the
[49] Fix | Delete
same. For example:
[50] Fix | Delete
<A NAME="test" ID="test"> </A>
[51] Fix | Delete
[52] Fix | Delete
3) There must be at least a space between <A> </A> for IE5.5 to see the
[53] Fix | Delete
anchor tag correctly. Do not do <A></A> with no space.
[54] Fix | Delete
*/
[55] Fix | Delete
[56] Fix | Delete
// getAnchorPosition(anchorname)
[57] Fix | Delete
// This function returns an object having .x and .y properties which are the coordinates
[58] Fix | Delete
// of the named anchor, relative to the page.
[59] Fix | Delete
function getAnchorPosition(anchorname) {
[60] Fix | Delete
// This function will return an Object with x and y properties
[61] Fix | Delete
var useWindow=false;
[62] Fix | Delete
var coordinates=new Object();
[63] Fix | Delete
var x=0,y=0;
[64] Fix | Delete
// Browser capability sniffing
[65] Fix | Delete
var use_gebi=false, use_css=false, use_layers=false;
[66] Fix | Delete
if (document.getElementById) { use_gebi=true; }
[67] Fix | Delete
else if (document.all) { use_css=true; }
[68] Fix | Delete
else if (document.layers) { use_layers=true; }
[69] Fix | Delete
// Logic to find position
[70] Fix | Delete
if (use_gebi && document.all) {
[71] Fix | Delete
x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
[72] Fix | Delete
y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
[73] Fix | Delete
}
[74] Fix | Delete
else if (use_gebi) {
[75] Fix | Delete
var o=document.getElementById(anchorname);
[76] Fix | Delete
x=AnchorPosition_getPageOffsetLeft(o);
[77] Fix | Delete
y=AnchorPosition_getPageOffsetTop(o);
[78] Fix | Delete
}
[79] Fix | Delete
else if (use_css) {
[80] Fix | Delete
x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
[81] Fix | Delete
y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
[82] Fix | Delete
}
[83] Fix | Delete
else if (use_layers) {
[84] Fix | Delete
var found=0;
[85] Fix | Delete
for (var i=0; i<document.anchors.length; i++) {
[86] Fix | Delete
if (document.anchors[i].name==anchorname) { found=1; break; }
[87] Fix | Delete
}
[88] Fix | Delete
if (found==0) {
[89] Fix | Delete
coordinates.x=0; coordinates.y=0; return coordinates;
[90] Fix | Delete
}
[91] Fix | Delete
x=document.anchors[i].x;
[92] Fix | Delete
y=document.anchors[i].y;
[93] Fix | Delete
}
[94] Fix | Delete
else {
[95] Fix | Delete
coordinates.x=0; coordinates.y=0; return coordinates;
[96] Fix | Delete
}
[97] Fix | Delete
coordinates.x=x;
[98] Fix | Delete
coordinates.y=y;
[99] Fix | Delete
return coordinates;
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
// getAnchorWindowPosition(anchorname)
[103] Fix | Delete
// This function returns an object having .x and .y properties which are the coordinates
[104] Fix | Delete
// of the named anchor, relative to the window
[105] Fix | Delete
function getAnchorWindowPosition(anchorname) {
[106] Fix | Delete
var coordinates=getAnchorPosition(anchorname);
[107] Fix | Delete
var x=0;
[108] Fix | Delete
var y=0;
[109] Fix | Delete
if (document.getElementById) {
[110] Fix | Delete
if (isNaN(window.screenX)) {
[111] Fix | Delete
x=coordinates.x-document.body.scrollLeft+window.screenLeft;
[112] Fix | Delete
y=coordinates.y-document.body.scrollTop+window.screenTop;
[113] Fix | Delete
}
[114] Fix | Delete
else {
[115] Fix | Delete
x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
[116] Fix | Delete
y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
[117] Fix | Delete
}
[118] Fix | Delete
}
[119] Fix | Delete
else if (document.all) {
[120] Fix | Delete
x=coordinates.x-document.body.scrollLeft+window.screenLeft;
[121] Fix | Delete
y=coordinates.y-document.body.scrollTop+window.screenTop;
[122] Fix | Delete
}
[123] Fix | Delete
else if (document.layers) {
[124] Fix | Delete
x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
[125] Fix | Delete
y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
[126] Fix | Delete
}
[127] Fix | Delete
coordinates.x=x;
[128] Fix | Delete
coordinates.y=y;
[129] Fix | Delete
return coordinates;
[130] Fix | Delete
}
[131] Fix | Delete
[132] Fix | Delete
// Functions for IE to get position of an object
[133] Fix | Delete
function AnchorPosition_getPageOffsetLeft (el) {
[134] Fix | Delete
var ol=el.offsetLeft;
[135] Fix | Delete
while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
[136] Fix | Delete
return ol;
[137] Fix | Delete
}
[138] Fix | Delete
function AnchorPosition_getWindowOffsetLeft (el) {
[139] Fix | Delete
return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
[140] Fix | Delete
}
[141] Fix | Delete
function AnchorPosition_getPageOffsetTop (el) {
[142] Fix | Delete
var ot=el.offsetTop;
[143] Fix | Delete
while((el=el.offsetParent) != null) { ot += el.offsetTop; }
[144] Fix | Delete
return ot;
[145] Fix | Delete
}
[146] Fix | Delete
function AnchorPosition_getWindowOffsetTop (el) {
[147] Fix | Delete
return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
[148] Fix | Delete
}
[149] Fix | Delete
[150] Fix | Delete
/* SOURCE FILE: PopupWindow.js */
[151] Fix | Delete
[152] Fix | Delete
/*
[153] Fix | Delete
PopupWindow.js
[154] Fix | Delete
Author: Matt Kruse
[155] Fix | Delete
Last modified: 02/16/04
[156] Fix | Delete
[157] Fix | Delete
DESCRIPTION: This object allows you to easily and quickly popup a window
[158] Fix | Delete
in a certain place. The window can either be a DIV or a separate browser
[159] Fix | Delete
window.
[160] Fix | Delete
[161] Fix | Delete
COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
[162] Fix | Delete
positioning errors - usually with Window positioning - occur on the
[163] Fix | Delete
Macintosh platform. Due to bugs in Netscape 4.x, populating the popup
[164] Fix | Delete
window with <STYLE> tags may cause errors.
[165] Fix | Delete
[166] Fix | Delete
USAGE:
[167] Fix | Delete
// Create an object for a WINDOW popup
[168] Fix | Delete
var win = new PopupWindow();
[169] Fix | Delete
[170] Fix | Delete
// Create an object for a DIV window using the DIV named 'mydiv'
[171] Fix | Delete
var win = new PopupWindow('mydiv');
[172] Fix | Delete
[173] Fix | Delete
// Set the window to automatically hide itself when the user clicks
[174] Fix | Delete
// anywhere else on the page except the popup
[175] Fix | Delete
win.autoHide();
[176] Fix | Delete
[177] Fix | Delete
// Show the window relative to the anchor name passed in
[178] Fix | Delete
win.showPopup(anchorname);
[179] Fix | Delete
[180] Fix | Delete
// Hide the popup
[181] Fix | Delete
win.hidePopup();
[182] Fix | Delete
[183] Fix | Delete
// Set the size of the popup window (only applies to WINDOW popups
[184] Fix | Delete
win.setSize(width,height);
[185] Fix | Delete
[186] Fix | Delete
// Populate the contents of the popup window that will be shown. If you
[187] Fix | Delete
// change the contents while it is displayed, you will need to refresh()
[188] Fix | Delete
win.populate(string);
[189] Fix | Delete
[190] Fix | Delete
// set the URL of the window, rather than populating its contents
[191] Fix | Delete
// manually
[192] Fix | Delete
win.setUrl("http://www.site.com/");
[193] Fix | Delete
[194] Fix | Delete
// Refresh the contents of the popup
[195] Fix | Delete
win.refresh();
[196] Fix | Delete
[197] Fix | Delete
// Specify how many pixels to the right of the anchor the popup will appear
[198] Fix | Delete
win.offsetX = 50;
[199] Fix | Delete
[200] Fix | Delete
// Specify how many pixels below the anchor the popup will appear
[201] Fix | Delete
win.offsetY = 100;
[202] Fix | Delete
[203] Fix | Delete
NOTES:
[204] Fix | Delete
1) Requires the functions in AnchorPosition.js
[205] Fix | Delete
[206] Fix | Delete
2) Your anchor tag MUST contain both NAME and ID attributes which are the
[207] Fix | Delete
same. For example:
[208] Fix | Delete
<A NAME="test" ID="test"> </A>
[209] Fix | Delete
[210] Fix | Delete
3) There must be at least a space between <A> </A> for IE5.5 to see the
[211] Fix | Delete
anchor tag correctly. Do not do <A></A> with no space.
[212] Fix | Delete
[213] Fix | Delete
4) When a PopupWindow object is created, a handler for 'onmouseup' is
[214] Fix | Delete
attached to any event handler you may have already defined. Do NOT define
[215] Fix | Delete
an event handler for 'onmouseup' after you define a PopupWindow object or
[216] Fix | Delete
the autoHide() will not work correctly.
[217] Fix | Delete
*/
[218] Fix | Delete
[219] Fix | Delete
// Set the position of the popup window based on the anchor
[220] Fix | Delete
function PopupWindow_getXYPosition(anchorname) {
[221] Fix | Delete
var coordinates;
[222] Fix | Delete
if (this.type == "WINDOW") {
[223] Fix | Delete
coordinates = getAnchorWindowPosition(anchorname);
[224] Fix | Delete
}
[225] Fix | Delete
else {
[226] Fix | Delete
coordinates = getAnchorPosition(anchorname);
[227] Fix | Delete
}
[228] Fix | Delete
this.x = coordinates.x;
[229] Fix | Delete
this.y = coordinates.y;
[230] Fix | Delete
}
[231] Fix | Delete
// Set width/height of DIV/popup window
[232] Fix | Delete
function PopupWindow_setSize(width,height) {
[233] Fix | Delete
this.width = width;
[234] Fix | Delete
this.height = height;
[235] Fix | Delete
}
[236] Fix | Delete
// Fill the window with contents
[237] Fix | Delete
function PopupWindow_populate(contents) {
[238] Fix | Delete
this.contents = contents;
[239] Fix | Delete
this.populated = false;
[240] Fix | Delete
}
[241] Fix | Delete
// Set the URL to go to
[242] Fix | Delete
function PopupWindow_setUrl(url) {
[243] Fix | Delete
this.url = url;
[244] Fix | Delete
}
[245] Fix | Delete
// Set the window popup properties
[246] Fix | Delete
function PopupWindow_setWindowProperties(props) {
[247] Fix | Delete
this.windowProperties = props;
[248] Fix | Delete
}
[249] Fix | Delete
// Refresh the displayed contents of the popup
[250] Fix | Delete
function PopupWindow_refresh() {
[251] Fix | Delete
if (this.divName != null) {
[252] Fix | Delete
// refresh the DIV object
[253] Fix | Delete
if (this.use_gebi) {
[254] Fix | Delete
document.getElementById(this.divName).innerHTML = this.contents;
[255] Fix | Delete
}
[256] Fix | Delete
else if (this.use_css) {
[257] Fix | Delete
document.all[this.divName].innerHTML = this.contents;
[258] Fix | Delete
}
[259] Fix | Delete
else if (this.use_layers) {
[260] Fix | Delete
var d = document.layers[this.divName];
[261] Fix | Delete
d.document.open();
[262] Fix | Delete
d.document.writeln(this.contents);
[263] Fix | Delete
d.document.close();
[264] Fix | Delete
}
[265] Fix | Delete
}
[266] Fix | Delete
else {
[267] Fix | Delete
if (this.popupWindow != null && !this.popupWindow.closed) {
[268] Fix | Delete
if (this.url!="") {
[269] Fix | Delete
this.popupWindow.location.href=this.url;
[270] Fix | Delete
}
[271] Fix | Delete
else {
[272] Fix | Delete
this.popupWindow.document.open();
[273] Fix | Delete
this.popupWindow.document.writeln(this.contents);
[274] Fix | Delete
this.popupWindow.document.close();
[275] Fix | Delete
}
[276] Fix | Delete
this.popupWindow.focus();
[277] Fix | Delete
}
[278] Fix | Delete
}
[279] Fix | Delete
}
[280] Fix | Delete
// Position and show the popup, relative to an anchor object
[281] Fix | Delete
function PopupWindow_showPopup(anchorname) {
[282] Fix | Delete
this.getXYPosition(anchorname);
[283] Fix | Delete
this.x += this.offsetX;
[284] Fix | Delete
this.y += this.offsetY;
[285] Fix | Delete
if (!this.populated && (this.contents != "")) {
[286] Fix | Delete
this.populated = true;
[287] Fix | Delete
this.refresh();
[288] Fix | Delete
}
[289] Fix | Delete
if (this.divName != null) {
[290] Fix | Delete
// Show the DIV object
[291] Fix | Delete
if (this.use_gebi) {
[292] Fix | Delete
document.getElementById(this.divName).style.left = this.x + "px";
[293] Fix | Delete
document.getElementById(this.divName).style.top = this.y;
[294] Fix | Delete
document.getElementById(this.divName).style.visibility = "visible";
[295] Fix | Delete
}
[296] Fix | Delete
else if (this.use_css) {
[297] Fix | Delete
document.all[this.divName].style.left = this.x;
[298] Fix | Delete
document.all[this.divName].style.top = this.y;
[299] Fix | Delete
document.all[this.divName].style.visibility = "visible";
[300] Fix | Delete
}
[301] Fix | Delete
else if (this.use_layers) {
[302] Fix | Delete
document.layers[this.divName].left = this.x;
[303] Fix | Delete
document.layers[this.divName].top = this.y;
[304] Fix | Delete
document.layers[this.divName].visibility = "visible";
[305] Fix | Delete
}
[306] Fix | Delete
}
[307] Fix | Delete
else {
[308] Fix | Delete
if (this.popupWindow == null || this.popupWindow.closed) {
[309] Fix | Delete
// If the popup window will go off-screen, move it so it doesn't
[310] Fix | Delete
if (this.x<0) { this.x=0; }
[311] Fix | Delete
if (this.y<0) { this.y=0; }
[312] Fix | Delete
if (screen && screen.availHeight) {
[313] Fix | Delete
if ((this.y + this.height) > screen.availHeight) {
[314] Fix | Delete
this.y = screen.availHeight - this.height;
[315] Fix | Delete
}
[316] Fix | Delete
}
[317] Fix | Delete
if (screen && screen.availWidth) {
[318] Fix | Delete
if ((this.x + this.width) > screen.availWidth) {
[319] Fix | Delete
this.x = screen.availWidth - this.width;
[320] Fix | Delete
}
[321] Fix | Delete
}
[322] Fix | Delete
var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled );
[323] Fix | Delete
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+"");
[324] Fix | Delete
}
[325] Fix | Delete
this.refresh();
[326] Fix | Delete
}
[327] Fix | Delete
}
[328] Fix | Delete
// Hide the popup
[329] Fix | Delete
function PopupWindow_hidePopup() {
[330] Fix | Delete
if (this.divName != null) {
[331] Fix | Delete
if (this.use_gebi) {
[332] Fix | Delete
document.getElementById(this.divName).style.visibility = "hidden";
[333] Fix | Delete
}
[334] Fix | Delete
else if (this.use_css) {
[335] Fix | Delete
document.all[this.divName].style.visibility = "hidden";
[336] Fix | Delete
}
[337] Fix | Delete
else if (this.use_layers) {
[338] Fix | Delete
document.layers[this.divName].visibility = "hidden";
[339] Fix | Delete
}
[340] Fix | Delete
}
[341] Fix | Delete
else {
[342] Fix | Delete
if (this.popupWindow && !this.popupWindow.closed) {
[343] Fix | Delete
this.popupWindow.close();
[344] Fix | Delete
this.popupWindow = null;
[345] Fix | Delete
}
[346] Fix | Delete
}
[347] Fix | Delete
}
[348] Fix | Delete
// Pass an event and return whether or not it was the popup DIV that was clicked
[349] Fix | Delete
function PopupWindow_isClicked(e) {
[350] Fix | Delete
if (this.divName != null) {
[351] Fix | Delete
if (this.use_layers) {
[352] Fix | Delete
var clickX = e.pageX;
[353] Fix | Delete
var clickY = e.pageY;
[354] Fix | Delete
var t = document.layers[this.divName];
[355] Fix | Delete
if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
[356] Fix | Delete
return true;
[357] Fix | Delete
}
[358] Fix | Delete
else { return false; }
[359] Fix | Delete
}
[360] Fix | Delete
else if (document.all) { // Need to hard-code this to trap IE for error-handling
[361] Fix | Delete
var t = window.event.srcElement;
[362] Fix | Delete
while (t.parentElement != null) {
[363] Fix | Delete
if (t.id==this.divName) {
[364] Fix | Delete
return true;
[365] Fix | Delete
}
[366] Fix | Delete
t = t.parentElement;
[367] Fix | Delete
}
[368] Fix | Delete
return false;
[369] Fix | Delete
}
[370] Fix | Delete
else if (this.use_gebi && e) {
[371] Fix | Delete
var t = e.originalTarget;
[372] Fix | Delete
while (t.parentNode != null) {
[373] Fix | Delete
if (t.id==this.divName) {
[374] Fix | Delete
return true;
[375] Fix | Delete
}
[376] Fix | Delete
t = t.parentNode;
[377] Fix | Delete
}
[378] Fix | Delete
return false;
[379] Fix | Delete
}
[380] Fix | Delete
return false;
[381] Fix | Delete
}
[382] Fix | Delete
return false;
[383] Fix | Delete
}
[384] Fix | Delete
[385] Fix | Delete
// Check an onMouseDown event to see if we should hide
[386] Fix | Delete
function PopupWindow_hideIfNotClicked(e) {
[387] Fix | Delete
if (this.autoHideEnabled && !this.isClicked(e)) {
[388] Fix | Delete
this.hidePopup();
[389] Fix | Delete
}
[390] Fix | Delete
}
[391] Fix | Delete
// Call this to make the DIV disable automatically when mouse is clicked outside it
[392] Fix | Delete
function PopupWindow_autoHide() {
[393] Fix | Delete
this.autoHideEnabled = true;
[394] Fix | Delete
}
[395] Fix | Delete
// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
[396] Fix | Delete
function PopupWindow_hidePopupWindows(e) {
[397] Fix | Delete
for (var i=0; i<popupWindowObjects.length; i++) {
[398] Fix | Delete
if (popupWindowObjects[i] != null) {
[399] Fix | Delete
var p = popupWindowObjects[i];
[400] Fix | Delete
p.hideIfNotClicked(e);
[401] Fix | Delete
}
[402] Fix | Delete
}
[403] Fix | Delete
}
[404] Fix | Delete
// Run this immediately to attach the event listener
[405] Fix | Delete
function PopupWindow_attachListener() {
[406] Fix | Delete
if (document.layers) {
[407] Fix | Delete
document.captureEvents(Event.MOUSEUP);
[408] Fix | Delete
}
[409] Fix | Delete
window.popupWindowOldEventListener = document.onmouseup;
[410] Fix | Delete
if (window.popupWindowOldEventListener != null) {
[411] Fix | Delete
document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
[412] Fix | Delete
}
[413] Fix | Delete
else {
[414] Fix | Delete
document.onmouseup = PopupWindow_hidePopupWindows;
[415] Fix | Delete
}
[416] Fix | Delete
}
[417] Fix | Delete
// CONSTRUCTOR for the PopupWindow object
[418] Fix | Delete
// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
[419] Fix | Delete
function PopupWindow() {
[420] Fix | Delete
if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
[421] Fix | Delete
if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
[422] Fix | Delete
if (!window.listenerAttached) {
[423] Fix | Delete
window.listenerAttached = true;
[424] Fix | Delete
PopupWindow_attachListener();
[425] Fix | Delete
}
[426] Fix | Delete
this.index = popupWindowIndex++;
[427] Fix | Delete
popupWindowObjects[this.index] = this;
[428] Fix | Delete
this.divName = null;
[429] Fix | Delete
this.popupWindow = null;
[430] Fix | Delete
this.width=0;
[431] Fix | Delete
this.height=0;
[432] Fix | Delete
this.populated = false;
[433] Fix | Delete
this.visible = false;
[434] Fix | Delete
this.autoHideEnabled = false;
[435] Fix | Delete
[436] Fix | Delete
this.contents = "";
[437] Fix | Delete
this.url="";
[438] Fix | Delete
this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
[439] Fix | Delete
if (arguments.length>0) {
[440] Fix | Delete
this.type="DIV";
[441] Fix | Delete
this.divName = arguments[0];
[442] Fix | Delete
}
[443] Fix | Delete
else {
[444] Fix | Delete
this.type="WINDOW";
[445] Fix | Delete
}
[446] Fix | Delete
this.use_gebi = false;
[447] Fix | Delete
this.use_css = false;
[448] Fix | Delete
this.use_layers = false;
[449] Fix | Delete
if (document.getElementById) { this.use_gebi = true; }
[450] Fix | Delete
else if (document.all) { this.use_css = true; }
[451] Fix | Delete
else if (document.layers) { this.use_layers = true; }
[452] Fix | Delete
else { this.type = "WINDOW"; }
[453] Fix | Delete
this.offsetX = 0;
[454] Fix | Delete
this.offsetY = 0;
[455] Fix | Delete
// Method mappings
[456] Fix | Delete
this.getXYPosition = PopupWindow_getXYPosition;
[457] Fix | Delete
this.populate = PopupWindow_populate;
[458] Fix | Delete
this.setUrl = PopupWindow_setUrl;
[459] Fix | Delete
this.setWindowProperties = PopupWindow_setWindowProperties;
[460] Fix | Delete
this.refresh = PopupWindow_refresh;
[461] Fix | Delete
this.showPopup = PopupWindow_showPopup;
[462] Fix | Delete
this.hidePopup = PopupWindow_hidePopup;
[463] Fix | Delete
this.setSize = PopupWindow_setSize;
[464] Fix | Delete
this.isClicked = PopupWindow_isClicked;
[465] Fix | Delete
this.autoHide = PopupWindow_autoHide;
[466] Fix | Delete
this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
[467] Fix | Delete
}
[468] Fix | Delete
[469] Fix | Delete
/* SOURCE FILE: ColorPicker2.js */
[470] Fix | Delete
[471] Fix | Delete
/*
[472] Fix | Delete
Last modified: 02/24/2003
[473] Fix | Delete
[474] Fix | Delete
DESCRIPTION: This widget is used to select a color, in hexadecimal #RRGGBB
[475] Fix | Delete
form. It uses a color "swatch" to display the standard 216-color web-safe
[476] Fix | Delete
palette. The user can then click on a color to select it.
[477] Fix | Delete
[478] Fix | Delete
COMPATABILITY: See notes in AnchorPosition.js and PopupWindow.js.
[479] Fix | Delete
Only the latest DHTML-capable browsers will show the color and hex values
[480] Fix | Delete
at the bottom as your mouse goes over them.
[481] Fix | Delete
[482] Fix | Delete
USAGE:
[483] Fix | Delete
// Create a new ColorPicker object using DHTML popup
[484] Fix | Delete
var cp = new ColorPicker();
[485] Fix | Delete
[486] Fix | Delete
// Create a new ColorPicker object using Window Popup
[487] Fix | Delete
var cp = new ColorPicker('window');
[488] Fix | Delete
[489] Fix | Delete
// Add a link in your page to trigger the popup. For example:
[490] Fix | Delete
<A HREF="#" onClick="cp.show('pick');return false;" NAME="pick" ID="pick">Pick</A>
[491] Fix | Delete
[492] Fix | Delete
// Or use the built-in "select" function to do the dirty work for you:
[493] Fix | Delete
<A HREF="#" onClick="cp.select(document.forms[0].color,'pick');return false;" NAME="pick" ID="pick">Pick</A>
[494] Fix | Delete
[495] Fix | Delete
// If using DHTML popup, write out the required DIV tag near the bottom
[496] Fix | Delete
// of your page.
[497] Fix | Delete
<SCRIPT LANGUAGE="JavaScript">cp.writeDiv()</SCRIPT>
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function