Index: tensions/gally/gally-cuise/js/crossbrowser.js
===================================================================
--- /extensions/gally/gally-cuise/js/crossbrowser.js	(revision 19131)
+++ 	(revision )
@@ -1,1171 +1,0 @@
-; (function (jQuery) {
-			 
- if (!document.namespaces.v) { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); }
-    var mode = document.documentMode || 0;
-    var noBottomFold = jQuery.browser.msie && ((jQuery.browser.version < 8 && !mode) || mode < 8);
-    var init = false;
-    var angle = 0;
-    var strokeWeight =0;
-
-//=======================================================================================
-//Filter: Alpha(Opacity=100, FinishOpacity=0, Style=2, StartX=20, StartY=40, FinishX=0, FinishY=0);
-//filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20)"
-function opacity(obj) {
-        alpha_css=jQuery(obj).css("opacity");
-        fils=     $(obj).children() ;
-        if (fils.length>1) { 
-                jQuery( fils).css("opacity",alpha_css);
-            }
-}
-     //======================================================================================
-function transform(obj) {
-     if (!obj) return ;
-         if (typeof obj == "string") var s = document.getElementById(obj).style;
-         else var s = obj.style;
-        
-         if (typeof s.transform != "undefined") {
-             var angle1 = s.transform.split("rotate(");
-             angle1 = angle1[1].split("deg)");
-             angle = angle1[0];
-         }
-         //==================================================================================   
-         var deg2radians = Math.PI * 2 / 360;
-         var rad = angle * deg2radians;
-         var costheta = Math.cos(rad);
-         var sintheta = Math.sin(rad);
-
-         if (!obj.style.filter.match("progid:DXImageTransform.Microsoft.Matrix")) obj.style.filter += "  progid:DXImageTransform.Microsoft.Matrix() ";
-
-
-         centered = true;
-         try{
-         obj.filters.item("DXImageTransform.Microsoft.Matrix").M11 = costheta;
-         obj.filters.item("DXImageTransform.Microsoft.Matrix").M12 = -sintheta;
-         obj.filters.item("DXImageTransform.Microsoft.Matrix").M21 = sintheta;
-         obj.filters.item("DXImageTransform.Microsoft.Matrix").M22 = costheta;
-         obj.filters.item("DXImageTransform.Microsoft.Matrix").sizingMethod = 'auto expand'; //'clip to original' ; //
-         }  catch (_) { 
-         centered = true;
-         }
-
-  height = obj.clientHeight;
-  width = obj.clientWidth;
-  xleft= obj.offsetLeft;
-  ytop= obj.offsetTop;     
-  ntop = ((height - obj.offsetHeight) / 2);
-  nleft = ((width - obj.offsetWidth) / 2); 
-
-
-    if (obj.vml) {
-          if (!init) {
-            jQuery(obj).css("position", "absolute");
-          pos_img=jQuery(obj).findPos();
-           pos_vml=jQuery(obj.vml).findPos();
-                  nleft=-strokeWeight;
-                  ntop =-strokeWeight;
-
-                   var mode = document.documentMode || 0;
-                  if (getStyles(obj).position!="absolute"){
-
-                    init_x0=init_x - (0.5*strokeWeight) ;
-                   if (mode==8) init_y0=init_y + (0.5*strokeWeight) ;
-                   else init_y0=init_y + (1.5*strokeWeight) ;
-                    init_y=strokeWeight;
-                    init_x=strokeWeight;
-
-
-                  }else{
-                   init_y=parseInt(pos_img.x)+strokeWeight;
-                   init_x=parseInt(pos_img.y)+strokeWeight;
-                   init_x0=init_x+(0.5*strokeWeight);
-                    init_y0=init_y+(0.5*strokeWeight);
-
-                  }
-
-                   jQuery(obj).css("position", "absolute");
-                  init=true;
-                   
-                 }
-
-                        x = init_x+  nleft ;
-                        y = init_y+  ntop ;
-
-
-                 jQuery(obj).css("left",  x +  "px");
-                 jQuery(obj).css("top",  y +  "px");
- 
-                 jQuery(obj.vml).css("left",   init_x0 +  nleft+  "px");
-                 jQuery(obj.vml).css("top",  init_y0 +  ntop+  "px");
-       
-
-                 transform(obj.vml);
-                       
-                } 
-var name_id=obj.id ;  
- jQuery(obj).css("opacity",alpha);
- if (alpha!=1) {
-     opacity(obj);
- 
- }
- 
-          return ;
-
- 
-    
-
-
-
-
-     
-
-     }
-//===========================================
-function onPropertyChange(e) {
-         var el = e.srcElement;
-
-         switch (e.propertyName) {
-            case "opacity":
-                 opacity(el);
-
-                 break;
-             case "style.transform":
-             // init=false;
-                 transform(el);
-
-                 break;
-             case "style.textShadow":
-
-                 var text_shadow = el.style.textShadow;
-                 var sizeShadow = text_shadow.split(" ");
-                 aff_filter(el, sizeShadow);
-                 break;
-             case "style.color":
-                 new_color = translateColor(el.style.color);
-                 el.style.color = new_color;
-                 break;
-             case 'width':
-
-                 el.style.width = el.attributes.width.nodeValue + 'px';
-                 // In IE8 this does not trigger onresize. 
-                 el.firstChild.style.width = el.clientWidth + 'px';
-                 break;
-             case 'height':
-
-                 el.style.height = el.attributes.height.nodeValue + 'px';
-                 el.firstChild.style.height = el.clientHeight + 'px';
-                 break;
-         }
-     }
-//==================================================
-function findSize(obj) {
-         var cur_height = obj.offsetHeight;
-         var cur_width = obj.offsetWidth;
-
-      
-
-         return ({
-             'x': cur_width,
-             'y': cur_height
-         });
-     }
-//==================================================
-function roundWebkit(e, s) {
-    var radius = '' + s.sizex + 'px ' + s.sizey + 'px';
-    var $e = jQuery(e);
-    if (s.tl) $e.css('WebkitBorderTopLeftRadius', radius);
-    if (s.tr) $e.css('WebkitBorderTopRightRadius', radius);
-    if (s.bl) $e.css('WebkitBorderBottomLeftRadius', radius);
-    if (s.br) $e.css('WebkitBorderBottomRightRadius', radius);
-  }
-//==================================================  
-  function roundMozilla(e, s)
-  {  
-    var radius = '' + s.sizex + 'px';
-    var $e = jQuery(e);
-    if (s.tl) $e.css('-moz-border-radius-topleft', radius);
-    if (s.tr) $e.css('-moz-border-radius-topright', radius);
-    if (s.bl) $e.css('-moz-border-radius-bottomleft', radius);
-    if (s.br) $e.css('-moz-border-radius-bottomright', radius);  
-  }
-  //==================================================  
-  function roundOpera(e, s)
-  {  
-    var radius = '' + s.sizex + 'px';
-    var $e = jQuery(e);
-    if (s.tl) $e.css('-o-border-top-left-radius', radius);
-    if (s.tr) $e.css('-o-border-top-right-radius', radius);
-    if (s.bl) $e.css('-o-border-top-bottom-left-radius', radius);
-    if (s.br) $e.css('-o-border-top-bottom-right-radius', radius); 
-  }
-//=================================================================
-     var rect_init;
-     var css_init;
-     var fill_init;
-     //==============================================================
-
-     // precompute "00" to "FF" 
-    var decToHex = [];
-    var alpha = 1;
-    var      init_x = 0;
-    var init_y = 0;
-    var  init_x0 =0;
-    var  init_y0 = 0;
-//==============================================================
-function oncontentready(Obj) {
-         //======== test si classe existe =============================
-         classID= Obj.uniqueID;
-         if (Obj.className.match(classID)) { return (false); }
-         if (!document.namespaces.v+classID) { document.namespaces.add("v"+classID, "urn:schemas-microsoft-com:vml"); }
-         Obj.className = Obj.className.concat(' ', classID);
-         // Find which element provides position:relative for the target element (default to BODY) 
- 
-        pos=jQuery(Obj).findPos();
-        Left=pos.x;
-        Top=pos.y;
-        pos_src=jQuery(Obj.parentElement).findPos();
-
-    var limit = 100, i = 0;
-    var el = Obj; //(this)  
-           style= getStyles(el);  
-    strokeWeight = Get_stokeWeight( style.borderWidth);
-    strokeStyle  = Get_style( style.borderStyle);
-    strokeColor  = Get_Color( style.borderColor);
-
-         zindex = 3;
-         var El_src = el.element;
-
-         while ((typeof (El_src) != 'undefined') && ( getStyles(El_src).position != 'relative') && (El_src.tagName != 'BODY')) {
-             El_src = El_src.parentElement;
-             
-             if (El_src.style.zIndex> zindex) zindex++;
-             i++;
-             if (i >= limit) { return (false); }
-         }
-        
-
-         var el_zindex = parseInt(getStyles(el).zIndex);
-         if (isNaN(el_zindex)) { el_zindex = 3; }
-         var m = el.children;
-         for (i = 0; i < m.length; i++) {
-             echild = m.item(i);
-            echild.style.zIndex = el_zindex + 1  ;
-         }
-
-          Obj.style.zIndex = el_zindex+3 ;
-      
-
-         //=============================================================================	
-
-   
-         switch(getStyles(Obj).borderWidth)
-         {
-         case 'solid':
-            break;
-         default:
-         strokeWeight=parseInt(getStyles(Obj).borderWidth);
-             break;
-         }
-            
-         switch(getStyles(Obj).borderStyle)
-         {
-         case 'solid':
-         strokeStyle=getStyles(Obj).borderStyle;
-            break;
-        case 'double':
-        strokeStyle=getStyles(Obj).borderStyle;
-            break;
-
-         default:
-         strokeStyle=getStyles(Obj).borderStyle;
-
-             break;
-         }
-
-         if (isNaN(strokeWeight)) {
-             strokeWeight = 0;
-             
-         } 
-         stroked =( strokeWeight> 0);
-          
-
-         //================================================================================
-         for (var i = 0; i < 16; i++) {
-             for (var j = 0; j < 16; j++) {
-                 decToHex[i * 16 + j] = i.toString(16) + j.toString(16);
-             }
-         }
-         //==================================
-         var fillColor = translateColor(getStyles(Obj).backgroundColor);
-         var strokeColor =  translateColor(getStyles(Obj).borderColor);
- 
-
-         width=jQuery(Obj).width();
-         height=jQuery(Obj).height();
-              Width=(width+strokeWeight );
-     Height=(height+strokeWeight);
-
-         Left=parseInt(jQuery(Obj).css("left"));
-         if (isNaN(Left)) Left=0 ;
-         Top=parseInt(jQuery(Obj).css("top"));
-           if (isNaN(Top)) Top=0 ;
-   //=================================================================
-           s = getStyles(Obj);
-
-         if (typeof s.transform != "undefined") {
-             rotation = s['transform'];
-             var angle1 = s.transform.split("rotate(");
-             angle1 = angle1[1].split("deg)");
-             angle = angle1[0];
-         }
-         //=================================================================
-
-
-         var VgFillType = new Array("solid", "gradient", "gradientradial", "tile", "pattern", "frame");
-         var VgFillmethod = new Array("none", "linear", "sigma", "any");
-         var VgFillaspect = new Array("atless", "atmost")
-
-
-         alpha = getStyles(Obj)['opacity'] || 1;
-
-
-         var fillSrc = getStyles(Obj).backgroundImage.replace(/^url\("(.+)"\)$/, '$1');
-
-         if (fillSrc) var filltype = (getStyles(Obj)['type']) || "tile";
-         else var filltype = (getStyles(Obj)['type']) || "gradientRadial";
-  /*
-         var fillopacity = alpha;
-       
-         var fillmethod = "none";
-         var fillfocus = "100%";
-
-         var fillcolor2 = "#00FF00";
-         var fillcolors = "0,#ff0000, 0.5#00ff00, 0.6 #0000ff, 0.8 #ff0000, 0.9 #ff0000";
-
-         var fillopacity2 = "1.0";
-         var fillangle = "0";
-         var fillfocusposition = "0.5,0.5";
-         */
-       
-
-         //==================================================================================	
-         radius = s['-moz-border-radius'];
-
-
-         if (typeof radius == "undefined") { radius = "0" }
-         if (typeof radius == undefined) { radius = "" }
-		 
-         if (radius.match("\/")) {
-             //=============================================================
-
-             var tableau = radius.split("/");
-             var rect = document.createElement('v:oval');
-             var typeelement="oval";
-
-         } else {
-                   if (radius.match("\ ")) { 
-          var tableau = radius.split(" "); 
-
-          }
-
-  var tableau = radius.split(" ");  
-      tableau = radius + " " + radius + " " +tableau[0] +" " + tableau[0] + " " + tableau[0];   
-      tableau = tableau.split(" ");  
-      top_left = parseInt(s['-moz-border-top-left-radius']||tableau[0]) ;
-      top_right =  parseInt(s['-moz-border-top-right-radius']||tableau[1]);
-      bottom_right =  parseInt(s['-moz-border-radius-radius']||tableau[2]);
-      bottom_left =  parseInt(s['-moz-border-bottom-left-radius']||tableau[3]);       
-
-
-     radius=tableau[0];
-//=============================================================
-if (parseInt(radius) != "0") {
-    if (top_left!=top_right) {
-          var typeelement="shape";
-          var rect = document.createElement('v'+classID+':shape');      
-
-       with(rect){
-            fillColor = 'none'; 
-            fillStroked = 'true';
-             //   coordsize  = "100 , 100";
-             //    coordSize  = "100 , 100";
-               }
-      
-        rect.setAttribute("coordSize",Width + "," + Height); //mode7
- TL =top_left ;
- TR = top_right  ;
- BR = bottom_right ;
- BL =bottom_left ;
-
-
-
- var Origine ={ x: Width - TR, y:0} ;
- var TR_  ={ x: Width , y : 0 + TR} ;
- var L1 ={ x: Width , y:Height-BR} ;
- var BR_ ={ x: Width - BR, y:Height} ;
- var L2 ={ x:BL, y:Height} ;
- var BL_ ={ x:0 , y:Height-BL} ;
- var L3 ={ x:0 , y:TL} ;
- var TL_ ={ x:TL, y:0} ;
- var L4 ={ x: Width - TR, y:0} ;
-
- var path=" m "+ Origine.x +","+ Origine.y + 
-        " qx " + TR_.x + "," + TR_.y +
-        " l  " + L1.x + "," + L1.y +
-        " qy " + BR_.x + "," + BR_.y +
-        " l " + L2.x + "," + L2.y +
-        " qx "+ BL_.x + "," + BL_.y +
-        " l " + L3.x + "," + L3.y +
-        " qy "+ TL_.x + "," + TL_.y +
-        " l " + L4.x + "," + L4.y +
-        " x e";
-    rect.path=path ;
-
- 
-    }	else {        
-        var typeelement="roundrect";
-        var rect = document.createElement('v'+classID+':roundrect');
-        var arcSize = Math.min(parseInt(radius) / Math.min(Obj.offsetWidth, Obj.offsetHeight), 1);     
-        rect.arcsize = arcSize + 'px';
-	}
-  } else {
-                 var rect = document.createElement('v'+classID+':rect');
-                 var typeelement="rect";
-             }
-
-         }
-
-
-         /*===================================================================================*/
-         var text_shadow = getStyles(Obj)['text-shadow'];
-
-         var box_shadow = getStyles(Obj)['-moz-box-shadow'] ||
-	           getStyles(Obj)['box-shadow'] ||
-	           getStyles(Obj)['-webkit-box-shadow'] ||
-	           getStyles(Obj)['-khtml-box-shadow'];
-
-
-
-         if (text_shadow || box_shadow) {
-             if (text_shadow) {
-                 var sizeShadow = text_shadow.split(" ");
-                 aff_filter(Obj, sizeShadow);
-
-             }
-
-
-             if (box_shadow) {
-                 var sizeShadow = box_shadow.split(" ");
-                 aff_filter(rect, sizeShadow)
-             }
-
-         }
-         /*===================================================================================*/
-
-         var fill = document.createElement('v'+classID+':fill');
-
-         fill.src = fillSrc;
-         fill.color = fillColor;
-         fill.type = filltype;
-     
-
-/*
-         var fillopacity = alpha;
-if(fillopacity)      fill.opacity = fillopacity;
-
-         var fillmethod = "none";
-if (fillmethod) fill.method = fillmethod;
-
-         var fillfocus = "100%";
-         var fillcolor2 = "#00FF00";
-         var fillcolors = "0,#ff0000, 0.5#00ff00, 0.6 #0000ff, 0.8 #ff0000, 0.9 #ff0000";
-            if (fillfocus) fill.focus = fillfocus;
-            if (fillcolor2) fill.color2 = fillcolor2;
-            if (fillcolors) fill.colors = fillcolors;
-
-         var fillopacity2 = "1.0";
-         var fillangle = "0";
-         var fillfocusposition = "0.5,0.5";
-            if (fillopacity2) fill.opacity2 = fillopacity2;
-            if (fillangle) fill.angle = fillangle;
-            if (fillfocusposition) fill.focusposition = fillfocusposition;
-
-*/
-              jQuery(rect).width(Width  );
-              jQuery(rect).height(Height );
-                
-         rect.appendChild(fill);
-//================================================================
-         with(rect.style){
-                left=Left+(0.5*strokeWeight);
-                top=Top+(0.5*strokeWeight);
-                position="absolute"
-                display = 'block';
-                antialias = true;
-                zindex = el_zindex+3;
-
-             }
-//<v:stroke on="True" filltype="solid"
- //   color="#9094C9" weight="8pt" /> 
-//   filltype="pattern" src="rond.gif" /> 
-
-if (stroked) {
-                    rect.strokecolor = strokeColor;
-                    rect.strokeWeight = strokeWeight + 'px';
-                    rect.stroked = stroked;
-   }
-        //================================================================
-document.body.appendChild(rect);
-  var css =  document.createStyleSheet();  
-  var styleSheet = (document.styleSheets.length > 0) ? document.styleSheets[0] :  document.createStyleSheet();
-        //  css = styleSheet;
-//if (stroked)  css.addRule('v'+classID+"\\:stroke" , "behavior: url(#default#VML)");
-         css.addRule('v'+classID+"\\:"+typeelement, "behavior: url(#default#VML)");
-         css.addRule('v'+classID+"\\:fill", "behavior: url(#default#VML)");
-       //  css.addRule("v\\:*", "behavior: url(#default#VML)");
-         //=================================================================	
-    
-       
-
-          Obj.style.background =    'transparent';
-          Obj.style.borderColor = 'transparent';
-
-         isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
-         // IE6 doesn't support transparent borders, use padding to offset original element
-         if (isIE6 && (strokeWeight > 0)) {
-             Obj.style.borderStyle = 'none';
-             Obj.style.paddingTop = parseInt(getStyles(Obj).paddingTop || 0) + strokeWeight;
-             Obj.style.paddingBottom = parseInt(getStyles(Obj).paddingBottom || 0) + strokeWeight;
-         }
-
-
-   init_x = Left;
-   init_y = Top;
-   init_x0 = Left;
-   init_y0 = Top;
-
-        init_x  =parseInt(init_x)+strokeWeight;
-        init_y = parseInt(init_y)+strokeWeight;
-
-        init_x0  =parseInt(init_x);
-        init_y0 = parseInt(init_y);
-
-         Obj.vml = rect;
-
-//===============================================================================================
-         if (typeof (window.rounded_elements) == 'undefined') {
-             window.rounded_elements = new Array();
-
-             if (typeof (window.onresize) == 'function') { window.previous_onresize = window.onresize; }
-             window.onresize = window_resize;
-         }
-         window.rounded_elements[i]
-         window.rounded_elements.push(Obj);
-
-        // Resize(Obj.element);
-         obj = Obj;
-         init = false;
-    transform(obj)
-
-         Obj.attachEvent('onpropertychange', onPropertyChange);
-     }
-     //=====================================================================================
-     var Curwidth = 0;
-     var Curheight = 0;
-
-     function Resize(obj) {
-     return ;
-
-         var h0 = 0;
-         var strokeWeight = parseInt(getStyles(obj).borderWidth);
-         if (isNaN(strokeWeight)) { strokeWeight = 0; }
-
-
-         Size = findSize(obj);
-         //	obj.style.backgroundColor="green";
-
-         pos = findPos(obj);
-         var parent_pos = findPos(obj.vml.parentNode);
-         //var position = $(obj).position();
-         pos.y = pos.y + (0.5 * strokeWeight) - parent_pos.y;
-         pos.x = pos.x + (0.5 * strokeWeight) - parent_pos.x;
-         objvml = obj.vml;
-         objvml.style.top = pos.y + 'px';
-         objvml.style.left = pos.x + 'px';
-
-         //===================================================
-         if (Curwidth == 0) {
-             OldWidth =  objvml.offsetWidth;
-
-             OldHeight = objvml.offsetHeight;
-             Curwidth = obj.offsetWidth - strokeWeight;
-             Curheight =   obj.offsetHeight - strokeWeight;
- 
-         }
-
-         objvml.style.width= Curwidth ;
-         objvml.style.height=Curheight ;
-
-     }
-     //==================================================================================
-     function window_resize() {
-         if (typeof (window.rounded_elements) == 'undefined') { return (false); }
-         if (typeof (handle) == 'undefined') { return (false); }
-         old_handle = handle;
-         old_angle = nangle;
-         rotate(0, true)
-         Curwidth = 0;
-         for (var i in window.rounded_elements) {
-             Resize(window.rounded_elements[i]);
-         }
-
-         if (typeof (window.previous_onresize) == 'function') { window.previous_onresize(); }
-         nangle = old_angle
-         if (old_handle) toggleAnimation()
-
-     }
-     //=======================================================================================
-
-     function aff_filter(obj, sizeShadow) {
-     if (!obj) return ;
-
-         if (typeof obj == "string") var s = document.getElementById(obj).style;
-         else var s = obj.style;
-         Blur = 0;
-         ShadowColor = 0;
-         Horizontal = sizeShadow[0];
-         Vertical = sizeShadow[1];
-         if (sizeShadow.length > 2) Blur = sizeShadow[2]; //radius
-         if (sizeShadow.length > 3) ShadowColor = translateColor(sizeShadow[3]);
-
-
-         direction = 180 - Math.atan((parseInt(Horizontal)) / (parseInt(Vertical))) * 180 / Math.PI;
-         Strength = parseInt(Blur);
-         couleur = ShadowColor;
-
-         obj.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color =" + couleur + ",Direction =" + direction + ",Strength = " + Strength + ") ";
-
-
-
-
-
-         return;
-
-     }
-
-     function hasSilverlight() {
-         try {
-             new ActiveXObject('AgControl.AgControl');
-             return true;
-         } catch (_) {
-             return false;
-         }
-     }
-
-     function getRgbHslContent(styleString) {
-         var start = styleString.indexOf('(', 3);
-         var end = styleString.indexOf(')', start + 1);
-         var parts = styleString.substring(start + 1, end).split(',');
-         // add alpha if needed 
-         if (parts.length == 4 && styleString.substr(3, 1) == 'a') {
-             alpha = +parts[3];
-         } else {
-             parts[3] = 1;
-         }
-         return parts;
-     }
-
-     function percent(s) {
-         return parseFloat(s) / 100;
-     }
-
-     function clamp(v, min, max) {
-         return Math.min(max, Math.max(min, v));
-     }
-
-     function hslToRgb(parts) {
-         var r, g, b, h, s, l;
-         h = parseFloat(parts[0]) / 360 % 360;
-         if (h < 0)
-             h++;
-         s = clamp(percent(parts[1]), 0, 1);
-         l = clamp(percent(parts[2]), 0, 1);
-         if (s == 0) {
-             r = g = b = l; // achromatic 
-         } else {
-             var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
-             var p = 2 * l - q;
-             r = hueToRgb(p, q, h + 1 / 3);
-             g = hueToRgb(p, q, h);
-             b = hueToRgb(p, q, h - 1 / 3);
-         }
-
-         return decToHex[Math.floor(r * 255)] +
-         decToHex[Math.floor(g * 255)] +
-         decToHex[Math.floor(b * 255)];
-     }
-
-     function hueToRgb(m1, m2, h) {
-         if (h < 0)
-             h++;
-         if (h > 1)
-             h--;
-
-         if (6 * h < 1)
-             return m1 + (m2 - m1) * 6 * h;
-         else if (2 * h < 1)
-             return m2;
-         else if (3 * h < 2)
-             return m1 + (m2 - m1) * (2 / 3 - h) * 6;
-         else
-             return m1;
-     }
-     function hexToDec(hex) {
-         return parseInt(hex, 16);
-     }
-
-
-     function translateColor(styleString) {
-         var str;
-         var n = 0;
-
-
-         styleString = String(styleString);
-         if (styleString.charAt(0) == '#') {
-             styleString = (styleString + "00000000").substring(0, 7);
-
-             return styleString;
-         } else if (/^rgb/.test(styleString)) {
-             var parts = getRgbHslContent(styleString);
-             var str = '', n;
-             for (var i = 0; i < 3; i++) {
-                 if (parts[i].indexOf('%') != -1) {
-                     n = Math.floor(percent(parts[i]) * 255);
-                 } else {
-                     n = +parts[i];
-                 }
-                 str += decToHex[clamp(n, 0, 255)];
-             }
-
-             alpha = parts[3];
-         } else if (/^hsl/.test(styleString)) {
-             var parts = getRgbHslContent(styleString);
-             str = hslToRgb(parts);
-             alpha = parts[3];
-         } else if (styleString in colorData) {
-             var exp = new RegExp(/^#/);
-
-             return colorData[styleString];
-
-
-
-         } else {
-
-
-             return styleString;
-
-
-         }
-         // decToHex[Math.floor(alpha * 255)] +
-         return '#' + str;
-     }  	
- 
-      var colorData = {
-         aliceblue: '#F0F8FF',
-         antiquewhite: '#FAEBD7',
-         aquamarine: '#7FFFD4',
-         azure: '#F0FFFF',
-         beige: '#F5F5DC',
-         bisque: '#FFE4C4',
-         black: '#000000',
-         blanchedalmond: '#FFEBCD',
-         blueviolet: '#8A2BE2',
-         brown: '#A52A2A',
-         burlywood: '#DEB887',
-         cadetblue: '#5F9EA0',
-         chartreuse: '#7FFF00',
-         chocolate: '#D2691E',
-         coral: '#FF7F50',
-         cornflowerblue: '#6495ED',
-         cornsilk: '#FFF8DC',
-         crimson: '#DC143C',
-         cyan: '#00FFFF',
-         darkblue: '#00008B',
-         darkcyan: '#008B8B',
-         darkgoldenrod: '#B8860B',
-         darkgray: '#A9A9A9',
-         darkgreen: '#006400',
-         darkgrey: '#A9A9A9',
-         darkkhaki: '#BDB76B',
-         darkmagenta: '#8B008B',
-         darkolivegreen: '#556B2F',
-         darkorange: '#FF8C00',
-         darkorchid: '#9932CC',
-         darkred: '#8B0000',
-         darksalmon: '#E9967A',
-         darkseagreen: '#8FBC8F',
-         darkslateblue: '#483D8B',
-         darkslategray: '#2F4F4F',
-         darkslategrey: '#2F4F4F',
-         darkturquoise: '#00CED1',
-         darkviolet: '#9400D3',
-         deeppink: '#FF1493',
-         deepskyblue: '#00BFFF',
-         dimgray: '#696969',
-         dimgrey: '#696969',
-         dodgerblue: '#1E90FF',
-         firebrick: '#B22222',
-         floralwhite: '#FFFAF0',
-         forestgreen: '#228B22',
-         gainsboro: '#DCDCDC',
-         ghostwhite: '#F8F8FF',
-         gold: '#FFD700',
-         goldenrod: '#DAA520',
-         grey: '#808080',
-         greenyellow: '#ADFF2F',
-         honeydew: '#F0FFF0',
-         hotpink: '#FF69B4',
-         indianred: '#CD5C5C',
-         indigo: '#4B0082',
-         ivory: '#FFFFF0',
-         khaki: '#F0E68C',
-         lavender: '#E6E6FA',
-         lavenderblush: '#FFF0F5',
-         lawngreen: '#7CFC00',
-         lemonchiffon: '#FFFACD',
-         lightblue: '#ADD8E6',
-         lightcoral: '#F08080',
-         lightcyan: '#E0FFFF',
-         lightgoldenrodyellow: '#FAFAD2',
-         lightgreen: '#90EE90',
-         lightgrey: '#D3D3D3',
-         lightpink: '#FFB6C1',
-         lightsalmon: '#FFA07A',
-         lightseagreen: '#20B2AA',
-         lightskyblue: '#87CEFA',
-         lightslategray: '#778899',
-         lightslategrey: '#778899',
-         lightsteelblue: '#B0C4DE',
-         lightyellow: '#FFFFE0',
-         limegreen: '#32CD32',
-         linen: '#FAF0E6',
-         magenta: '#FF00FF',
-         mediumaquamarine: '#66CDAA',
-         mediumblue: '#0000CD',
-         mediumorchid: '#BA55D3',
-         mediumpurple: '#9370DB',
-         mediumseagreen: '#3CB371',
-         mediumslateblue: '#7B68EE',
-         mediumspringgreen: '#00FA9A',
-         mediumturquoise: '#48D1CC',
-         mediumvioletred: '#C71585',
-         midnightblue: '#191970',
-         mintcream: '#F5FFFA',
-         mistyrose: '#FFE4E1',
-         moccasin: '#FFE4B5',
-         navajowhite: '#FFDEAD',
-         oldlace: '#FDF5E6',
-         olivedrab: '#6B8E23',
-         orange: '#FFA500',
-         orangered: '#FF4500',
-         orchid: '#DA70D6',
-         palegoldenrod: '#EEE8AA',
-         palegreen: '#98FB98',
-         paleturquoise: '#AFEEEE',
-         palevioletred: '#DB7093',
-         papayawhip: '#FFEFD5',
-         peachpuff: '#FFDAB9',
-         peru: '#CD853F',
-         pink: '#FFC0CB',
-         plum: '#DDA0DD',
-         powderblue: '#B0E0E6',
-         rosybrown: '#BC8F8F',
-         royalblue: '#4169E1',
-         saddlebrown: '#8B4513',
-         salmon: '#FA8072',
-         sandybrown: '#F4A460',
-         seagreen: '#2E8B57',
-         seashell: '#FFF5EE',
-         sienna: '#A0522D',
-         skyblue: '#87CEEB',
-         slateblue: '#6A5ACD',
-         slategray: '#708090',
-         slategrey: '#708090',
-         snow: '#FFFAFA',
-         springgreen: '#00FF7F',
-         steelblue: '#4682B4',
-         tan: '#D2B48C',
-         thistle: '#D8BFD8',
-         tomato: '#FF6347',
-         turquoise: '#40E0D0',
-         violet: '#EE82EE',
-         wheat: '#F5DEB3',
-         whitesmoke: '#F5F5F5',
-         yellowgreen: '#9ACD32'
-     };
-//=====================================================================
-// Ajoute une fonctionnalité jQuery
-jQuery.extend(jQuery.expr[':'], {
-        // Nom du sélecteur personnalisé
-        Radius: function (a) {
-            if (!jQuery.browser.msie) return;
-             
-    s= getStyles(a);
-           var moz = s['-moz-border-radius'] !== undefined   ;
-            var webkit = s['-webkit-border-radius'] !== undefined;
-            var radius = s['border-radius'] !== undefined ||s['border-Radius'] !== undefined || s['Border-Radius'] !== undefined;
-
-            var mode = document.documentMode || 0;
-            var noBottomFold = jQuery.browser.msie && ((jQuery.browser.version < 8 && !mode) || mode < 8);
-
-            // Eléments correspondant
-       Attribut = s[radius ? 'border-radius' : moz ? '-moz-border-radius' : '-webkit-border-radius'];
-            if (Attribut != undefined) {
-                jQuery(a).crossbrowser(a);
-                 
-            }
-            return false;
-
-        }
-    });
- //==============================================================================
-jQuery.fn.extend({
-   findPos : function() {
- if(jQuery(this).length==0)  return {x:0,y:0};
-       obj = jQuery(this).get(0);
-       var curleft = obj.offsetLeft || 0;
-       var curtop = obj.offsetTop || 0;
-       while (obj = obj.offsetParent) {
-                curleft += obj.offsetLeft
-                curtop += obj.offsetTop
-       }
-       return {x:curleft,y:curtop};
-   }
-});
- //==============================================================================	
-jQuery.fn.crossbrowser = function (options) {
-	 oncontentready(options);
- }
- 
-})(jQuery);
-//================================================================================
- 
-
-
-jQuery(document).ready(function () {
-
- jQuery(':Radius');
-
-
-});
-
-
-//====================================================================
-function Get_Tableau(Val_src) {
-    Val_src = removeExtraSpace(Val_src)
-    var tableau = Val_src.split(" ");
-    tableau = Val_src + " " + Val_src + " " + tableau[0] + " " + tableau[0];
-    tableau = tableau.split(" ");
-    return { Top: tableau[0], Right: tableau[1], Bottom: tableau[2], Left: tableau[3] };
-}
-//============================================================
-function Get_radius(obj) {
-    /*
-    1 La valeur spécifiée est appliquée aux quatre coins. 
-    2 La première valeur est appliquée aux coins supérieur gauche et inférieur droit, et la seconde, aux coins supérieur droit et inférieur gauche  
-    3 La première valeur est appliquée au coin supérieur gauche, la deuxième aux coins supérieur droit et inférieur gauche, et la troisième, au coin inférieur droit  
-    4 Les angles supérieur gauche, supérieur droit, inférieur droit et inférieur gauche sont respectivement définis  
-    */
-
-    var m1 = "border-radius,-o-border-radius,-moz-border-radius,-webkit-border-radius,star";
-    m1 += ",borderRadius,OBorderRadius,MozBorderRadius,WebkitBorderRadius,star";
-
-    $e = jQuery(obj);
-    m1 = m1.split(",");
-    s = obj.currentStyle;
-    // s = obj.style.cssText.split(";");
-
-    Attribut = false;
-    type = "";
-    for (i in m1)
-        if (s[m1[i]] != undefined) {
-            Attribut = true;
-            radius = s[m1[i]];
-            type = m1[i];
-            break;
-        }
-    if (typeof radius == "undefined") { radius = "0" }
-    var reg = new RegExp("\ \ ", "g");
-    nr = radius;
-    while (radius.match("\/")) {
-        radius = radius.replace("\/", " ");
-    }
-
-    while (radius.match("\ \ ")) {
-        radius = radius.replace(reg, " ");
-    }
-
-    if (type.match("star")) {
-        var radius = (radius + " " + 1)
-        var tableau = radius.split(" ");
-        return { r: tableau[0],
-            type: type
-        }
-    }
-
-
-    v1 = Get_Tableau(radius);
-
-
-
-    top_left = parseInt(s['border-top-left-radius'] || v1.Top);
-    top_right = parseInt(s['border-top-right-radius'] || v1.Right);
-    bottom_right = parseInt(s['border-bottom-right-radius'] || v1.Bottom);
-    bottom_left = parseInt(s['border-bottom-left-radius'] || v1.Left);
-
-
-
-    type = (nr.match("\/")) ? "oval" : (parseInt(v1.Left) == 0) ? "rect" : "shape";
-
-    return { r: v1.Left,
-        top_left: top_left,
-        top_right: top_right,
-        bottom_right: bottom_right,
-        bottom_left: bottom_left,
-        type: type
-    };
-
-}
-//=======================================================================================
-/*
-Single (default) 
-ThinThin 
-ThinThick 
-ThickThin 
-ThickBetweenThin
-*/
-function Get_style(borderStyle_src) {
- strokeStyle=[];
-    v1 = Get_Tableau(borderStyle_src);
-
-    for (i1 in v1) {
-        borderStyle = v1[i1];
-
-
-        switch (borderStyle) {
-            case 'solid':
-                strokeStyle[i1] = "Single";
-                break;
-            case 'double':
-                strokeStyle[i1] = "thinThin";
-                break;
-            case 'none':
-                strokeStyle[i1] = "Single";
-                stroked = false
-                break;
-            default:
-                strokeStyle[i1] = "Single";
-
-                break;
-        }
-
-    }
-    return strokeStyle;
-}
-
-//=============================================================
-function Get_Color(Color_src) {
-strokeColor=[i1];
-if(typeof translateColor=="undefined") return strokeColor;
-    v1 = Get_Tableau(Color_src);
-    for (i1 in v1) {
-        strokeColor[i1] = (translateColor(v1[i1]) == "transparent") ? "none" : translateColor(v1[i1]);
-
-    }
-
-    return strokeColor;
-}
-
-//=============================================================
-function Get_stokeWeight(Weight_src) {
-strokeWeight=[];
-    v1 = Get_Tableau(Weight_src);
-    stroked = false;
-    for (i1 in v1) {
-        Weight = v1[i1];
-        p1 = Weight.match("%")
-
-        switch (Weight) {
-            case p1:
-                strokeWeight[i1] = 10;
-                break;
-            case 'thin':
-                strokeWeight[i1] = 0.5;
-                break;
-            case 'medium':
-                strokeWeight[i1] = 0.75;
-                break;
-            case 'thick':
-                strokeWeight[i1] = 2;
-                break;
-            case 'inherit':
-                if (Obj.parentElement)
-                    strokeWeight[i1] = Get_stokeWeight(Obj.parentElement.currentStyle.borderWidth);
-                else
-                    strokeWeight[i1] = 0;
-
-                break;
-
-            default:
-
-           if( Weight!="")    strokeWeight[i1] = Weight;
-                break;
-        }
-        strokeWeight[i1] = parseInt(strokeWeight[i1]);
-        if (isNaN(strokeWeight[i1])) {
-            strokeWeight[i1] = 0;
-        }
-
-        stroked = (strokeWeight[i1] > 0) ? true : stroked;
-    }
-    return strokeWeight;
-
-}
-
-// Récupérer la valeur d'une propriété CSS d'un élément id
-function getStyle(elt, pro) {
-    var element = document.getElementById(elt);
-    if (window.getComputedStyle) // Mozilla Firefox & cie
-    {
-        var propriete = window.getComputedStyle(element, null).getPropertyValue(pro);
-    }
-    else if (element.currentStyle) // Microsoft Internet Explorer
-    {
-        // Formatage (IE) de la propriété CSS
-        while (pro.indexOf('-') != -1) {
-            var lettresuivtiret = pro.charAt(pro.indexOf('-') + 1);
-            pro = pro.replace(/-\S{1}/, lettresuivtiret.toUpperCase());
-        }
-        var propriete = eval('element.currentStyle.' + pro);
-    }
-    return propriete;
-}
-// Récupérer la valeur CSS 
-function getStyles(elt) {
-    var element = elt;
-    if (window.getComputedStyle) // Mozilla Firefox & cie
-    {
-        var propriete = window.getComputedStyle(element, null);
-    }
-    else if (element.currentStyle) // Microsoft Internet Explorer
-    {
-
-        var propriete = element.currentStyle;
-    }
-    return propriete;
-  }
-  function removeExtraSpace(str) {
-    str = str.replace(/[\s]{2,}/g, " "); // Enlève les espaces doubles, triples, etc.
-    str = str.replace(/^[\s]/, ""); // Enlève les espaces au début
-    str = str.replace(/[\s]$/, ""); // Enlève les espaces à la fin
-    return str;
-  }
