summaryrefslogtreecommitdiffstats
path: root/notFinishedCode/pChart2.1.2/examples/sandbox/includes
diff options
context:
space:
mode:
Diffstat (limited to 'notFinishedCode/pChart2.1.2/examples/sandbox/includes')
-rw-r--r--notFinishedCode/pChart2.1.2/examples/sandbox/includes/arrow.gifbin66 -> 0 bytes
-rw-r--r--notFinishedCode/pChart2.1.2/examples/sandbox/includes/constants.txt61
-rw-r--r--notFinishedCode/pChart2.1.2/examples/sandbox/includes/cross.gifbin83 -> 0 bytes
-rw-r--r--notFinishedCode/pChart2.1.2/examples/sandbox/includes/functions.js656
-rw-r--r--notFinishedCode/pChart2.1.2/examples/sandbox/includes/hs.pngbin2684 -> 0 bytes
-rw-r--r--notFinishedCode/pChart2.1.2/examples/sandbox/includes/hv.pngbin2865 -> 0 bytes
-rw-r--r--notFinishedCode/pChart2.1.2/examples/sandbox/includes/jscolor.js841
-rw-r--r--notFinishedCode/pChart2.1.2/examples/sandbox/includes/rounded_corners_lite.inc.js285
8 files changed, 0 insertions, 1843 deletions
diff --git a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/arrow.gif b/notFinishedCode/pChart2.1.2/examples/sandbox/includes/arrow.gif
deleted file mode 100644
index 246478a..0000000
--- a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/arrow.gif
+++ /dev/null
Binary files differ
diff --git a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/constants.txt b/notFinishedCode/pChart2.1.2/examples/sandbox/includes/constants.txt
deleted file mode 100644
index e1451a2..0000000
--- a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/constants.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-0.12345,VOID
-680001,AXIS_FORMAT_DEFAULT
-680002,AXIS_FORMAT_TIME
-680003,AXIS_FORMAT_DATE
-680004,AXIS_FORMAT_METRIC
-680005,AXIS_FORMAT_CURRENCY
-681001,AXIS_POSITION_LEFT
-681002,AXIS_POSITION_RIGHT
-682001,AXIS_X
-682002,AXIS_Y
-690001,DIRECTION_VERTICAL
-690002,DIRECTION_HORIZONTAL
-690101,SCALE_POS_LEFTRIGHT
-690102,SCALE_POS_TOPBOTTOM
-690201,SCALE_MODE_FLOATING
-690202,SCALE_MODE_START0
-690203,SCALE_MODE_ADDALL
-690204,SCALE_MODE_ADDALL_START0
-690301,SCALE_SKIP_NONE
-690302,SCALE_SKIP_SAME
-690303,SCALE_SKIP_NUMBERS
-690401,TEXT_ALIGN_TOPLEFT
-690402,TEXT_ALIGN_TOPMIDDLE
-690403,TEXT_ALIGN_TOPRIGHT
-690404,TEXT_ALIGN_MIDDLELEFT
-690405,TEXT_ALIGN_MIDDLEMIDDLE
-690406,TEXT_ALIGN_MIDDLERIGHT
-690407,TEXT_ALIGN_BOTTOMLEFT
-690408,TEXT_ALIGN_BOTTOMMIDDLE
-690409,TEXT_ALIGN_BOTTOMRIGHT
-690501,POSITION_TOP
-690502,POSITION_BOTTOM
-690601,LABEL_POS_LEFT
-690602,LABEL_POS_CENTER
-690603,LABEL_POS_RIGHT
-690604,LABEL_POS_TOP
-690605,LABEL_POS_BOTTOM
-690606,LABEL_POS_INSIDE
-690607,LABEL_POS_OUTSIDE
-690701,ORIENTATION_HORIZONTAL
-690702,ORIENTATION_VERTICAL
-690800,LEGEND_NOBORDER
-690801,LEGEND_BOX
-690802,LEGEND_ROUND
-690901,LEGEND_VERTICAL
-690902,LEGEND_HORIZONTAL
-691051,LEGEND_FAMILY_BOX
-691052,LEGEND_FAMILY_CIRCLE
-691053,LEGEND_FAMILY_LINE
-691001,DISPLAY_AUTO
-691002,DISPLAY_MANUAL
-691011,LABELING_ALL
-691012,LABELING_DIFFERENT
-691021,BOUND_MIN
-691022,BOUND_MAX
-691023,BOUND_BOTH
-691031,BOUND_LABEL_POS_TOP
-691032,BOUND_LABEL_POS_BOTTOM
-691033,BOUND_LABEL_POS_AUTO
-691041,CAPTION_LEFT_TOP
-691042,CAPTION_RIGHT_BOTTOM \ No newline at end of file
diff --git a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/cross.gif b/notFinishedCode/pChart2.1.2/examples/sandbox/includes/cross.gif
deleted file mode 100644
index 0ee9c7a..0000000
--- a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/cross.gif
+++ /dev/null
Binary files differ
diff --git a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/functions.js b/notFinishedCode/pChart2.1.2/examples/sandbox/includes/functions.js
deleted file mode 100644
index 5eaf763..0000000
--- a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/functions.js
+++ /dev/null
@@ -1,656 +0,0 @@
- /*
- functions.js - Sandbox JS
-
- Version : 1.1.0
- Made by : Jean-Damien POGOLOTTI
- Last Update : 18/01/11
-
- This file can be distributed under the license you can find at :
-
- http://www.pchart.net/license
-
- You can find the whole class documentation on the pChart web site.
- */
-
- Action = "Render";
-
- function toggleAuto()
- {
- if ( document.getElementById("g_autopos").checked ) { Automatic = true; } else { Automatic = false; }
- }
-
- function doLayout()
- {
- if ( !Automatic ) { return(0); }
-
- g_width = document.getElementById("g_width").value;
- g_height = document.getElementById("g_height").value;
-
- document.getElementById("g_title_x").value = g_width/2;
-
- checkEnabledAxis();
- }
-
- /* Apply curvy corners */
- function applyCorners()
- {
- settings = {tl: { radius: 10 },tr: { radius: 10 },bl: { radius: 10 },br: { radius: 10 },antiAlias: true,autoPad: true,validTags: ["div"]}
- var myBoxObject = new curvyCorners(settings, "roundedCorner");
- myBoxObject.applyCornersToAll();
- }
-
- /* Set or remove the focus */
- function setFocus(Object,Mode)
- {
- if (Mode == true)
- { Object.style.borderColor = "#808080"; }
- else
- { Object.style.borderColor = "#D0D0D0"; }
- }
-
- function highlightDIV(ID)
- {
- if ( ID == CurrentDiv ) { return(0); }
- document.getElementById("menu"+ID).style.backgroundColor = "#F4F4F4";
- }
-
- function clearDIV(ID)
- {
- if ( ID == CurrentDiv ) { return(0); }
- document.getElementById("menu"+ID).style.backgroundColor = "#EAEAEA";
- }
-
- function toggleDIV(ID)
- {
- /* reset the tab styles */
- for (i=1;i<=6;i++)
- { if ( i != ID ) { document.getElementById("menu"+i).style.backgroundColor = "#EAEAEA"; document.getElementById("menu"+i).style.borderColor = "#FEFEFE"; } }
-
- /* hide the curently displayed tab */
- if ( CurrentDiv != ID ) { document.getElementById("tab"+CurrentDiv).style.display = "none"; }
-
- document.getElementById("tab"+ID).style.display = "block";
-
- CurrentDiv = ID;
- document.getElementById("menu"+ID).style.backgroundColor = "#D0D0D0";
- document.getElementById("menu"+ID).style.borderColor = "#B0B0B0";
- }
-
- function render()
- {
- Action = "Render";
- saveToSession();
- }
-
- function code()
- {
- Action = "Code";
- saveToSession();
- }
-
- function saveToSession()
- {
- saveGeneral();
- }
-
- function saveGeneral()
- {
- document.getElementById("result_area").innerHTML = "<img src='graphix/wait.gif' width='24' height='24' alt=''><br/>Saving configuration (General)";
-
- g_width = document.getElementById("g_width").value;
- g_height = document.getElementById("g_height").value;
- g_border = document.getElementById("g_border").checked;
- g_aa = document.getElementById("g_aa").checked;
- g_shadow = document.getElementById("g_shadow").checked;
- g_transparent = document.getElementById("g_transparent").checked;
- g_autopos = document.getElementById("g_autopos").checked;
-
- g_title_enabled = document.getElementById("g_title_enabled").checked;
- g_title = document.getElementById("g_title").value;
- g_title_align = document.getElementById("g_title_align").options[document.getElementById("g_title_align").selectedIndex].value;
- g_title_x = document.getElementById("g_title_x").value;
- g_title_y = document.getElementById("g_title_y").value;
- g_title_color = document.getElementById("g_title_color").value;
- g_title_font = document.getElementById("g_title_font").options[document.getElementById("g_title_font").selectedIndex].value;
- g_title_font_size = document.getElementById("g_title_font_size").value;
- g_title_box = document.getElementById("g_title_box").checked;
-
- g_solid_enabled = document.getElementById("g_solid_enabled").checked;
- g_solid_color = document.getElementById("g_solid_color").value;
- g_solid_dashed = document.getElementById("g_solid_dashed").checked;
-
- g_gradient_enabled = document.getElementById("g_gradient_enabled").checked;
- g_gradient_start = document.getElementById("g_gradient_start").value;
- g_gradient_end = document.getElementById("g_gradient_end").value;
- g_gradient_direction = document.getElementById("g_gradient_direction").options[document.getElementById("g_gradient_direction").selectedIndex].value;
- g_gradient_alpha = document.getElementById("g_gradient_alpha").value;
-
- var reg=new RegExp("(#)", "g");
- g_title_color = g_title_color.replace(reg,"");
- g_solid_color = g_solid_color.replace(reg,"");
- g_gradient_start = g_gradient_start.replace(reg,"");
- g_gradient_end = g_gradient_end.replace(reg,"");
-
- URL = "script/session.php?g_width="+g_width+"&g_height="+g_height+"&g_border="+g_border+"&g_aa="+g_aa+"&g_shadow="+g_shadow+"&g_autopos="+g_autopos
- +"&g_title_enabled="+g_title_enabled+"&g_title="+g_title+"&g_title_align="+g_title_align+"&g_title_x="+g_title_x
- +"&g_title_y="+g_title_y+"&g_title_color="+g_title_color+"&g_title_font="+g_title_font+"&g_title_font_size="+g_title_font_size+"&g_title_box="+g_title_box
- +"&g_solid_enabled="+g_solid_enabled+"&g_solid_color="+g_solid_color+"&g_solid_dashed="+g_solid_dashed
- +"&g_gradient_enabled="+g_gradient_enabled+"&g_gradient_start="+g_gradient_start+"&g_gradient_end="+g_gradient_end
- +"&g_gradient_direction="+g_gradient_direction+"&g_gradient_alpha="+g_gradient_alpha+"&g_transparent="+g_transparent
- +"&Seed="+Math.random(100);
-
- push(URL,1);
- }
-
- function saveData()
- {
- document.getElementById("result_area").innerHTML = "<img src='graphix/wait.gif' width='24' height='24' alt=''><br/>Saving configuration (Data)";
-
- d_serie1_enabled = document.getElementById("d_serie1_enabled").checked;
- d_serie2_enabled = document.getElementById("d_serie2_enabled").checked;
- d_serie3_enabled = document.getElementById("d_serie3_enabled").checked;
- d_absissa_enabled = document.getElementById("d_absissa_enabled").checked;
-
- d_serie1_name = document.getElementById("d_serie1_name").value;
- d_serie2_name = document.getElementById("d_serie2_name").value;
- d_serie3_name = document.getElementById("d_serie3_name").value;
-
- d_serie1_axis = document.getElementById("d_serie1_axis").options[document.getElementById("d_serie1_axis").selectedIndex].value;
- d_serie2_axis = document.getElementById("d_serie2_axis").options[document.getElementById("d_serie2_axis").selectedIndex].value;
- d_serie3_axis = document.getElementById("d_serie3_axis").options[document.getElementById("d_serie3_axis").selectedIndex].value;
-
- data0 = ""; data1 = ""; data2 = ""; absissa = "";
- for(i=0;i<8;i++)
- {
- data0 = data0 + "!" + document.getElementById("d_serie1_data"+i).value;
- data1 = data1 + "!" + document.getElementById("d_serie2_data"+i).value;
- data2 = data2 + "!" + document.getElementById("d_serie3_data"+i).value;
- absissa = absissa + "!" + document.getElementById("d_absissa_data"+i).value;
- }
-
- d_normalize_enabled = document.getElementById("d_normalize_enabled").checked;
-
- d_axis0_name = document.getElementById("d_axis0_name").value;
- d_axis1_name = document.getElementById("d_axis1_name").value;
- d_axis2_name = document.getElementById("d_axis2_name").value;
-
- d_axis0_unit = document.getElementById("d_axis0_unit").value;
- d_axis1_unit = document.getElementById("d_axis1_unit").value;
- d_axis2_unit = document.getElementById("d_axis2_unit").value;
-
- d_axis0_position = document.getElementById("d_axis0_position").options[document.getElementById("d_axis0_position").selectedIndex].value;
- d_axis1_position = document.getElementById("d_axis1_position").options[document.getElementById("d_axis1_position").selectedIndex].value;
- d_axis2_position = document.getElementById("d_axis2_position").options[document.getElementById("d_axis2_position").selectedIndex].value;
-
- d_axis0_format = document.getElementById("d_axis0_format").options[document.getElementById("d_axis0_format").selectedIndex].value;
- d_axis1_format = document.getElementById("d_axis1_format").options[document.getElementById("d_axis1_format").selectedIndex].value;
- d_axis2_format = document.getElementById("d_axis2_format").options[document.getElementById("d_axis2_format").selectedIndex].value;
-
- URL = "script/session.php?d_serie1_enabled="+d_serie1_enabled+"&d_serie2_enabled="+d_serie2_enabled+"&d_serie3_enabled="+d_serie3_enabled
- +"&d_absissa_enabled="+d_absissa_enabled+"&d_serie1_axis="+d_serie1_axis+"&d_serie2_axis="+d_serie2_axis+"&d_serie3_axis="+d_serie3_axis
- +"&data0="+data0+"&data1="+data1+"&data2="+data2+"&absissa="+absissa+"&d_axis0_name="+d_axis0_name+"&d_axis1_name="+d_axis1_name
- +"&d_axis2_name="+d_axis2_name+"&d_axis0_unit="+d_axis0_unit+"&d_axis1_unit="+d_axis1_unit+"&d_axis2_unit="+d_axis2_unit
- +"&d_axis0_position="+d_axis0_position+"&d_axis1_position="+d_axis1_position+"&d_axis2_position="+d_axis2_position
- +"&d_normalize_enabled="+d_normalize_enabled+"&d_serie1_name="+d_serie1_name+"&d_serie2_name="+d_serie2_name+"&d_serie3_name="+d_serie3_name
- +"&d_axis0_format="+d_axis0_format+"&d_axis1_format="+d_axis1_format+"&d_axis2_format="+d_axis2_format;
-
- push(URL,2);
- }
-
- function saveScale()
- {
- document.getElementById("result_area").innerHTML = "<img src='graphix/wait.gif' width='24' height='24' alt=''><br/>Saving configuration (Scale)";
-
- s_x = document.getElementById("s_x").value;
- s_y = document.getElementById("s_y").value;
- s_width = document.getElementById("s_width").value;
- s_height = document.getElementById("s_height").value;
- s_direction = document.getElementById("s_direction").options[document.getElementById("s_direction").selectedIndex].value;
- s_arrows_enabled = document.getElementById("s_arrows_enabled").checked;
- s_mode = document.getElementById("s_mode").options[document.getElementById("s_mode").selectedIndex].value;
- s_cycle_enabled = document.getElementById("s_cycle_enabled").checked;
- s_x_margin = document.getElementById("s_x_margin").value;
- s_y_margin = document.getElementById("s_y_margin").value;
- s_automargin_enabled = document.getElementById("s_automargin_enabled").checked;
- s_font = document.getElementById("s_font").options[document.getElementById("s_font").selectedIndex].value;
- s_font_size = document.getElementById("s_font_size").value;
- s_font_color = document.getElementById("s_font_color").value;
-
- s_x_labeling = document.getElementById("s_x_labeling").options[document.getElementById("s_x_labeling").selectedIndex].value;
- s_x_skip = document.getElementById("s_x_skip").value;
- s_x_label_rotation = document.getElementById("s_x_label_rotation").value;
-
- s_grid_color = document.getElementById("s_grid_color").value;
- s_grid_alpha = document.getElementById("s_grid_alpha").value;
- s_grid_x_enabled = document.getElementById("s_grid_x_enabled").checked;
- s_grid_y_enabled = document.getElementById("s_grid_y_enabled").checked;
-
- s_ticks_color = document.getElementById("s_ticks_color").value;
- s_ticks_alpha = document.getElementById("s_ticks_alpha").value;
- s_subticks_color = document.getElementById("s_subticks_color").value;
- s_subticks_alpha = document.getElementById("s_subticks_alpha").value;
- s_subticks_enabled = document.getElementById("s_subticks_enabled").checked;
-
- URL = "script/session.php?s_x="+s_x+"&s_y="+s_y+"&s_width="+s_width+"&s_height="+s_height+"&s_direction="+s_direction
- +"&s_arrows_enabled="+s_arrows_enabled+"&s_mode="+s_mode+"&s_cycle_enabled="+s_cycle_enabled+"&s_x_margin="+s_x_margin
- +"&s_y_margin="+s_y_margin+"&s_automargin_enabled="+s_automargin_enabled+"&s_x_labeling="+s_x_labeling+"&s_x_skip="+s_x_skip
- +"&s_x_label_rotation="+s_x_label_rotation+"&s_grid_color="+s_grid_color+"&s_grid_alpha="+s_grid_alpha+"&s_grid_x_enabled="+s_grid_x_enabled
- +"&s_grid_y_enabled="+s_grid_y_enabled+"&s_ticks_color="+s_ticks_color+"&s_ticks_alpha="+s_ticks_alpha+"&s_subticks_color="+s_subticks_color
- +"&s_subticks_alpha="+s_subticks_alpha+"&s_subticks_enabled="+s_subticks_enabled+"&s_font="+s_font+"&s_font_size="+s_font_size
- +"&s_font_color="+s_font_color+"&Seed="+Math.random(100);
-
- push(URL,3);
- }
-
- function saveChart()
- {
- document.getElementById("result_area").innerHTML = "<img src='graphix/wait.gif' width='24' height='24' alt=''><br/>Saving configuration (Chart)";
-
- c_family = document.getElementById("c_family").options[document.getElementById("c_family").selectedIndex].value;
- c_display_values = document.getElementById("c_display_values").checked;
- c_break_color = document.getElementById("c_break_color").value;
- c_break = document.getElementById("c_break").checked;
-
- c_plot_size = document.getElementById("c_plot_size").value;
- c_border_size = document.getElementById("c_border_size").value;
- c_border_enabled = document.getElementById("c_border_enabled").checked;
-
- c_bar_classic = document.getElementById("c_bar_classic").checked;
- c_bar_rounded = document.getElementById("c_bar_rounded").checked;
- c_bar_gradient = document.getElementById("c_bar_gradient").checked;
- c_around_zero1 = document.getElementById("c_around_zero1").checked;
-
- c_transparency = document.getElementById("c_transparency").value;
- c_forced_transparency = document.getElementById("c_forced_transparency").checked;
- c_around_zero2 = document.getElementById("c_around_zero2").checked;
-
- URL = "script/session.php?c_family="+c_family+"&c_display_values="+c_display_values+"&c_plot_size="+c_plot_size+"&c_border_size="+c_border_size+"&c_border_enabled="+c_border_enabled
- +"&c_bar_classic="+c_bar_classic+"&c_bar_rounded="+c_bar_rounded+"&c_bar_gradient="+c_bar_gradient+"&c_around_zero1="+c_around_zero1
- +"&c_transparency="+c_transparency+"&c_forced_transparency="+c_forced_transparency+"&c_around_zero2="+c_around_zero2
- +"&c_break="+c_break+"&c_break_color="+c_break_color;
-
- push(URL,4);
- }
-
- function saveLegend()
- {
- document.getElementById("result_area").innerHTML = "<img src='graphix/wait.gif' width='24' height='24' alt=''><br/>Saving configuration (Legend and Thresholds)";
-
- l_enabled = document.getElementById("l_enabled").checked;
-
- l_font = document.getElementById("l_font").options[document.getElementById("l_font").selectedIndex].value;
- l_font_size = document.getElementById("l_font_size").value;
- l_font_color = document.getElementById("l_font_color").value;
-
- l_margin = document.getElementById("l_margin").value;
- l_alpha = document.getElementById("l_alpha").value;
- l_format = document.getElementById("l_format").options[document.getElementById("l_format").selectedIndex].value;
-
- l_orientation = document.getElementById("l_orientation").options[document.getElementById("l_orientation").selectedIndex].value;
- l_box_size = document.getElementById("l_box_size").value;
-
- l_position = document.getElementById("l_position").options[document.getElementById("l_position").selectedIndex].value;
- l_x = document.getElementById("l_x").value;
- l_y = document.getElementById("l_y").value;
-
- l_family = document.getElementById("l_family").options[document.getElementById("l_family").selectedIndex].value;
-
- t_enabled = document.getElementById("t_enabled").checked;
-
- t_value = document.getElementById("t_value").value;
- t_axis0 = document.getElementById("t_axis0").checked;
- t_axis1 = document.getElementById("t_axis1").checked;
- t_axis2 = document.getElementById("t_axis2").checked;
-
- t_color = document.getElementById("t_color").value;
- t_alpha = document.getElementById("t_alpha").value;
- t_ticks = document.getElementById("t_ticks").checked;
-
- t_caption = document.getElementById("t_caption").value;
- t_box = document.getElementById("t_box").checked;
- t_caption_enabled = document.getElementById("t_caption_enabled").checked;
-
- sl_enabled = document.getElementById("sl_enabled").checked;
- sl_shaded = document.getElementById("sl_shaded").checked;
- sl_caption_enabled = document.getElementById("sl_caption_enabled").checked;
- sl_caption_line = document.getElementById("sl_caption_line").checked;
-
- p_template = document.getElementById("p_template").options[document.getElementById("p_template").selectedIndex].value;
-
- if ( t_axis0 ) { t_axis = 0; }
- if ( t_axis1 ) { t_axis = 1; }
- if ( t_axis2 ) { t_axis = 2; }
-
- URL = "script/session.php?l_enabled="+l_enabled+"&l_font="+l_font+"&l_font_size="+l_font_size+"&l_font_color="+l_font_color
- +"&l_margin="+l_margin+"&l_alpha="+l_alpha+"&l_format="+l_format+"&l_orientation="+l_orientation+"&l_box_size="+l_box_size
- +"&t_enabled="+t_enabled+"&t_value="+t_value+"&t_axis="+t_axis+"&t_color="+t_color+"&t_alpha="+t_alpha+"&t_ticks="+t_ticks
- +"&t_caption="+t_caption+"&t_box="+t_box+"&t_caption_enabled="+t_caption_enabled+"&l_position="+l_position+"&l_x="+l_x+"&l_y="+l_y
- +"&p_template="+p_template+"&l_family="+l_family+"&sl_enabled="+sl_enabled+"&sl_shaded="+sl_shaded+"&sl_caption_enabled="+sl_caption_enabled
- +"&sl_caption_line="+sl_caption_line;
-
- push(URL,5);
- }
-
- function randomize()
- {
- for(i=0;i<8;i++)
- {
- document.getElementById("d_serie1_data"+i).value = Math.ceil(Math.random()*100-50);
- document.getElementById("d_serie2_data"+i).value = Math.ceil(Math.random()*100-50);
- document.getElementById("d_serie3_data"+i).value = Math.ceil(Math.random()*100-50);
- }
- }
-
- function setColors()
- {
- applyColor("g_title_color","g_title_color_show");
- applyColor("g_solid_color","g_solid_color_show");
- applyColor("g_gradient_start","g_gradient_start_show");
- applyColor("g_gradient_end","g_gradient_end_show");
- applyColor("s_font_color","s_font_color_show");
- applyColor("s_grid_color","s_grid_color_show");
- applyColor("s_ticks_color","s_ticks_color_show");
- applyColor("s_subticks_color","s_subticks_color_show");
- applyColor("l_font_color","l_font_color_show");
- applyColor("t_color","t_color_show");
- applyColor("c_break_color","c_break_color_show");
- }
-
- function applyColor(SourceID,TargetID)
- {
- color = document.getElementById(SourceID).value;
- color = color.replace("#","");
- document.getElementById(TargetID).style.backgroundColor = "#"+color;
- }
-
- function checkChartSettings()
- {
- ChartFamily = document.getElementById("c_family").options[document.getElementById("c_family").selectedIndex].value;
-
- disableItem("c_plot_size"); disableItem("c_border_size"); disableCheck("c_border_enabled");
- disableRadio("c_bar_classic"); disableRadio("c_bar_rounded"); disableRadio("c_bar_gradient"); disableCheck("c_around_zero1");
- disableItem("c_transparency"); disableCheck("c_forced_transparency"); disableCheck("c_around_zero2");
-
- if ( ChartFamily == "plot" )
- { enableItem("c_plot_size"); enableItem("c_border_size"); enableCheck("c_border_enabled"); checkPlotBorder(); }
-
- if ( ChartFamily == "bar" || ChartFamily == "sbar" )
- { enableRadio("c_bar_classic"); enableRadio("c_bar_rounded"); enableRadio("c_bar_gradient"); enableCheck("c_around_zero1"); }
-
- if ( ChartFamily == "fspline" || ChartFamily == "area" || ChartFamily == "sarea" || ChartFamily == "fstep" )
- { enableItem("c_transparency"); enableCheck("c_forced_transparency"); enableCheck("c_around_zero2"); checkAreaChart(); }
-
- if ( Automatic )
- {
- if ( ChartFamily == "sbar" || ChartFamily == "sarea" )
- document.getElementById("s_mode").value = "SCALE_MODE_ADDALL";
- else
- document.getElementById("s_mode").value = "SCALE_MODE_FLOATING";
- }
- }
-
- function checkLegend()
- {
- l_position = document.getElementById("l_position").options[document.getElementById("l_position").selectedIndex].value;
-
- if ( l_position == "Manual" )
- { enableItem("l_x"); enableItem("l_y"); }
- else
- { disableItem("l_x"); disableItem("l_y"); }
- }
-
- function checkPlotBorder()
- {
- borderEnabled = document.getElementById("c_border_enabled").checked;
- if ( borderEnabled ) { enableItem("c_border_size"); } else { disableItem("c_border_size"); }
- }
-
- function checkAreaChart()
- {
- c_forced_transparency = document.getElementById("c_forced_transparency").checked;
- if ( c_forced_transparency ) { enableItem("c_transparency"); } else { disableItem("c_transparency"); }
- }
-
- function toggleSubTicks()
- {
- if ( !document.getElementById("s_subticks_enabled").checked )
- { disableItem("s_subticks_color"); disableItem("s_subticks_alpha"); }
- else
- { enableItem("s_subticks_color"); enableItem("s_subticks_alpha"); }
- }
-
- function toggleAutoMargins()
- {
- if ( document.getElementById("s_automargin_enabled").checked )
- { disableItem("s_x_margin"); disableItem("s_y_margin"); }
- else
- { enableItem("s_x_margin"); enableItem("s_y_margin"); }
- }
-
- function checkEnabledAxis()
- {
- Serie1Enabled = document.getElementById("d_serie1_enabled").checked;
- Serie2Enabled = document.getElementById("d_serie2_enabled").checked;
- Serie3Enabled = document.getElementById("d_serie3_enabled").checked;
- Serie1Binding = document.getElementById("d_serie1_axis").options[document.getElementById("d_serie1_axis").selectedIndex].value;
- Serie2Binding = document.getElementById("d_serie2_axis").options[document.getElementById("d_serie2_axis").selectedIndex].value;
- Serie3Binding = document.getElementById("d_serie3_axis").options[document.getElementById("d_serie3_axis").selectedIndex].value;
-
- Series = 0;
- if ( Serie1Enabled ) { Series++; }
- if ( Serie2Enabled ) { Series++; }
- if ( Serie3Enabled ) { Series++; }
-
- if ( (Serie1Binding != 0 || !Serie1Enabled) && (Serie2Binding != 0 || !Serie2Enabled) && (Serie3Binding != 0 || !Serie3Enabled) )
- { disableItem("d_axis0_name"); disableItem("d_axis0_unit"); disableItem("d_axis0_position"); disableItem("d_axis0_format"); }
- else
- { enableItem("d_axis0_name"); enableItem("d_axis0_unit"); enableItem("d_axis0_position"); enableItem("d_axis0_format"); }
-
- if ( (Serie1Binding != 1 || !Serie1Enabled) && (Serie2Binding != 1 || !Serie2Enabled) && (Serie3Binding != 1 || !Serie3Enabled) )
- { disableItem("d_axis1_name"); disableItem("d_axis1_unit"); disableItem("d_axis1_position"); disableItem("d_axis1_format"); }
- else
- { enableItem("d_axis1_name"); enableItem("d_axis1_unit"); enableItem("d_axis1_position"); enableItem("d_axis1_format"); }
-
- if ( (Serie1Binding != 2 || !Serie1Enabled) && (Serie2Binding != 2 || !Serie2Enabled) && (Serie3Binding != 2 || !Serie3Enabled) )
- { disableItem("d_axis2_name"); disableItem("d_axis2_unit"); disableItem("d_axis2_position"); disableItem("d_axis2_format"); }
- else
- { enableItem("d_axis2_name"); enableItem("d_axis2_unit"); enableItem("d_axis2_position"); enableItem("d_axis2_format"); }
-
- if ( Automatic )
- {
- sl_enabled = document.getElementById("sl_enabled").checked;
- g_width = document.getElementById("g_width").value;
- g_height = document.getElementById("g_height").value;
- s_direction = document.getElementById("s_direction").options[document.getElementById("s_direction").selectedIndex].value;
-
- leftSeries = 0; rightSeries = 0;
-
- if ( !document.getElementById("d_axis0_position").disabled && document.getElementById("d_axis0_position").options[document.getElementById("d_axis0_position").selectedIndex].value == "left" ) { leftSeries++; }
- if ( !document.getElementById("d_axis0_position").disabled && document.getElementById("d_axis0_position").options[document.getElementById("d_axis0_position").selectedIndex].value == "right" ) { rightSeries++; }
- if ( !document.getElementById("d_axis1_position").disabled && document.getElementById("d_axis1_position").options[document.getElementById("d_axis1_position").selectedIndex].value == "left" ) { leftSeries++; }
- if ( !document.getElementById("d_axis1_position").disabled && document.getElementById("d_axis1_position").options[document.getElementById("d_axis1_position").selectedIndex].value == "right" ) { rightSeries++; }
- if ( !document.getElementById("d_axis2_position").disabled && document.getElementById("d_axis2_position").options[document.getElementById("d_axis2_position").selectedIndex].value == "left" ) { leftSeries++; }
- if ( !document.getElementById("d_axis2_position").disabled && document.getElementById("d_axis2_position").options[document.getElementById("d_axis2_position").selectedIndex].value == "right" ) { rightSeries++; }
-
- if ( s_direction == "SCALE_POS_LEFTRIGHT" )
- {
- if ( leftSeries == 0 ) { leftOffset = 20; } else { leftOffset = 10; }
- if ( rightSeries == 0 ) { rightOffset = 25; } else { rightOffset = 15; }
-
- leftMargin = leftOffset + 40 * leftSeries;
- width = g_width - leftMargin - 40 * rightSeries - rightOffset;
-
- if ( sl_enabled ) { BottomOffset = Series*15; } else { BottomOffset = 0; }
-
- document.getElementById("s_x").value = leftMargin;
- document.getElementById("s_y").value = 50;
- document.getElementById("s_width").value = width;
- document.getElementById("s_height").value = g_height - 50 - 40 - BottomOffset;
- }
- else
- {
- if ( leftSeries == 0 ) { topOffset = 40; } else { topOffset = 40; }
- if ( rightSeries == 0 ) { bottomOffset = 25; } else { bottomOffset = 15; }
-
- topMargin = topOffset + 30 * leftSeries;
- height = g_height - topMargin - 30 * rightSeries - bottomOffset;
-
- if ( sl_enabled ) { RightOffset = Series*15; } else { RightBottomOffset = 0; }
-
- document.getElementById("s_x").value = 70;
- document.getElementById("s_y").value = topMargin;
- document.getElementById("s_width").value = g_width - 70 - 40 - RightOffset;
- document.getElementById("s_height").value = height;
- }
- }
- }
-
- function disableItem(ID)
- {
- document.getElementById(ID).style.backgroundColor = "#E0E0E0";
- document.getElementById(ID).style.color = "#A0A0A0";
- document.getElementById(ID).disabled = true;
- }
-
- function disableCheck(ID)
- {
- document.getElementById(ID).style.color = "#A0A0A0";
- document.getElementById(ID).disabled = true;
- }
-
- function disableRadio(ID)
- {
- document.getElementById(ID).disabled = true;
- }
-
- function enableItem(ID)
- {
- document.getElementById(ID).style.backgroundColor = "#FFFFFF";
- document.getElementById(ID).style.color = "#707070";
- document.getElementById(ID).disabled = false;
- }
-
- function enableCheck(ID)
- {
- document.getElementById(ID).style.color = "#707070";
- document.getElementById(ID).disabled = false;
- }
-
- function enableRadio(ID)
- {
- document.getElementById(ID).disabled = false;
- }
-
- function setDefaultAbsissa()
- {
- document.getElementById("d_absissa_data0").value = "January";
- document.getElementById("d_absissa_data1").value = "February";
- document.getElementById("d_absissa_data2").value = "March";
- document.getElementById("d_absissa_data3").value = "April";
- document.getElementById("d_absissa_data4").value = "May";
- document.getElementById("d_absissa_data5").value = "June";
- document.getElementById("d_absissa_data6").value = "July";
- document.getElementById("d_absissa_data7").value = "August";
- }
-
- function push(URL,nextStep)
- {
- var xmlhttp=false;
- /*@cc_on @*/
- /*@if (@_jscript_version >= 5)
- try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } }
- @end @*/
-
- if (!xmlhttp && typeof XMLHttpRequest!='undefined')
- { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } }
-
- if (!xmlhttp && window.createRequest)
- { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } }
-
- xmlhttp.open("GET", URL,true);
-
- xmlhttp.onreadystatechange=function() {
- if (xmlhttp.readyState==4)
- {
- if ( nextStep == 1 ) { saveData(); }
- if ( nextStep == 2 ) { saveScale(); }
- if ( nextStep == 3 ) { saveChart(); }
- if ( nextStep == 4 ) { saveLegend(); }
- if ( nextStep == 5 )
- {
- if ( Action == "Render" )
- doRender();
- else
- push("script/render.php?Mode=Source&Seed="+Math.random(100),6);
- }
- if ( nextStep == 6 )
- {
- document.getElementById("result_area").innerHTML = "<pre name='code'>"+xmlhttp.responseText+"</pre>";
- }
- }
- }
- xmlhttp.send(null)
- }
-
- function doRender()
- {
- document.getElementById("result_area").innerHTML = "<img src='graphix/wait.gif' width='24' height='24' alt=''><br/>Rendering";
-
- RandomKey = Math.random(100);
- URL = "script/render.php?Seed=" + RandomKey;
-
- StartFade();
- }
-
- function StartFade()
- {
- Loader = new Image();
- Loader.src = URL;
- setTimeout("CheckLoadingStatus()", 200);
- }
-
- function CheckLoadingStatus()
- {
- if ( Loader.complete == true )
- {
- changeOpac(0, "result_area");
- HTMLResult = "<center><img src='" + URL + "' alt=''/></center>";
- document.getElementById("result_area").innerHTML = HTMLResult;
-
- opacity("result_area",0,100,500);
- }
- else
- setTimeout("CheckLoadingStatus()", 200);
- }
-
- function changeOpac(opacity, id)
- {
- var object = document.getElementById(id).style;
- object.opacity = (opacity / 100);
- object.MozOpacity = (opacity / 100);
- object.KhtmlOpacity = (opacity / 100);
- object.filter = "alpha(opacity=" + opacity + ")";
- }
-
- function opacity(id, opacStart, opacEnd, millisec)
- {
- var speed = Math.round(millisec / 100);
- var timer = 0;
-
- if(opacStart > opacEnd)
- {
- for(i = opacStart; i >= opacEnd; i--)
- {
- setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
- timer++;
- }
- }
- else if(opacStart < opacEnd)
- {
- for(i = opacStart; i <= opacEnd; i++)
- {
- setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
- timer++;
- }
- }
- } \ No newline at end of file
diff --git a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/hs.png b/notFinishedCode/pChart2.1.2/examples/sandbox/includes/hs.png
deleted file mode 100644
index 3d94486..0000000
--- a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/hs.png
+++ /dev/null
Binary files differ
diff --git a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/hv.png b/notFinishedCode/pChart2.1.2/examples/sandbox/includes/hv.png
deleted file mode 100644
index 1c5e01f..0000000
--- a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/hv.png
+++ /dev/null
Binary files differ
diff --git a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/jscolor.js b/notFinishedCode/pChart2.1.2/examples/sandbox/includes/jscolor.js
deleted file mode 100644
index c2f5aae..0000000
--- a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/jscolor.js
+++ /dev/null
@@ -1,841 +0,0 @@
-/**
- * jscolor, JavaScript Color Picker
- *
- * @version 1.3.1
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
- * @author Jan Odvarko, http://odvarko.cz
- * @created 2008-06-15
- * @updated 2010-01-23
- * @link http://jscolor.com
- */
-
-
-var jscolor = {
-
-
- dir : '', // location of jscolor directory (leave empty to autodetect)
- bindClass : 'color', // class name
- binding : true, // automatic binding via <input class="...">
- preloading : true, // use image preloading?
-
-
- install : function() {
- jscolor.addEvent(window, 'load', jscolor.init);
- },
-
-
- init : function() {
- if(jscolor.binding) {
- jscolor.bind();
- }
- if(jscolor.preloading) {
- jscolor.preload();
- }
- },
-
-
- getDir : function() {
- if(!jscolor.dir) {
- var detected = jscolor.detectDir();
- jscolor.dir = detected!==false ? detected : 'jscolor/';
- }
- return jscolor.dir;
- },
-
-
- detectDir : function() {
- var base = location.href;
-
- var e = document.getElementsByTagName('base');
- for(var i=0; i<e.length; i+=1) {
- if(e[i].href) { base = e[i].href; }
- }
-
- var e = document.getElementsByTagName('script');
- for(var i=0; i<e.length; i+=1) {
- if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
- var src = new jscolor.URI(e[i].src);
- var srcAbs = src.toAbsolute(base);
- srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
- srcAbs.query = null;
- srcAbs.fragment = null;
- return srcAbs.toString();
- }
- }
- return false;
- },
-
-
- bind : function() {
- var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')\\s*(\\{[^}]*\\})?', 'i');
- var e = document.getElementsByTagName('input');
- for(var i=0; i<e.length; i+=1) {
- var m;
- if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
- var prop = {};
- if(m[3]) {
- try {
- eval('prop='+m[3]);
- } catch(eInvalidProp) {}
- }
- e[i].color = new jscolor.color(e[i], prop);
- }
- }
- },
-
-
- preload : function() {
- for(var fn in jscolor.imgRequire) {
- if(jscolor.imgRequire.hasOwnProperty(fn)) {
- jscolor.loadImage(fn);
- }
- }
- },
-
-
- images : {
- pad : [ 181, 101 ],
- sld : [ 16, 101 ],
- cross : [ 15, 15 ],
- arrow : [ 7, 11 ]
- },
-
-
- imgRequire : {},
- imgLoaded : {},
-
-
- requireImage : function(filename) {
- jscolor.imgRequire[filename] = true;
- },
-
-
- loadImage : function(filename) {
- if(!jscolor.imgLoaded[filename]) {
- jscolor.imgLoaded[filename] = new Image();
- jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
- }
- },
-
-
- fetchElement : function(mixed) {
- return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
- },
-
-
- addEvent : function(el, evnt, func) {
- if(el.addEventListener) {
- el.addEventListener(evnt, func, false);
- } else if(el.attachEvent) {
- el.attachEvent('on'+evnt, func);
- }
- },
-
-
- fireEvent : function(el, evnt) {
- if(!el) {
- return;
- }
- if(document.createEventObject) {
- var ev = document.createEventObject();
- el.fireEvent('on'+evnt, ev);
- } else if(document.createEvent) {
- var ev = document.createEvent('HTMLEvents');
- ev.initEvent(evnt, true, true);
- el.dispatchEvent(ev);
- } else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
- el['on'+evnt]();
- }
- },
-
-
- getElementPos : function(e) {
- var e1=e, e2=e;
- var x=0, y=0;
- if(e1.offsetParent) {
- do {
- x += e1.offsetLeft;
- y += e1.offsetTop;
- } while(e1 = e1.offsetParent);
- }
- while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
- x -= e2.scrollLeft;
- y -= e2.scrollTop;
- }
- return [x, y];
- },
-
-
- getElementSize : function(e) {
- return [e.offsetWidth, e.offsetHeight];
- },
-
-
- getMousePos : function(e) {
- if(!e) { e = window.event; }
- if(typeof e.pageX === 'number') {
- return [e.pageX, e.pageY];
- } else if(typeof e.clientX === 'number') {
- return [
- e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft,
- e.clientY + document.body.scrollTop + document.documentElement.scrollTop
- ];
- }
- },
-
-
- getViewPos : function() {
- if(typeof window.pageYOffset === 'number') {
- return [window.pageXOffset, window.pageYOffset];
- } else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
- return [document.body.scrollLeft, document.body.scrollTop];
- } else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
- return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
- } else {
- return [0, 0];
- }
- },
-
-
- getViewSize : function() {
- if(typeof window.innerWidth === 'number') {
- return [window.innerWidth, window.innerHeight];
- } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
- return [document.body.clientWidth, document.body.clientHeight];
- } else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
- return [document.documentElement.clientWidth, document.documentElement.clientHeight];
- } else {
- return [0, 0];
- }
- },
-
-
- URI : function(uri) { // See RFC3986
-
- this.scheme = null;
- this.authority = null;
- this.path = '';
- this.query = null;
- this.fragment = null;
-
- this.parse = function(uri) {
- var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
- this.scheme = m[3] ? m[2] : null;
- this.authority = m[5] ? m[6] : null;
- this.path = m[7];
- this.query = m[9] ? m[10] : null;
- this.fragment = m[12] ? m[13] : null;
- return this;
- };
-
- this.toString = function() {
- var result = '';
- if(this.scheme !== null) { result = result + this.scheme + ':'; }
- if(this.authority !== null) { result = result + '//' + this.authority; }
- if(this.path !== null) { result = result + this.path; }
- if(this.query !== null) { result = result + '?' + this.query; }
- if(this.fragment !== null) { result = result + '#' + this.fragment; }
- return result;
- };
-
- this.toAbsolute = function(base) {
- var base = new jscolor.URI(base);
- var r = this;
- var t = new jscolor.URI;
-
- if(base.scheme === null) { return false; }
-
- if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
- r.scheme = null;
- }
-
- if(r.scheme !== null) {
- t.scheme = r.scheme;
- t.authority = r.authority;
- t.path = removeDotSegments(r.path);
- t.query = r.query;
- } else {
- if(r.authority !== null) {
- t.authority = r.authority;
- t.path = removeDotSegments(r.path);
- t.query = r.query;
- } else {
- if(r.path === '') { // TODO: == or === ?
- t.path = base.path;
- if(r.query !== null) {
- t.query = r.query;
- } else {
- t.query = base.query;
- }
- } else {
- if(r.path.substr(0,1) === '/') {
- t.path = removeDotSegments(r.path);
- } else {
- if(base.authority !== null && base.path === '') { // TODO: == or === ?
- t.path = '/'+r.path;
- } else {
- t.path = base.path.replace(/[^\/]+$/,'')+r.path;
- }
- t.path = removeDotSegments(t.path);
- }
- t.query = r.query;
- }
- t.authority = base.authority;
- }
- t.scheme = base.scheme;
- }
- t.fragment = r.fragment;
-
- return t;
- };
-
- function removeDotSegments(path) {
- var out = '';
- while(path) {
- if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
- path = path.replace(/^\.+/,'').substr(1);
- } else if(path.substr(0,3)==='/./' || path==='/.') {
- path = '/'+path.substr(3);
- } else if(path.substr(0,4)==='/../' || path==='/..') {
- path = '/'+path.substr(4);
- out = out.replace(/\/?[^\/]*$/, '');
- } else if(path==='.' || path==='..') {
- path = '';
- } else {
- var rm = path.match(/^\/?[^\/]*/)[0];
- path = path.substr(rm.length);
- out = out + rm;
- }
- }
- return out;
- }
-
- if(uri) {
- this.parse(uri);
- }
-
- },
-
-
- /*
- * Usage example:
- * var myColor = new jscolor.color(myInputElement)
- */
-
- color : function(target, prop) {
-
-
- this.required = true; // refuse empty values?
- this.adjust = true; // adjust value to uniform notation?
- this.hash = false; // prefix color with # symbol?
- this.caps = true; // uppercase?
- this.valueElement = target; // value holder
- this.styleElement = target; // where to reflect current color
- this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1
- this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1
-
- this.pickerOnfocus = true; // display picker on focus?
- this.pickerMode = 'HSV'; // HSV | HVS
- this.pickerPosition = 'bottom'; // left | right | top | bottom
- this.pickerFace = 10; // px
- this.pickerFaceColor = 'ThreeDFace'; // CSS color
- this.pickerBorder = 1; // px
- this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
- this.pickerInset = 1; // px
- this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
- this.pickerZIndex = 10000;
-
-
- for(var p in prop) {
- if(prop.hasOwnProperty(p)) {
- this[p] = prop[p];
- }
- }
-
-
- this.hidePicker = function() {
- if(isPickerOwner()) {
- removePicker();
- }
- };
-
-
- this.showPicker = function() {
- if(!isPickerOwner()) {
- var tp = jscolor.getElementPos(target); // target pos
- var ts = jscolor.getElementSize(target); // target size
- var vp = jscolor.getViewPos(); // view pos
- var vs = jscolor.getViewSize(); // view size
- var ps = [ // picker size
- 2*this.pickerBorder + 4*this.pickerInset + 2*this.pickerFace + jscolor.images.pad[0] + 2*jscolor.images.arrow[0] + jscolor.images.sld[0],
- 2*this.pickerBorder + 2*this.pickerInset + 2*this.pickerFace + jscolor.images.pad[1]
- ];
- var a, b, c;
- switch(this.pickerPosition.toLowerCase()) {
- case 'left': a=1; b=0; c=-1; break;
- case 'right':a=1; b=0; c=1; break;
- case 'top': a=0; b=1; c=-1; break;
- default: a=0; b=1; c=1; break;
- }
- var l = (ts[b]+ps[b])/2;
- var pp = [ // picker pos
- -vp[a]+tp[a]+ps[a] > vs[a] ?
- (-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
- tp[a],
- -vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
- (-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
- (tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
- ];
- drawPicker(pp[a], pp[b]);
- }
- };
-
-
- this.importColor = function() {
- if(!valueElement) {
- this.exportColor();
- } else {
- if(!this.adjust) {
- if(!this.fromString(valueElement.value, leaveValue)) {
- styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
- styleElement.style.color = styleElement.jscStyle.color;
- this.exportColor(leaveValue | leaveStyle);
- }
- } else if(!this.required && /^\s*$/.test(valueElement.value)) {
- valueElement.value = '';
- styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
- styleElement.style.color = styleElement.jscStyle.color;
- this.exportColor(leaveValue | leaveStyle);
-
- } else if(this.fromString(valueElement.value)) {
- // OK
- } else {
- this.exportColor();
- }
- }
- };
-
-
- this.exportColor = function(flags) {
- if(!(flags & leaveValue) && valueElement) {
- var value = this.toString();
- if(this.caps) { value = value.toUpperCase(); }
- if(this.hash) { value = '#'+value; }
- valueElement.value = value;
- }
- if(!(flags & leaveStyle) && styleElement) {
-/*
- styleElement.style.backgroundColor = '#'+this.toString();
- styleElement.style.color =
- 0.213 * this.rgb[0] +
- 0.715 * this.rgb[1] +
- 0.072 * this.rgb[2]
- < 0.5 ? '#FFF' : '#000';
-*/
- }
- if(!(flags & leavePad) && isPickerOwner()) {
- redrawPad();
- }
- if(!(flags & leaveSld) && isPickerOwner()) {
- redrawSld();
- }
- };
-
-
- this.fromHSV = function(h, s, v, flags) { // null = don't change
- h<0 && (h=0) || h>6 && (h=6);
- s<0 && (s=0) || s>1 && (s=1);
- v<0 && (v=0) || v>1 && (v=1);
- this.rgb = HSV_RGB(
- h===null ? this.hsv[0] : (this.hsv[0]=h),
- s===null ? this.hsv[1] : (this.hsv[1]=s),
- v===null ? this.hsv[2] : (this.hsv[2]=v)
- );
- this.exportColor(flags);
- };
-
-
- this.fromRGB = function(r, g, b, flags) { // null = don't change
- r<0 && (r=0) || r>1 && (r=1);
- g<0 && (g=0) || g>1 && (g=1);
- b<0 && (b=0) || b>1 && (b=1);
- var hsv = RGB_HSV(
- r===null ? this.rgb[0] : (this.rgb[0]=r),
- g===null ? this.rgb[1] : (this.rgb[1]=g),
- b===null ? this.rgb[2] : (this.rgb[2]=b)
- );
- if(hsv[0] !== null) {
- this.hsv[0] = hsv[0];
- }
- if(hsv[2] !== 0) {
- this.hsv[1] = hsv[1];
- }
- this.hsv[2] = hsv[2];
- this.exportColor(flags);
- };
-
-
- this.fromString = function(hex, flags) {
- var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
- if(!m) {
- return false;
- } else {
- if(m[1].length === 6) { // 6-char notation
- this.fromRGB(
- parseInt(m[1].substr(0,2),16) / 255,
- parseInt(m[1].substr(2,2),16) / 255,
- parseInt(m[1].substr(4,2),16) / 255,
- flags
- );
- } else { // 3-char notation
- this.fromRGB(
- parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
- parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
- parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
- flags
- );
- }
- return true;
- }
- };
-
-
- this.toString = function() {
- return (
- (0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
- (0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
- (0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
- );
- };
-
-
- function RGB_HSV(r, g, b) {
- var n = Math.min(Math.min(r,g),b);
- var v = Math.max(Math.max(r,g),b);
- var m = v - n;
- if(m === 0) { return [ null, 0, v ]; }
- var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
- return [ h===6?0:h, m/v, v ];
- }
-
-
- function HSV_RGB(h, s, v) {
- if(h === null) { return [ v, v, v ]; }
- var i = Math.floor(h);
- var f = i%2 ? h-i : 1-(h-i);
- var m = v * (1 - s);
- var n = v * (1 - s*f);
- switch(i) {
- case 6:
- case 0: return [v,n,m];
- case 1: return [n,v,m];
- case 2: return [m,v,n];
- case 3: return [m,n,v];
- case 4: return [n,m,v];
- case 5: return [v,m,n];
- }
- }
-
-
- function removePicker() {
- delete jscolor.picker.owner;
- document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
- }
-
-
- function drawPicker(x, y) {
- if(!jscolor.picker) {
- jscolor.picker = {
- box : document.createElement('div'),
- boxB : document.createElement('div'),
- pad : document.createElement('div'),
- padB : document.createElement('div'),
- padM : document.createElement('div'),
- sld : document.createElement('div'),
- sldB : document.createElement('div'),
- sldM : document.createElement('div')
- };
- for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
- var seg = document.createElement('div');
- seg.style.height = segSize+'px';
- seg.style.fontSize = '1px';
- seg.style.lineHeight = '0';
- jscolor.picker.sld.appendChild(seg);
- }
- jscolor.picker.sldB.appendChild(jscolor.picker.sld);
- jscolor.picker.box.appendChild(jscolor.picker.sldB);
- jscolor.picker.box.appendChild(jscolor.picker.sldM);
- jscolor.picker.padB.appendChild(jscolor.picker.pad);
- jscolor.picker.box.appendChild(jscolor.picker.padB);
- jscolor.picker.box.appendChild(jscolor.picker.padM);
- jscolor.picker.boxB.appendChild(jscolor.picker.box);
- }
-
- var p = jscolor.picker;
-
- // recompute controls positions
- posPad = [
- x+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset,
- y+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset ];
- posSld = [
- null,
- y+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset ];
-
- // controls interaction
- p.box.onmouseup =
- p.box.onmouseout = function() { target.focus(); };
- p.box.onmousedown = function() { abortBlur=true; };
- p.box.onmousemove = function(e) { holdPad && setPad(e); holdSld && setSld(e); };
- p.padM.onmouseup =
- p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
- p.padM.onmousedown = function(e) { holdPad=true; setPad(e); };
- p.sldM.onmouseup =
- p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
- p.sldM.onmousedown = function(e) { holdSld=true; setSld(e); };
-
- // picker
- p.box.style.width = 4*THIS.pickerInset + 2*THIS.pickerFace + jscolor.images.pad[0] + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] + 'px';
- p.box.style.height = 2*THIS.pickerInset + 2*THIS.pickerFace + jscolor.images.pad[1] + 'px';
-
- // picker border
- p.boxB.style.position = 'absolute';
- p.boxB.style.clear = 'both';
- p.boxB.style.left = x+'px';
- p.boxB.style.top = y+'px';
- p.boxB.style.zIndex = THIS.pickerZIndex;
- p.boxB.style.border = THIS.pickerBorder+'px solid';
- p.boxB.style.borderColor = THIS.pickerBorderColor;
- p.boxB.style.background = THIS.pickerFaceColor;
-
- // pad image
- p.pad.style.width = jscolor.images.pad[0]+'px';
- p.pad.style.height = jscolor.images.pad[1]+'px';
-
- // pad border
- p.padB.style.position = 'absolute';
- p.padB.style.left = THIS.pickerFace+'px';
- p.padB.style.top = THIS.pickerFace+'px';
- p.padB.style.border = THIS.pickerInset+'px solid';
- p.padB.style.borderColor = THIS.pickerInsetColor;
-
- // pad mouse area
- p.padM.style.position = 'absolute';
- p.padM.style.left = '0';
- p.padM.style.top = '0';
- p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
- p.padM.style.height = p.box.style.height;
- p.padM.style.cursor = 'crosshair';
-
- // slider image
- p.sld.style.overflow = 'hidden';
- p.sld.style.width = jscolor.images.sld[0]+'px';
- p.sld.style.height = jscolor.images.sld[1]+'px';
-
- // slider border
- p.sldB.style.position = 'absolute';
- p.sldB.style.right = THIS.pickerFace+'px';
- p.sldB.style.top = THIS.pickerFace+'px';
- p.sldB.style.border = THIS.pickerInset+'px solid';
- p.sldB.style.borderColor = THIS.pickerInsetColor;
-
- // slider mouse area
- p.sldM.style.position = 'absolute';
- p.sldM.style.right = '0';
- p.sldM.style.top = '0';
- p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
- p.sldM.style.height = p.box.style.height;
- try {
- p.sldM.style.cursor = 'pointer';
- } catch(eOldIE) {
- p.sldM.style.cursor = 'hand';
- }
-
- // load images in optimal order
- switch(modeID) {
- case 0: var padImg = 'hs.png'; break;
- case 1: var padImg = 'hv.png'; break;
- }
- p.padM.style.background = "url('"+jscolor.getDir()+"cross.gif') no-repeat";
- p.sldM.style.background = "url('"+jscolor.getDir()+"arrow.gif') no-repeat";
- p.pad.style.background = "url('"+jscolor.getDir()+padImg+"') 0 0 no-repeat";
-
- // place pointers
- redrawPad();
- redrawSld();
-
- jscolor.picker.owner = THIS;
- document.getElementsByTagName('body')[0].appendChild(p.boxB);
- }
-
-
- function redrawPad() {
- // redraw the pad pointer
- switch(modeID) {
- case 0: var yComponent = 1; break;
- case 1: var yComponent = 2; break;
- }
- var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
- var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
- jscolor.picker.padM.style.backgroundPosition =
- (THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
- (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
-
- // redraw the slider image
- var seg = jscolor.picker.sld.childNodes;
-
- switch(modeID) {
- case 0:
- var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
- for(var i=0; i<seg.length; i+=1) {
- seg[i].style.backgroundColor = 'rgb('+
- (rgb[0]*(1-i/seg.length)*100)+'%,'+
- (rgb[1]*(1-i/seg.length)*100)+'%,'+
- (rgb[2]*(1-i/seg.length)*100)+'%)';
- }
- break;
- case 1:
- var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
- var i = Math.floor(THIS.hsv[0]);
- var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
- switch(i) {
- case 6:
- case 0: rgb=[0,1,2]; break;
- case 1: rgb=[1,0,2]; break;
- case 2: rgb=[2,0,1]; break;
- case 3: rgb=[2,1,0]; break;
- case 4: rgb=[1,2,0]; break;
- case 5: rgb=[0,2,1]; break;
- }
- for(var i=0; i<seg.length; i+=1) {
- s = 1 - 1/(seg.length-1)*i;
- c[1] = c[0] * (1 - s*f);
- c[2] = c[0] * (1 - s);
- seg[i].style.backgroundColor = 'rgb('+
- (c[rgb[0]]*100)+'%,'+
- (c[rgb[1]]*100)+'%,'+
- (c[rgb[2]]*100)+'%)';
- }
- break;
- }
- }
-
-
- function redrawSld() {
- // redraw the slider pointer
- switch(modeID) {
- case 0: var yComponent = 2; break;
- case 1: var yComponent = 1; break;
- }
- var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
- jscolor.picker.sldM.style.backgroundPosition =
- '0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
- }
-
-
- function isPickerOwner() {
- return jscolor.picker && jscolor.picker.owner === THIS;
- }
-
-
- function blurTarget() {
- if(valueElement === target) {
- THIS.importColor();
- }
- if(THIS.pickerOnfocus) {
- THIS.hidePicker();
- }
- }
-
-
- function blurValue() {
- if(valueElement !== target) {
- THIS.importColor();
- }
- }
-
-
- function setPad(e) {
- var posM = jscolor.getMousePos(e);
- var x = posM[0]-posPad[0];
- var y = posM[1]-posPad[1];
- switch(modeID) {
- case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
- case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
- }
- }
-
-
- function setSld(e) {
- var posM = jscolor.getMousePos(e);
- var y = posM[1]-posPad[1];
- switch(modeID) {
- case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
- case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
- }
- }
-
-
- var THIS = this;
- var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
- var abortBlur = false;
- var
- valueElement = jscolor.fetchElement(this.valueElement),
- styleElement = jscolor.fetchElement(this.styleElement);
- var
- holdPad = false,
- holdSld = false;
- var
- posPad,
- posSld;
- var
- leaveValue = 1<<0,
- leaveStyle = 1<<1,
- leavePad = 1<<2,
- leaveSld = 1<<3;
-
- // target
- jscolor.addEvent(target, 'focus', function() {
- if(THIS.pickerOnfocus) { THIS.showPicker(); }
- });
- jscolor.addEvent(target, 'blur', function() {
- if(!abortBlur) {
- window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
- } else {
- abortBlur = false;
- }
- });
-
- // valueElement
- if(valueElement) {
- var updateField = function() {
- THIS.fromString(valueElement.value, leaveValue);
- };
- jscolor.addEvent(valueElement, 'keyup', updateField);
- jscolor.addEvent(valueElement, 'input', updateField);
- jscolor.addEvent(valueElement, 'blur', blurValue);
- valueElement.setAttribute('autocomplete', 'off');
- }
-
- // styleElement
- if(styleElement) {
- styleElement.jscStyle = {
- backgroundColor : styleElement.style.backgroundColor,
- color : styleElement.style.color
- };
- }
-
- // require images
- switch(modeID) {
- case 0: jscolor.requireImage('hs.png'); break;
- case 1: jscolor.requireImage('hv.png'); break;
- }
- jscolor.requireImage('cross.gif');
- jscolor.requireImage('arrow.gif');
-
- this.importColor();
- }
-
-};
-
-
-jscolor.install();
diff --git a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/rounded_corners_lite.inc.js b/notFinishedCode/pChart2.1.2/examples/sandbox/includes/rounded_corners_lite.inc.js
deleted file mode 100644
index afc3ea3..0000000
--- a/notFinishedCode/pChart2.1.2/examples/sandbox/includes/rounded_corners_lite.inc.js
+++ /dev/null
@@ -1,285 +0,0 @@
-
- /****************************************************************
- * *
- * curvyCorners *
- * ------------ *
- * *
- * This script generates rounded corners for your divs. *
- * *
- * Version 1.2.9 *
- * Copyright (c) 2006 Cameron Cooke *
- * By: Cameron Cooke and Tim Hutchison. *
- * *
- * *
- * Website: http://www.curvycorners.net *
- * Email: info@totalinfinity.com *
- * Forum: http://www.curvycorners.net/forum/ *
- * *
- * *
- * This library is free software; you can redistribute *
- * it and/or modify it under the terms of the GNU *
- * Lesser General Public License as published by the *
- * Free Software Foundation; either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * This library is distributed in the hope that it will *
- * be useful, but WITHOUT ANY WARRANTY; without even the *
- * implied warranty of MERCHANTABILITY or FITNESS FOR A *
- * PARTICULAR PURPOSE. See the GNU Lesser General Public *
- * License for more details. *
- * *
- * You should have received a copy of the GNU Lesser *
- * General Public License along with this library; *
- * Inc., 59 Temple Place, Suite 330, Boston, *
- * MA 02111-1307 USA *
- * *
- ****************************************************************/
-
-var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; function curvyCorners()
-{ if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object."); if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name."); if(typeof(arguments[1]) == "string")
-{ var startIndex = 0; var boxCol = getElementsByClass(arguments[1]);}
-else
-{ var startIndex = 1; var boxCol = arguments;}
-var curvyCornersCol = new Array(); if(arguments[0].validTags)
-var validElements = arguments[0].validTags; else
-var validElements = ["div"]; for(var i = startIndex, j = boxCol.length; i < j; i++)
-{ var currentTag = boxCol[i].tagName.toLowerCase(); if(inArray(validElements, currentTag) !== false)
-{ curvyCornersCol[curvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]);}
-}
-this.objects = curvyCornersCol; this.applyCornersToAll = function()
-{ for(var x = 0, k = this.objects.length; x < k; x++)
-{ this.objects[x].applyCorners();}
-}
-}
-function curvyObject()
-{ this.box = arguments[1]; this.settings = arguments[0]; this.topContainer = null; this.bottomContainer = null; this.masterCorners = new Array(); this.contentDIV = null; var boxHeight = get_style(this.box, "height", "height"); var boxWidth = get_style(this.box, "width", "width"); var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width"); var borderColour = get_style(this.box, "borderTopColor", "border-top-color"); var boxColour = get_style(this.box, "backgroundColor", "background-color"); var backgroundImage = get_style(this.box, "backgroundImage", "background-image"); var boxPosition = get_style(this.box, "position", "position"); var boxPadding = get_style(this.box, "paddingTop", "padding-top"); this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); this.boxColour = format_colour(boxColour); this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0)); this.borderColour = format_colour(borderColour); this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; this.backgroundImage = ((backgroundImage != "none")? backgroundImage : ""); this.boxContent = this.box.innerHTML; if(boxPosition != "absolute") this.box.style.position = "relative"; this.box.style.padding = "0px"; if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%"; if(this.settings.autoPad == true && this.boxPadding > 0)
-this.box.innerHTML = ""; this.applyCorners = function()
-{ for(var t = 0; t < 2; t++)
-{ switch(t)
-{ case 0:
-if(this.settings.tl || this.settings.tr)
-{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); newMainContainer.style.height = topMaxRadius + "px"; newMainContainer.style.top = 0 - topMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.topContainer = this.box.appendChild(newMainContainer);}
-break; case 1:
-if(this.settings.bl || this.settings.br)
-{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); newMainContainer.style.height = botMaxRadius + "px"; newMainContainer.style.bottom = 0 - botMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.bottomContainer = this.box.appendChild(newMainContainer);}
-break;}
-}
-if(this.topContainer) this.box.style.borderTopWidth = "0px"; if(this.bottomContainer) this.box.style.borderBottomWidth = "0px"; var corners = ["tr", "tl", "br", "bl"]; for(var i in corners)
-{ if(i > -1 < 4)
-{ var cc = corners[i]; if(!this.settings[cc])
-{ if(((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null))
-{ var newCorner = document.createElement("DIV"); newCorner.style.position = "relative"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; if(this.backgroundImage == "")
-newCorner.style.backgroundColor = this.boxColour; else
-newCorner.style.backgroundImage = this.backgroundImage; switch(cc)
-{ case "tl":
-newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.left = -this.borderWidth + "px"; break; case "tr":
-newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; newCorner.style.left = this.borderWidth + "px"; break; case "bl":
-newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = -this.borderWidth + "px"; newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break; case "br":
-newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = this.borderWidth + "px"
-newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break;}
-}
-}
-else
-{ if(this.masterCorners[this.settings[cc].radius])
-{ var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true);}
-else
-{ var newCorner = document.createElement("DIV"); newCorner.style.height = this.settings[cc].radius + "px"; newCorner.style.width = this.settings[cc].radius + "px"; newCorner.style.position = "absolute"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++)
-{ if((intx +1) >= borderRadius)
-var y1 = -1; else
-var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1); if(borderRadius != j)
-{ if((intx) >= borderRadius)
-var y2 = -1; else
-var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2))); if((intx+1) >= j)
-var y3 = -1; else
-var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1);}
-if((intx) >= j)
-var y4 = -1; else
-var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2))); if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius); if(borderRadius != j)
-{ for(var inty = (y1 + 1); inty < y2; inty++)
-{ if(this.settings.antiAlias)
-{ if(this.backgroundImage != "")
-{ var borderFract = (pixelFraction(intx, inty, borderRadius) * 100); if(borderFract < 30)
-{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius);}
-else
-{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius);}
-}
-else
-{ var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius)); this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, cc);}
-}
-}
-if(this.settings.antiAlias)
-{ if(y3 >= y2)
-{ if (y2 == -1) y2 = 0; this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0);}
-}
-else
-{ if(y3 >= y1)
-{ this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0);}
-}
-var outsideColour = this.borderColour;}
-else
-{ var outsideColour = this.boxColour; var y3 = y1;}
-if(this.settings.antiAlias)
-{ for(var inty = (y3 + 1); inty < y4; inty++)
-{ this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius);}
-}
-}
-this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true);}
-if(cc != "br")
-{ for(var t = 0, k = newCorner.childNodes.length; t < k; t++)
-{ var pixelBar = newCorner.childNodes[t]; var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); if(cc == "tl" || cc == "bl"){ pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px";}
-if(cc == "tr" || cc == "tl"){ pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px";}
-switch(cc)
-{ case "tr":
-pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "tl":
-pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "bl":
-pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px"; break;}
-}
-}
-}
-if(newCorner)
-{ switch(cc)
-{ case "tl":
-if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "tr":
-if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "bl":
-if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break; case "br":
-if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break;}
-}
-}
-}
-var radiusDiff = new Array(); radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius)
-radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius); for(z in radiusDiff)
-{ if(z == "t" || z == "b")
-{ if(radiusDiff[z])
-{ var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r"); var newFiller = document.createElement("DIV"); newFiller.style.height = radiusDiff[z] + "px"; newFiller.style.width = this.settings[smallerCornerType].radius+ "px"
-newFiller.style.position = "absolute"; newFiller.style.fontSize = "1px"; newFiller.style.overflow = "hidden"; newFiller.style.backgroundColor = this.boxColour; switch(smallerCornerType)
-{ case "tl":
-newFiller.style.bottom = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.topContainer.appendChild(newFiller); break; case "tr":
-newFiller.style.bottom = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.topContainer.appendChild(newFiller); break; case "bl":
-newFiller.style.top = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.bottomContainer.appendChild(newFiller); break; case "br":
-newFiller.style.top = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.bottomContainer.appendChild(newFiller); break;}
-}
-var newFillerBar = document.createElement("DIV"); newFillerBar.style.position = "relative"; newFillerBar.style.fontSize = "1px"; newFillerBar.style.overflow = "hidden"; newFillerBar.style.backgroundColor = this.boxColour; newFillerBar.style.backgroundImage = this.backgroundImage; switch(z)
-{ case "t":
-if(this.topContainer)
-{ if(this.settings.tl.radius && this.settings.tr.radius)
-{ newFillerBar.style.height = topMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; newFillerBar.style.borderTop = this.borderString; if(this.backgroundImage != "")
-newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; this.topContainer.appendChild(newFillerBar);}
-this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px";}
-break; case "b":
-if(this.bottomContainer)
-{ if(this.settings.bl.radius && this.settings.br.radius)
-{ newFillerBar.style.height = botMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; newFillerBar.style.borderBottom = this.borderString; if(this.backgroundImage != "")
-newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px"; this.bottomContainer.appendChild(newFillerBar);}
-}
-break;}
-}
-}
-if(this.settings.autoPad == true && this.boxPadding > 0)
-{ var contentContainer = document.createElement("DIV"); contentContainer.style.position = "relative"; contentContainer.innerHTML = this.boxContent; contentContainer.className = "autoPadDiv"; var topPadding = Math.abs(topMaxRadius - this.boxPadding); var botPadding = Math.abs(botMaxRadius - this.boxPadding); if(topMaxRadius < this.boxPadding)
-contentContainer.style.paddingTop = topPadding + "px"; if(botMaxRadius < this.boxPadding)
-contentContainer.style.paddingBottom = botMaxRadius + "px"; contentContainer.style.paddingLeft = this.boxPadding + "px"; contentContainer.style.paddingRight = this.boxPadding + "px"; this.contentDIV = this.box.appendChild(contentContainer);}
-}
-this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius)
-{ var pixel = document.createElement("DIV"); pixel.style.height = height + "px"; pixel.style.width = "1px"; pixel.style.position = "absolute"; pixel.style.fontSize = "1px"; pixel.style.overflow = "hidden"; var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius); if(image == -1 && this.backgroundImage != "")
-{ pixel.style.backgroundImage = this.backgroundImage; pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px";}
-else
-{ pixel.style.backgroundColor = colour;}
-if (transAmount != 100)
-setOpacity(pixel, transAmount); pixel.style.top = inty + "px"; pixel.style.left = intx + "px"; newCorner.appendChild(pixel);}
-}
-function insertAfter(parent, node, referenceNode)
-{ parent.insertBefore(node, referenceNode.nextSibling);}
-function BlendColour(Col1, Col2, Col1Fraction)
-{ var red1 = parseInt(Col1.substr(1,2),16); var green1 = parseInt(Col1.substr(3,2),16); var blue1 = parseInt(Col1.substr(5,2),16); var red2 = parseInt(Col2.substr(1,2),16); var green2 = parseInt(Col2.substr(3,2),16); var blue2 = parseInt(Col2.substr(5,2),16); if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1; var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction))); if(endRed > 255) endRed = 255; if(endRed < 0) endRed = 0; var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction))); if(endGreen > 255) endGreen = 255; if(endGreen < 0) endGreen = 0; var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction))); if(endBlue > 255) endBlue = 255; if(endBlue < 0) endBlue = 0; return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue);}
-function IntToHex(strNum)
-{ base = strNum / 16; rem = strNum % 16; base = base - (rem / 16); baseS = MakeHex(base); remS = MakeHex(rem); return baseS + '' + remS;}
-function MakeHex(x)
-{ if((x >= 0) && (x <= 9))
-{ return x;}
-else
-{ switch(x)
-{ case 10: return "A"; case 11: return "B"; case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";}
-}
-}
-function pixelFraction(x, y, r)
-{ var pixelfraction = 0; var xvalues = new Array(1); var yvalues = new Array(1); var point = 0; var whatsides = ""; var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2))); if ((intersect >= y) && (intersect < (y+1)))
-{ whatsides = "Left"; xvalues[point] = 0; yvalues[point] = intersect - y; point = point + 1;}
-var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2))); if ((intersect >= x) && (intersect < (x+1)))
-{ whatsides = whatsides + "Top"; xvalues[point] = intersect - x; yvalues[point] = 1; point = point + 1;}
-var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2))); if ((intersect >= y) && (intersect < (y+1)))
-{ whatsides = whatsides + "Right"; xvalues[point] = 1; yvalues[point] = intersect - y; point = point + 1;}
-var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2))); if ((intersect >= x) && (intersect < (x+1)))
-{ whatsides = whatsides + "Bottom"; xvalues[point] = intersect - x; yvalues[point] = 0;}
-switch (whatsides)
-{ case "LeftRight":
-pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2); break; case "TopRight":
-pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2); break; case "TopBottom":
-pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2); break; case "LeftBottom":
-pixelfraction = (yvalues[0]*xvalues[1])/2; break; default:
-pixelfraction = 1;}
-return pixelfraction;}
-function rgb2Hex(rgbColour)
-{ try{ var rgbArray = rgb2Array(rgbColour); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue);}
-catch(e){ alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");}
-return hexColour;}
-function rgb2Array(rgbColour)
-{ var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")")); var rgbArray = rgbValues.split(", "); return rgbArray;}
-function setOpacity(obj, opacity)
-{ opacity = (opacity == 100)?99.999:opacity; if(isSafari && obj.tagName != "IFRAME")
-{ var rgbArray = rgb2Array(obj.style.backgroundColor); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")";}
-else if(typeof(obj.style.opacity) != "undefined")
-{ obj.style.opacity = opacity/100;}
-else if(typeof(obj.style.MozOpacity) != "undefined")
-{ obj.style.MozOpacity = opacity/100;}
-else if(typeof(obj.style.filter) != "undefined")
-{ obj.style.filter = "alpha(opacity:" + opacity + ")";}
-else if(typeof(obj.style.KHTMLOpacity) != "undefined")
-{ obj.style.KHTMLOpacity = opacity/100;}
-}
-function inArray(array, value)
-{ for(var i = 0; i < array.length; i++){ if (array[i] === value) return i;}
-return false;}
-function inArrayKey(array, value)
-{ for(key in array){ if(key === value) return true;}
-return false;}
-function addEvent(elm, evType, fn, useCapture) { if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true;}
-else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r;}
-else { elm['on' + evType] = fn;}
-}
-function removeEvent(obj, evType, fn, useCapture){ if (obj.removeEventListener){ obj.removeEventListener(evType, fn, useCapture); return true;} else if (obj.detachEvent){ var r = obj.detachEvent("on"+evType, fn); return r;} else { alert("Handler could not be removed");}
-}
-function format_colour(colour)
-{ var returnColour = "#ffffff"; if(colour != "" && colour != "transparent")
-{ if(colour.substr(0, 3) == "rgb")
-{ returnColour = rgb2Hex(colour);}
-else if(colour.length == 4)
-{ returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4);}
-else
-{ returnColour = colour;}
-}
-return returnColour;}
-function get_style(obj, property, propertyNS)
-{ try
-{ if(obj.currentStyle)
-{ var returnVal = eval("obj.currentStyle." + property);}
-else
-{ if(isSafari && obj.style.display == "none")
-{ obj.style.display = ""; var wasHidden = true;}
-var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS); if(isSafari && wasHidden)
-{ obj.style.display = "none";}
-}
-}
-catch(e)
-{ }
-return returnVal;}
-function getElementsByClass(searchClass, node, tag)
-{ var classElements = new Array(); if(node == null)
-node = document; if(tag == null)
-tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)"); for (i = 0, j = 0; i < elsLen; i++)
-{ if(pattern.test(els[i].className))
-{ classElements[j] = els[i]; j++;}
-}
-return classElements;}
-function newCurvyError(errorMessage)
-{ return new Error("curvyCorners Error:\n" + errorMessage)
-}