Ignore:
Timestamp:
Sep 15, 2010, 10:35:12 AM (14 years ago)
Author:
cljosse
Message:

[Gally's theme 'cuise'] save

Location:
extensions/gally/gally-cuise
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/gally/gally-cuise/conf/default.conf

    r6471 r6926  
    11# ------------------------------------------------------------------------------
    2 # GRUM:DARK-II
     2# CLJOSSE: CUISE
    33# Theme for Piwigo
    44# ------------------------------------------------------------------------------
    55# file: gally-cuise/conf/default.conf
    6 # file release: 1.3.0
     6# file release: 2.0.0
    77# ------------------------------------------------------------------------------
    88# author: grum at piwigo.org
  • extensions/gally/gally-cuise/css/theme.css

    r6471 r6926  
    208208
    209209/* menubar_categories.tpl */
    210 #icon_start_filter { float:right,right;100px;
     210#icon_start_filter { float:right;right:100px;
    211211  background:url(./../icon/start_filter.png);
    212212}
     
    770770}
    771771
    772 #theImgContainer { overflow:hidden;
    773   border:8px #ffffff solid;
    774 }
    775 
    776772#imageHeaderBar .browsePath h2 {
    777773  font-weight:normal;
     
    805801}
    806802
    807 #navThumbNext, #navThumbPrev {
    808    top:10%;
    809 }
    810 
    811 #navThumbPrevContainer, #navThumbNextContainer {
    812    vertical-align:middle; top:30%;
    813    height:30%;
     803/* Images suivantes/Précédentes */
     804#navThumbPrev, #navThumbNext {
     805    vertical-align: top;
     806    top: 60px;
     807}
     808
     809#navThumbPrevContainer, #navThumbNextContainer {
     810    vertical-align: top;
     811    height: 12%;
     812    width:12%;
     813   
    814814}
    815815
     
    822822}
    823823
    824 
     824.navThumbPrevContent, .navThumbNextContent {
     825    vertical-align: middle;
     826    top: 200px;
     827   
     828}
    825829
    826830#imageInfos {
     
    969973}
    970974
    971 #theTabsContainer .navigationBar {
     975#theTabsContainer {
    972976  text-align:right;
    973977}
    974978
     979.navigationBar {
     980    background-position: top;
     981    text-align: center;
     982    position: fixed;
     983    bottom: 20px;
     984    font-size: 10px;
     985    width: 100%;
     986    background-image: url('../images/button-bg.png');
     987    background-repeat: repeat-x;
     988}
    975989
    976990/*
     
    980994#fullTagCloud SPAN a:hover {
    981995  background:#303030;
    982   -moz-border-radius:3px;
    983   -webkit-border-radius:3px;
    984   -khtml-border-radius:3px;
    985   border-radius:3px;
     996  -moz-border-radius:13px;
     997  -webkit-border-radius:13px;
     998  -khtml-border-radius:13px;
     999  border-radius:13px;
    9861000}
    9871001
     
    12551269}
    12561270
    1257 
    1258  
     1271 /* -moz-border-radius:20px'FF);border-radius:20px(opera);-webkit-border-radius:20px(safari) */
     1272 #theImgContainer  {
     1273   
     1274    overflow:hidden; z-index:80;
     1275   
     1276     
     1277     }
     1278  #theImg { z-index: -1;}
     1279 #theImage{ position:absolute; z-index:78; overflow:hidden;width:100%}
     1280 #cadre{ 
     1281     background-position:50px 0;
     1282     position: absolute;
     1283     top: 0; left: 0; right: 0; bottom: 0; 
     1284    z-index: 200;
     1285
     1286 }
  • extensions/gally/gally-cuise/js/crossbrowser.js

    r6471 r6926  
    11; (function (jQuery) {
    2                          
    3  if (!document.namespaces.v) { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); }
     2 
     3 
     4 var Prefix='Vml';
     5 var Obj_init= "";
     6
     7var style_match =[];
     8style_match=('transform,text-shadow,box-shadow,border-radius,star,opacity'.split(","));
     9
     10var style_prefix =[];
     11//  Firefox (Gecko) -moz-
     12//  Opera
     13//  Safari (WebKit) -webkit-
     14style_prefix =('webkit,khtml,o,moz,icab ,'.split(","));
     15
     16var browsers = {linux:'-khtml-', webkit:'-webkit-',safari:'-webkit-',opera:'',mozilla:"-moz-",iph:'-icab-',msie:'',opacity:"" }; 
     17var Init_fig;
     18var tmp = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0;
     19if(tmp) var isIE = document.namespaces ? 1 : 0;   
     20//================================================================================
     21var marge_body ;
     22var IDS="";
     23var Attr;
     24var Object;
     25var   Attr_val;
     26var Unique_id=0;
     27var uniqueId=0;
     28var Nom_classe ;
     29//================================================================================
     30var Window={ width:jQuery(window).width(),height:jQuery(window).height()
     31};
     32var Fill_Color  ;
     33var Fill_Src   ;
     34var Fill_Type ;
     35var box_shadow  ;
     36var text_shadow ;
     37    //==================================
     38var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
     39        ralpha = /alpha\([^)]*\)/,
     40        ropacity = /opacity=([^)]*)/,
     41        rfloat = /float/i,
     42        rdashAlpha = /-([a-z])/ig,
     43        rupper = /([A-Z])/g,
     44        rnumpx = /^-?\d+(?:px)?$/i,
     45        rnum = /^-?\d/,
     46    fcamelCase = function (all, letter) {
     47            return letter.toUpperCase();
     48        };
     49
     50 var classes ;
     51// Add namespaces and stylesheet at startup.
     52function AddNameSpace(doc, prefix, urn) {
     53        if(document.namespaces[prefix]==null) {
     54                var e=["shape",
     55                "shapetype",
     56                "group",
     57                "background",
     58                "path",
     59                "formulas",
     60                "handles",
     61                "fill",
     62                "stroke",
     63                "shadow",
     64                "textbox",
     65                "textpath",
     66                "imagedata",
     67                "line",
     68                "polyline",
     69                "curve",
     70                "roundrect",
     71                 "oval",
     72                "rect",
     73                "arc",
     74                "image","textShadow","boxShadow","opacity"],Css = document.createStyleSheet();
     75
     76                for(var i=0; i<e.length; i++) {
     77            Css.addRule(prefix +"\\:"+e[i],"behavior: url(#default#VML);");
     78        }
     79       
     80        document.namespaces.add(prefix, urn, '#default#VML');
     81
     82
     83
     84        }
     85 
     86}
     87
     88     function addNamespace(doc, prefix, urn) {
     89         if (!doc.namespaces[prefix]) {
     90             doc.namespaces.add(prefix, urn, '#default#VML');
     91         }
     92     }
     93
     94     function addNamespacesAndStylesheet(doc,classid) {
     95         AddNameSpace(doc, Prefix + "_" + classid , 'urn:schemas-microsoft-com:vml');
     96       //  AddNameSpace(doc, "v"   , 'urn:schemas-microsoft-com:vml');
     97     
     98     }
     99
     100 
     101   
     102
     103
    4104    var mode = document.documentMode || 0;
    5105    var noBottomFold = jQuery.browser.msie && ((jQuery.browser.version < 8 && !mode) || mode < 8);
    6106    var init = false;
    7107    var angle = 0;
    8     var strokeWeight =0;
    9 
     108
     109var strokeWeight ={
     110                    Bottom:0,
     111                    Left:0,
     112                    Top:0,
     113                    Right:0
     114                   }
     115    ;
     116var strokeColor ={
     117                    Bottom:'black',
     118                    Left:'black',
     119                    Top:'black',
     120                    Right:'black'
     121                   };
     122var strokeStyle ={
     123                    Bottom:'solid',
     124                    Left:'solid',
     125                    Top:'solid',
     126                    Right:'solid'
     127                   };
     128//===================================================
     129          var stroked = false;
     130     var Curwidth = 0;
     131     var Curheight = 0;
     132 
     133     var rect_init;
     134     var css_init;
     135     var fill_init;
     136     //==============================================================
     137
     138     // precompute "00" to "FF"
     139    var decToHex = [];
     140    var  alpha = 1;
     141    var  init_x = 0;
     142    var  init_y = 0;
     143    var  init_x0 =0;
     144    var  init_y0 = 0;
     145    //====================================
     146    var Dimension = {};
     147    var origine = {x:0,y:0,Left:0,Top:0,Width:100,Height:100,w:100,h:100};
     148   
     149//============================================================
     150var Options={
     151
     152};
     153
     154
     155//=========================================
     156function Set_textbox(prefix,Options){
     157//<textbox string="VML text" layout-flow="vertical"/>
     158Str=[];
     159if (Options.textbox) {
     160            Str.push('<'+prefix+':textbox ');
     161            for (i in Options.textbox)
     162            {
     163            Str.push( i + '=' +  Options.textbox[i] ); 
     164           
     165            }
     166             Str.push('style="font:normal normal normal 36pt Arial"');
     167            Str.push('/>');
     168   }
     169  return  Str.join(' ');
     170
     171}
     172function Set_Shadow( prefix,Options ){
     173Str=[];
     174if (Options.shadow) {
     175            Str.push('<'+prefix+':shadow ');
     176            for (i in Options.shadow)
     177            { Str.push( i + '=' +  Options.shadow[i] );  }
     178            Str.push('/>');
     179   }
     180  return  Str.join(' ');
     181
     182}
     183//============================================================
     184function Set_Value_to_str(Valeurs,op,sep)
     185{
     186    n=""
     187    for (i in Valeurs)
     188    {
     189     Val=Valeurs[i ];
     190     if (/;/.test( Val))
     191     {
     192      sous_val=Valeurs[i ].split(";") ;
     193      for (j in sous_val)
     194      {
     195            val1=sous_val[j].split(":");
     196            n += val1[0] + op + val1[1]+ sep;
     197            }
     198
     199        }else{
     200            n += i + op + Val + sep;
     201        }
     202
     203    }
     204    return n;
     205}
     206//=============================================================
     207
     208function Set_Shape(prefix,Options){
     209ShapeStr=[];
     210if (Options.shape) {
     211
     212     ShapeStr.push('<'+ prefix +':'+ Options.element + ' ');
     213     for (i in Options.shape)
     214       { 
     215       Val=Options.shape[i];
     216       if (Val)
     217       ShapeStr.push( i+'="' +  Val + '"' ); 
     218       else
     219       n=i ;
     220
     221       }
     222     ShapeStr.push('>');
     223 }
     224 ret=ShapeStr.join(' ');
     225 return ret;
     226}
     227//-----------------------------------------------------
     228function Set_end_Shape(prefix,Options){
     229if (Options.shape) {
     230 
     231return '</'+prefix+':'+ Options.element  +' > ';
     232}else return '</'+prefix+' > ';
     233
     234
     235}
     236//============================================================
     237function Set_Stroke(prefix,Options){
     238StrokeStr=[];
     239if (Options.stroke) {
     240            StrokeStr.push('<'+prefix+':stroke ');
     241            for (i in Options.stroke)
     242            { StrokeStr.push( i + '=' +  Options.stroke[i] );  }
     243            StrokeStr.push('/>');
     244   }
     245  return  StrokeStr.join(' ');
     246
     247}
     248//=======================================================================================
     249
     250function Set_Group(prefix,Options)
     251{
     252
     253GroupStr=[];
     254if (Options.group) {
     255            GroupStr.push('<'+prefix+':group');
     256                for (i in Options.group)
     257            {
     258             GroupStr.push( i + '=' +  Options.group[i] );
     259            }
     260            GroupStr.push('>');
     261   }
     262           return  GroupStr.join(' ');
     263
     264}
     265
     266//-----------------------------------------------------
     267function Set_end_Group(prefix,Options){
     268if (Options.group) {
     269return '</'+prefix+':'+ 'group'  +' > ';
     270}else return '</'+prefix+' > ';
     271
     272
     273}
     274
     275
     276//=======================================================================================
     277function Set_Fill(prefix,Options){
     278
     279FillStr=[];
     280if (Options.fill) {
     281            FillStr.push('<'+prefix+':fill');
     282            for (i in Options.fill)
     283            {
     284   
     285            FillStr.push( i+'=' +  Options.fill[i] );
     286            }
     287
     288     
     289            FillStr.push('/>');
     290         
     291           
     292  }
     293return FillStr.join(' ');
     294}
     295
     296
     297
     298//============================================================
     299function Get_angle(obj)
     300{
     301if (typeof obj =='string') obj=jQuery("#"+ obj).get(0) ;
     302 
     303if (!obj) return ;
     304  var  m1 ="transform,-o-transform,-moz-transform,-webkit-transform"; 
     305    m1 =  m1.split(",") ;
     306     s =  obj.currentStyle;
     307    if (!s)  s = obj.style;
     308  if (!s) return ;
     309
     310    for (i in m1)
     311 if (s[m1[i]]!=undefined)
     312 {
     313 
     314  var rotation=s[m1[i]] ;
     315 break; }
     316
     317 var Angle=0;
     318
     319         if (typeof rotation != "undefined") {
     320             
     321             var angle1 = rotation.split("rotate(");
     322             angle1 = angle1[1].split("deg)");
     323             Angle = angle1[0];
     324         }
     325         return Angle ;
     326}
     327//===========================================================
     328function removeExtraSpace(str)
     329{
     330 if (!str) return "" ;
     331    str = str.replace(/[\s]{2,}/g," "); // Enlève les espaces doubles, triples, etc.
     332    str = str.replace(/^[\s]/, ""); // Enlève les espaces au début
     333    str = str.replace(/[\s]$/,""); // Enlève les espaces à la fin
     334    return str;   
     335}
     336
     337
     338function trim(str, chars) {
     339        return ltrim(rtrim(str, chars), chars);
     340}
     341 
     342function ltrim(str, chars) {
     343        chars = chars || "\\s";
     344        return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
     345}
     346 
     347function rtrim(str, chars) {
     348        chars = chars || "\\s";
     349        return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
     350}
     351//====================================================================
     352function Get_Tableau(Val_src) {
     353Val_src=removeExtraSpace(Val_src)
     354
     355  var tableau = Val_src.split(" "); 
     356      tableau = Val_src + " " + Val_src + " " +tableau[0] +" " + tableau[0]  ;
     357       
     358      tableau = tableau.split(" "); 
     359
     360return {Top:tableau[0] ,Right: tableau[1],Bottom: tableau[2],Left:tableau[3] };
     361}
     362//============================================================
     363function Get_radius(obj)
     364{
     365/*
     366   1 La valeur spécifiée est appliquée aux quatre coins.
     367   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 
     368   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 
     369   4 Les angles supérieur gauche, supérieur droit, inférieur droit et inférieur gauche sont respectivement définis 
     370*/
     371
     372  var  m1 ="border-radius,-o-border-radius,-moz-border-radius,-webkit-border-radius,star"; 
     373    m1 +=",borderRadius,OBorderRadius,MozBorderRadius,WebkitBorderRadius,star"; 
     374
     375    $e=jQuery(obj);
     376    m1 =  m1.split(",") ;
     377    s=obj.currentStyle;
     378   // s = obj.style.cssText.split(";");
     379
     380    Attribut = false;
     381 type="";
     382 for (i in m1)
     383 if (s[m1[i]]!=undefined)
     384 {
     385  Attribut = true;
     386  radius=s[m1[i]] ;
     387  type=m1[i];
     388 break; }
     389  if (typeof radius == "undefined") { radius = "0" }
     390      var reg=new RegExp("\ \ ","g");
     391      nr = radius;
     392     while(radius.match("\/")){
     393         radius=radius.replace("\/"," ");
     394     }
     395
     396          while(radius.match("\ \ ")){
     397             radius=radius.replace(reg," ");
     398          }
     399 
     400 if (type.match("star") ) {
     401  var radius = (radius + " " + 1)
     402  var tableau = radius.split(" ");
     403           return { r:tableau[0] ,
     404                   type:type
     405                  }
     406       }
     407           
     408 
     409      v1=Get_Tableau(radius);
     410
     411
     412     
     413      top_left = parseInt(s['border-top-left-radius']||v1.Top) ;
     414      top_right =  parseInt(s['border-top-right-radius']||v1.Right);
     415      bottom_right =  parseInt(s['border-bottom-right-radius']||v1.Bottom);
     416      bottom_left =  parseInt(s['border-bottom-left-radius']||v1.Left); 
     417
     418
     419       
     420      type=(nr.match("\/")) ? "oval" : (parseInt(v1.Left)==0) ? "rect" : "shape" ;
     421             
     422        return { r:v1.Left,
     423             top_left:top_left ,
     424             top_right:top_right ,
     425             bottom_right:bottom_right ,
     426             bottom_left:bottom_left,
     427             type:type};
     428
     429}
     430//=======================================================================================
     431/*
     432Single (default)
     433ThinThin
     434ThinThick
     435ThickThin
     436ThickBetweenThin
     437*/
     438function Get_style(borderStyle_src){
     439 
     440   v1=Get_Tableau(borderStyle_src) ;
     441
     442for ( i1 in v1)
     443{
     444borderStyle=v1[i1] ;
     445
     446
     447         switch(borderStyle)
     448         {
     449         case 'solid':
     450         strokeStyle[i1]="Single";
     451            break;
     452        case 'double':
     453        strokeStyle[i1]="thinThin";
     454            break;
     455        case 'none':
     456         strokeStyle[i1]="Single";
     457        stroked =false
     458            break;
     459         default:
     460          strokeStyle[i1]="Single";
     461
     462             break;
     463         }
     464   
     465}   
     466      return  strokeStyle;
     467}
     468
     469//=============================================================
     470function Get_Color(Color_src){
     471 
     472 v1= Get_Tableau(Color_src) ;
     473  for ( i1 in v1)
     474{
     475   strokeColor[i1] = ( translateColor(v1[i1])=="transparent") ? "none" : translateColor(v1[i1]) ;
     476
     477  }
     478
     479return  strokeColor;
     480}
     481
     482//=============================================================
     483function Get_stokeWeight(Weight_src){
     484 
     485   v1=Get_Tableau(Weight_src) ;
     486   stroked=false ;
     487for ( i1 in v1)
     488{
     489Weight=v1[i1] ;
     490p1=Weight.match("%")
     491
     492         switch(Weight)
     493         {
     494         case  p1:
     495          strokeWeight[i1]=10;
     496          break;
     497        case 'thin':
     498          strokeWeight[i1]=0.5;
     499          break;
     500                case 'medium':
     501          strokeWeight[i1]=0.75;
     502                  break;
     503                case 'thick':
     504          strokeWeight[i1]=2;
     505                  break;
     506                case 'inherit':
     507                if(Obj.parentElement)
     508          strokeWeight[i1]=Get_stokeWeight(Obj.parentElement.currentStyle.borderWidth);
     509                  else
     510                  strokeWeight[i1]=0 ;
     511                 
     512                  break;
     513                 
     514         default:
     515                 
     516         strokeWeight[i1]= Weight ;
     517             break;
     518         }
     519 strokeWeight[i1]=parseInt(strokeWeight[i1]) ;
     520         if (isNaN( strokeWeight[i1] )) {
     521             strokeWeight[i1] = 0;
     522         }
     523
     524         stroked =  ( strokeWeight[i1] > 0) ?  ( strokeWeight[i1] > 0) :stroked;
     525}
     526                 return   strokeWeight   ;
     527                 
     528        }
    10529//=======================================================================================
    11530//Filter: Alpha(Opacity=100, FinishOpacity=0, Style=2, StartX=20, StartY=40, FinishX=0, FinishY=0);
    12531//filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20)"
    13 function opacity(obj) {
    14         alpha_css=jQuery(obj).css("opacity");
    15         fils=     $(obj).children() ;
    16         if (fils.length>1) {
    17                 jQuery( fils).css("opacity",alpha_css);
    18             }
    19 }
     532function Set_opacity(obj) {
     533 filtres=obj.style.filter;
     534 
     535 if (parseInt( alpha  )  + "" !== "NaN" ) {
     536   if (  (alpha > 1) ) alpha /= 100 ;
     537
     538 }
     539
     540sProperties = "opacity = "+  alpha*100 + ", FinishOpacity=100, Style=2, StartX=20, StartY=40, FinishX=0, FinishY=0";
     541sProperties = "opacity = "+  alpha*100 ;
     542
     543if (!filtres.match("progid:DXImageTransform.Microsoft.Alpha"))
     544   filtres += "  progid:DXImageTransform.Microsoft.Alpha("+sProperties+") ";
     545 
     546   obj.style.filter = filtres ;
     547
     548}
     549 
    20550     //======================================================================================
    21 function transform(obj) {
    22      if (!obj) return ;
    23          if (typeof obj == "string") var s = document.getElementById(obj).style;
    24          else var s = obj.style;
    25        
    26          if (typeof s.transform != "undefined") {
    27              var angle1 = s.transform.split("rotate(");
    28              angle1 = angle1[1].split("deg)");
    29              angle = angle1[0];
    30          }
    31          //==================================================================================   
     551function Rotate(_Obj,angle,offset_Vertical,offset_Horizontal)
     552         { 
     553         if (!_Obj) return ;
     554         name=_Obj.id ;
    32555         var deg2radians = Math.PI * 2 / 360;
    33556         var rad = angle * deg2radians;
     
    35558         var sintheta = Math.sin(rad);
    36559
    37          if (!obj.style.filter.match("progid:DXImageTransform.Microsoft.Matrix")) obj.style.filter += "  progid:DXImageTransform.Microsoft.Matrix() ";
    38 
    39 
    40          centered = true;
    41          try{
    42          obj.filters.item("DXImageTransform.Microsoft.Matrix").M11 = costheta;
    43          obj.filters.item("DXImageTransform.Microsoft.Matrix").M12 = -sintheta;
    44          obj.filters.item("DXImageTransform.Microsoft.Matrix").M21 = sintheta;
    45          obj.filters.item("DXImageTransform.Microsoft.Matrix").M22 = costheta;
    46          obj.filters.item("DXImageTransform.Microsoft.Matrix").sizingMethod = 'auto expand'; //'clip to original' ; //
    47          }  catch (_) {
    48          centered = true;
    49          }
    50 
    51   height = obj.clientHeight;
    52   width = obj.clientWidth;
    53   xleft= obj.offsetLeft;
    54   ytop= obj.offsetTop;     
    55   ntop = ((height - obj.offsetHeight) / 2);
    56   nleft = ((width - obj.offsetWidth) / 2);
    57 
    58 
    59     if (obj.vml) {
    60           if (!init) {
    61             jQuery(obj).css("position", "absolute");
    62           pos_img=jQuery(obj).findPos();
    63            pos_vml=jQuery(obj.vml).findPos();
    64                   nleft=-strokeWeight;
    65                   ntop =-strokeWeight;
    66 
    67                    var mode = document.documentMode || 0;
    68                   if (obj.currentStyle.position!="absolute"){
    69 
    70                     init_x0=init_x - (0.5*strokeWeight) ;
    71                    if (mode==8) init_y0=init_y + (0.5*strokeWeight) ;
    72                    else init_y0=init_y + (1.5*strokeWeight) ;
    73                     init_y=strokeWeight;
    74                     init_x=strokeWeight;
    75 
    76 
    77                   }else{
    78                    init_y=parseInt(pos_img.x)+strokeWeight;
    79                    init_x=parseInt(pos_img.y)+strokeWeight;
    80                    init_x0=init_x+(0.5*strokeWeight);
    81                     init_y0=init_y+(0.5*strokeWeight);
    82 
    83                   }
    84 
    85                    jQuery(obj).css("position", "absolute");
    86                   init=true;
    87                    
    88                  }
    89 
    90                         x = init_x+  nleft ;
    91                         y = init_y+  ntop ;
    92 
    93 
    94                  jQuery(obj).css("left",  x +  "px");
    95                  jQuery(obj).css("top",  y +  "px");
    96  
    97                  jQuery(obj.vml).css("left",   init_x0 +  nleft+  "px");
    98                  jQuery(obj.vml).css("top",  init_y0 +  ntop+  "px");
    99        
    100 
    101                  transform(obj.vml);
    102                        
    103                 }
    104 var name_id=obj.id ; 
    105  jQuery(obj).css("opacity",alpha);
    106  if (alpha!=1) {
    107      opacity(obj);
    108  
     560         Horizontal=0 ;
     561        Vertical=0 ;
     562     
     563 filtres=_Obj.style.filter;
     564//Dx ="+ Horizontal +",Dy ="+ Vertical +",
     565
     566sProperties = "M11 ="+ costheta+",M12 ="+ -sintheta+",M21 ="+ sintheta +",M22 ="+ costheta +", sizingMethod =" + "'auto expand'" + ""; //'clip to original' ; //
     567if (!filtres.match("progid:DXImageTransform.Microsoft.Matrix"))
     568   filtres += "  progid:DXImageTransform.Microsoft.Matrix("+sProperties+") ";
     569
     570 _Obj.style.filter=filtres ;
     571 return _Obj;
     572
     573}
     574//============================================================================
     575function Transform(obj) {
     576        if (!obj) return ;
     577        obj=jQuery(obj).get(0);
     578        if (!obj) return ;
     579                s = obj.style;
     580        angle= angle || Get_angle(obj);
     581        if (!init) {
     582             init=true ;
     583                        //=================================================================
     584            ntop = 0;
     585            nleft = 0;
     586        Parent=obj.id.replace("_Ombre","");
     587        Obj_parent=jQuery("#"+Parent).get(0);
     588         
     589            if (typeof (Obj_parent)!="undefined") {
     590
     591                   Left=Dimension[Obj_init.id].Left;
     592                   Top=Dimension[Obj_init.id].Top;
     593                   if (/Texte/.test(obj.id) ){
     594 
     595
     596                   Top =   (( obj.clientHeight - obj.offsetHeight) / 2);
     597                        Left=   ((obj.clientWidth - obj.offsetWidth) / 2);
     598
     599                   }
     600
     601                        }
     602
     603
     604            jQuery(obj).width( Dimension[Obj_init.id].w  );   
     605            jQuery(obj).height( Dimension[Obj_init.id].h ); 
     606
     607
     608            init_x=  Left  +   (strokeWeight.Left/2)    ;
     609            init_y=  Top +   (strokeWeight.Top/2)   ;
     610
     611            }
     612        //===========================================
     613 //obj.style.position="absolute";
     614        jQuery(obj).rotate(angle);
     615   
     616
     617        ntop = (( obj.clientHeight - obj.offsetHeight) / 2);
     618        nleft = ((obj.clientWidth - obj.offsetWidth) / 2);
     619     if (/Texte/.test(obj.id) ){
     620 
     621
     622                  ntop =0;
     623                      nleft = 0;
     624
     625                   }
     626
     627        jQuery(obj).css("left",  init_x +  nleft+  "px");
     628        jQuery(obj).css("top", init_y +  ntop+  "px");
     629
     630
    109631 }
    110  
    111           return ;
    112 
    113  
    114    
    115 
    116 
    117 
    118 
    119      
    120 
    121      }
     632
    122633//===========================================
    123634function onPropertyChange(e) {
    124          var el = e.srcElement;
    125 
    126          switch (e.propertyName) {
    127             case "opacity":
    128                  opacity(el);
    129 
     635   var el = e.srcElement;
     636       ID=  el.id;
     637       Prop=e.propertyName.split(".") ;
     638       Property=Prop[1];
     639
     640       Valeur=el.currentStyle[Property] ;
     641      return ;
     642
     643       if ( !ID.match("Vml") )
     644       {
     645     
     646       el=jQuery("#Vml_" + ID ).get(0);
     647       if (!el)
     648            return ;
     649      if(!Property) return ;
     650      if (Property=="filter")
     651      h1= jQuery("#Vml_" + ID ).css(Property);
     652      else
     653      el=jQuery("#Vml_" + ID ).get(0);
     654     
     655       
     656       }else{
     657            return ;
     658       }
     659
     660                switch (e.propertyName) {
     661
     662            case "style.position":
     663             init=false ;
     664                 transform(el);
    130665                 break;
     666
     667            case "style.filter":
     668             init=false ;
     669        alpha=Valeur;
     670            if (! el.style.filter.match(Valeur))
     671                           Set_opacity(el);
     672
     673
     674                 break;
     675            case "style.opacity" :
     676             init=false ;
     677           new_alpha=jQuery("#"+el.id).css("opacity") ;
     678            if ( el.style.opacity != jQuery("#"+el.id).css("opacity"))
     679                           Set_opacity(el);
     680
     681
     682                 break;
     683
     684            case  "style.borderWidth" :
     685                  init=false ;
     686               
     687                     el.strokeWeight = Valeur;
     688
     689                  if (el.style.borderLeftWidth != strokeWeight.Left +"px"  )
     690                  {
     691                       strokeWeight = Get_stokeWeight(el.style.borderWidth) ;
     692
     693                   transform(el);
     694                   jQuery("#"+el.id).css("borderWidth",el.style.borderWidth );
     695
     696                   }
     697                 break;         
     698                 
     699            case "style.borderStyle":
     700            transform(el);
     701         
     702                 break;         
     703
     704            case "style.borderColor":
     705 
     706                     el.strokeColor =  translateColor(Valeur);
     707                     transform(el);
     708                 break;             
     709                                                         
    131710             case "style.transform":
    132              // init=false;
     711                init=false ;
    133712                 transform(el);
    134713
     
    143722                 new_color = translateColor(el.style.color);
    144723                 el.style.color = new_color;
     724                  transform(el);
    145725                 break;
    146              case 'width':
    147 
    148                  el.style.width = el.attributes.width.nodeValue + 'px';
     726             case 'style.width':
     727
     728                 //el.style.width = el.attributes.width.nodeValue + 'px';
    149729                 // In IE8 this does not trigger onresize.
    150                  el.firstChild.style.width = el.clientWidth + 'px';
     730              //   el.firstChild.style.width = el.clientWidth + 'px';
     731              if (el.vml)     el.vml.style.width = el.clientWidth  + 'px';
    151732                 break;
    152              case 'height':
    153 
    154                  el.style.height = el.attributes.height.nodeValue + 'px';
    155                  el.firstChild.style.height = el.clientHeight + 'px';
     733             case 'style.height':
     734
     735                 //el.style.height = el.attributes.height.nodeValue + 'px';
     736              //   el.firstChild.style.height = el.clientHeight + 'px';
     737                if (el.vml)   el.vml.style.height = el.clientHeight   + 'px';
    156738                 break;
    157739         }
    158      }
    159 //==================================================
    160 function findSize(obj) {
    161          var cur_height = obj.offsetHeight;
    162          var cur_width = obj.offsetWidth;
    163 
     740}
     741
     742//===============================================================================
     743function Set_Path(r,_Width,_Height)
     744{
     745   Path="";
     746   radius=parseInt(r.r) ;
     747   CoordOrigin="0 0";
     748    switch (r.type)
     749    {
     750        case "oval":
     751             typeelement="oval";
     752             var CoordSize="";
     753
     754
     755
     756        break ;
     757
     758        case "shape":
     759             typeelement="shape";
     760             CoordSize= _Width+","+_Height;
     761
     762            TL =parseInt(r.top_left )    ;
     763            TR =parseInt (r.top_right  )  ;
     764            BR = parseInt (r.bottom_right )   ;
     765            BL = parseInt (r.bottom_left )   ;
     766
     767            var shape_Origine ={ x: _Width - TR, y:0} ;
     768
     769            var TR_  ={ x: _Width , y : 0 + TR} ;
     770            var L1 ={ x: _Width , y:_Height-BR} ;
     771            var BR_ ={ x: _Width - BR, y:_Height} ;
     772            var L2 ={ x:BL, y:_Height} ;
     773            var BL_ ={ x:0 , y:_Height-BL} ;
     774            var L3 ={ x:0 , y:TL} ;
     775            var TL_ ={ x:TL, y:0} ;
     776            var L4 ={ x: _Width - TR, y:0} ;
     777
     778             Path=" m "+ shape_Origine.x +","+  shape_Origine.y +
     779            " qx " + TR_.x + "," + TR_.y +
     780            " l  " + L1.x + "," + L1.y +
     781            " qy " + BR_.x + "," + BR_.y +
     782            " l " + L2.x + "," + L2.y +
     783            " qx "+ BL_.x + "," + BL_.y +
     784            " l " + L3.x + "," + L3.y +
     785            " qy "+ TL_.x + "," + TL_.y +
     786            " l " + L4.x + "," + L4.y +
     787            " x e";   
     788 
     789        break;
     790        case "star":
     791            typeelement="shape";
     792             CoordSize=_Width/radius + "," + _Height/radius ; //zoom
     793             shape_Origine ={ x:8 , y:65} ;
     794            CoordOrigin="10 20";
     795            Path="m "+shape_Origine.x+","+shape_Origine.y+" l 72,"+shape_Origine.y+",92,11,112,"+shape_Origine.y+",174,"+shape_Origine.y+",122,100,142,155,92,121,42,155,60,100 x e";
     796         break;
     797
     798        default:
     799            typeelement="rect";
     800            CoordSize= _Width+","+_Height;
     801            shape_Origine ={ x:0 , y:0} ;
     802
     803             L1 ={ x:0      , y:_Height } ;
     804             L2 ={ x:_Width , y:_Height} ;
     805             L3 ={ x:_Width  , y:0 } ;
     806             Path=" m "+ shape_Origine.x +","+  shape_Origine.y +
     807            " l  " + L1.x + "," + L1.y + ","+
     808             L2.x + "," + L2.y + ","+
     809             L3.x + "," + L3.y +           
     810            " x e";   
     811           break;
     812
     813    }
     814    return { Path:Path,typeelement:typeelement,CoordSize:CoordSize, CoordOrigin: CoordOrigin}
     815}
     816 
     817
     818//=================================================================
     819function oncontentready(Obj) {
     820       
     821var reg=new RegExp('wrap', "gi");
     822  if (reg.test(Obj.className)) { return ;}
     823  reg=new RegExp(Prefix, "gi");
     824  if (reg.test(Obj.className)) { return ;}
     825  //======== test si classe existe =============================
     826  classID= Obj.uniqueID;
     827  Nom_classe =  Prefix + "_" + classID ;
     828  reg=new RegExp(Nom_classe, "gi");
     829  if (!reg.test(Obj.className)) {
     830        if(document.namespaces.length==0)
     831        addNamespacesAndStylesheet(document,classID);
     832
     833         if ( !document.namespaces[Nom_classe]) {
     834          //document.namespaces.add("v"+classID, "urn:schemas-microsoft-com:vml");
     835            addNamespacesAndStylesheet(document,classID);
     836          }
     837          Obj.className = Obj.className.concat(" " + Nom_classe);
     838         // Find which element provides position:relative for the target element (default to BODY)
     839
     840
     841  }else{
     842  return ;
     843  }
     844
     845//=============================================================================
     846Obj_init= Obj;
     847//jQuery(Obj).wrap("<div class='wrap' id='wrap_" + Obj.id + "' style='position:"+Obj.currentStyle.position+";margin:auto'></div>");
     848Init_fig= Obj.id ;
     849//cssText=Obj.style.cssText.split(";");
     850
     851//Obj.style.position="static";
     852s = Obj.currentStyle;
     853if (!s) return ;
     854    strokeWeight = Get_stokeWeight(s.borderWidth);
     855    strokeStyle  = Get_style(s.borderStyle);
     856    strokeColor  = Get_Color(s.borderColor);
     857
     858
     859    angle        = Get_angle(Obj);
     860    r            = Get_radius(Obj);
     861    radius=parseInt(r.r);
     862    top_left = parseInt(r.top_left) ;
     863    top_right = parseInt(r.top_right);
     864    bottom_right = parseInt(r.bottom_right);
     865    bottom_left =  parseInt(r.bottom_left);   
     866    alpha = s.opacity || 1;
     867
     868  Dimension[Obj.id] =  jQuery(Obj).findPos(); //
     869
     870init = false;
     871
     872/*=============================================================================*/
     873Fill_Src = "";
     874
     875    Fill_Color = translateColor(s.backgroundColor);
     876    Fill_Color = (Fill_Color=="transparent") ? "none" : Fill_Color ;
     877    if (Obj.tagName=="IMG")
     878    {
     879           Fill_Src = Obj.src.replace(/^url\("(.+)"\)$/, '$1');;
     880           Fill_Type="frame" ;
     881    }else{
     882            Fill_Src =s.backgroundImage.replace(/^url\("(.+)"\)$/, '$1');
     883
     884            if (Fill_Src)  Fill_Type= (s['type']) || "tile";
     885            else   Fill_Type = (s['type']) || "solid";
     886    }
     887//==============================================
     888    box_shadow = s['boxShadow'] || false ;
     889    text_shadow =s['textShadow'] || false ;
     890    S = Obj.innerHTML;
     891    texte=S ;
     892 
     893 reg=new RegExp('<img', "gi");
     894
     895if (Fill_Src=="none")
     896 if (reg.test(texte)) {
     897 
     898        var children = Obj.children ;
     899        var images = new Array();
     900    var i = 0;
     901        var child;
     902    var j = 0;
     903
     904        for (i=0;i<children.length;i++) {
     905                child = children[i];
     906        reg=new RegExp('img', "gi");
     907                if ( reg.test(child.tagName))
     908                        {
     909                Fill_W  =  child.width  ;
     910                Fill_H  =  child.height;
     911                id_img=Obj.id+"_img";
     912 
     913                Fill_Src=child.src;
     914 
     915                Obj.style.backgroundImage='url(' +Fill_Src+')';
     916                Obj.style.backgroundRepeat= 'repeat';
     917                Obj.style.backgroundPosition= child.currentStyle.left;
     918
     919                Obj.removeChild(child);
     920
     921
     922                jQuery(Obj).width(Fill_W );
     923                jQuery(Obj).height(Fill_H );
     924                s = Obj.currentStyle;
     925                break;
     926         }
     927
     928    }
     929}
     930       if (Obj.tagName=="IMG")
     931       {
     932
     933       
     934       }else{
     935         Fill_Src =s.backgroundImage.replace(/^url\("(.+)"\)$/, '$1');
     936            if (Fill_Src)  Fill_Type= (s['type']) || "tile";
     937                    else   Fill_Type = (s['type']) || "solid";
     938       }
     939        S = Obj.innerHTML;
     940        texte=S ;
     941          var argShadow = jQuery( Obj).getVariables(box_shadow);
     942            argShadow.gradientType= -1;
     943            argShadow.boxShadow= (argShadow.offset_h !=0) || (argShadow.offset_v !=0) ;
     944            argShadow.texteShadow=false;
     945            argShadow.texteRotation=false;
     946            argShadow.boxRotation= (argShadow.deg !=angle) ;
     947            argShadow.deg=angle;
     948          //  argShadow.offset_h +=200;
     949
     950   
     951          if (/import/.test(Obj.outerHTML)) return ;
     952
     953
     954       vmls = jQuery(Obj).aff_path(Obj,s,r) ;
     955      // Obj.innerHTML ="";
     956 
     957            if (Obj.tagName=="IMG")
     958       {
     959       var image=Obj ;
     960 object = image.parentNode;
     961
     962      var vml = document.createElement(['<div style="overflow:hidden;display:' + 'block' +
     963 ';width:' + Fill_W + 'px;height:' + Fill_H + 'px;padding:0;">'].join(''));
     964
     965        //vml.innerHTML = start + soft + head + fill + shadow + foot + right + bottom + top + left + lt + end;
     966        vml.innerHTML = vmls.Shape ;
     967     //   if (vmls.Shape)    Obj.innerHTML +=vmls.Shape;
     968
     969
     970                //vml.className = newClasses;
     971        vml.id="Clone";
     972                vml.style.cssText = image.style.cssText;
     973                vml.style.height = image.height+'px';
     974                vml.style.width = image.width+'px';
     975                vml.height = image.height;
     976                vml.width = image.width;
     977                vml.src = image.src;
     978        vml.alt = image.alt;
    164979     
    165980
    166          return ({
    167              'x': cur_width,
    168              'y': cur_height
    169          });
    170      }
    171 //==================================================
    172 function roundWebkit(e, s) {
    173     var radius = '' + s.sizex + 'px ' + s.sizey + 'px';
    174     var $e = jQuery(e);
    175     if (s.tl) $e.css('WebkitBorderTopLeftRadius', radius);
    176     if (s.tr) $e.css('WebkitBorderTopRightRadius', radius);
    177     if (s.bl) $e.css('WebkitBorderBottomLeftRadius', radius);
    178     if (s.br) $e.css('WebkitBorderBottomRightRadius', radius);
     981             daynight="n";
     982
     983          var html = vmls.Shape ;
     984          html +=  '<div  class="' + daynight + '"';
     985        var img_src = "http://l.yimg.com/a/i/us/nws/weather/gr/" + 10 + daynight + ".png";
     986
     987        html += '>';
     988        html += '<img src=' + img_src + ' />';
     989        html += '<span class="weatherTemp' + daynight + '" >Temp: ' + 30 + ' ' + "c" + '</span>';
     990
     991        html += '</div>';
     992       ;
     993        $(object).append(html);
     994
     995//  object.append(vml);
     996
     997  //   object.removeChild(image);
     998
     999
     1000 return ;
     1001 } 
     1002      if (!vmls) return ;
     1003     //  Obj.innerHTML="";
     1004     
     1005    if (vmls.Ombre)  Obj.innerHTML   +=  vmls.Ombre  ;
     1006
     1007    if (vmls.Shape)  {    Obj.innerHTML  +=vmls.Shape ; }
     1008
     1009   //  if (vmls.Texte)   Obj.innerHTML +=  vmls.Texte ;
     1010   
     1011       t1=jQuery("#"+Obj.id+"_Ombre").get(0);
     1012
     1013   //  jQuery( Obj).affFiltres( argShadow);
     1014  return ;
     1015
     1016       
     1017  Obj.innerHTML +=vmls.Shape;
     1018   
     1019 //NewObj=   Create_Obj(Obj);
     1020            return; 
     1021             
     1022 if ( NewObj)
     1023 jQuery(  NewObj).affFiltres( argShadow);
     1024              return; 
     1025         
     1026 
     1027              jQuery(Obj).aff_path(Obj,s,r) ;
     1028       
     1029return ;     
     1030
     1031
     1032/*
     1033
     1034
     1035
     1036//==============================================
     1037Obj_Src = jQuery(Obj).get(0);
     1038Obj_Src.innerHTML = vmls.Shape ;
     1039Obj_Src= jQuery('#'+ Init_fig).get(0);
     1040Init[Init_fig] = jQuery(Obj_Src).position();
     1041*/
     1042
     1043
     1044  $(Obj_Src).clone().insertBefore(".smallBox").attr("id",Obj.id+"_ombre");
     1045 var Ombre= jQuery("#"+Obj.id+"_ombre");
     1046 Ombre.css("left",Dimension[Obj.id].Left+200);
     1047 Ombre.css("top",Dimension[Obj.id].Top);
     1048 Ombre.get(0).innerHTML = vmls.ombre ;
     1049
     1050//==========================================================
     1051if (text_shadow || box_shadow) {
     1052 
     1053
     1054   return ;
     1055  // var Ombre= jQuery(Obj).clone(false).insertBefore(Obj).addClass("Ombre").attr("id",Obj.id+"_ombre").get(0);
     1056jQuery(Obj_Src).insertBefore(Obj_Src).addClass("Ombre").attr("id",Obj.id+"_ombre").get(0);
     1057    Ombre=jQuery('#'+ Init_fig+"_ombre").get(0);
     1058   
     1059 
     1060   ;
     1061      Ombre.innerHTML  = vmls.ombre;
     1062
     1063  Init[Ombre.id] = jQuery(Ombre).position();
     1064
     1065
     1066 if (text_shadow && Obj ) { 
     1067             nameId="" +  Obj.id  + "_Texte_Ombre"; 
     1068            obj_src=jQuery("#" +  nameId).get(0);
     1069            if (obj_src)
     1070                  aff_filter(obj_src, text_shadow, "text-shadow"); 
     1071   
     1072   }
     1073 
     1074 
     1075  if (box_shadow && Obj) {   
     1076      Ombre=jQuery("#" +  Obj.id  + "_ombre").get(0);
     1077      if ( Ombre)
     1078      {
     1079         
     1080
     1081
     1082            argShadow = jQuery(Obj).getVariables(box_shadow);
     1083            argShadow.alpha= alpha || 0.9;
     1084            argShadow.gradientType= 1;
     1085            argShadow.startColorStr= '#0000ff';
     1086            argShadow.endColorStr= '#ffe4e1';
     1087            argShadow.deg = 0  ;
     1088
     1089       jQuery(Obj).affFiltres( argShadow); //  aff_filter(obj_src,box_shadow, "box-shadow"); 
     1090         }
     1091 
    1791092  }
    180 //================================================== 
    181   function roundMozilla(e, s)
    182   { 
    183     var radius = '' + s.sizex + 'px';
    184     var $e = jQuery(e);
    185     if (s.tl) $e.css('-moz-border-radius-topleft', radius);
    186     if (s.tr) $e.css('-moz-border-radius-topright', radius);
    187     if (s.bl) $e.css('-moz-border-radius-bottomleft', radius);
    188     if (s.br) $e.css('-moz-border-radius-bottomright', radius); 
    189   }
    190 //=================================================================
    191      var rect_init;
    192      var css_init;
    193      var fill_init;
    194      //==============================================================
    195 
    196      // precompute "00" to "FF"
    197     var decToHex = [];
    198     var alpha = 1;
    199     var      init_x = 0;
    200     var init_y = 0;
    201     var  init_x0 =0;
    202     var  init_y0 = 0;
    203 //==============================================================
    204 function oncontentready(Obj) {
    205          //======== test si classe existe =============================
    206          classID= Obj.uniqueID;
    207          if (Obj.className.match(classID)) { return (false); }
    208          if (!document.namespaces.v+classID) { document.namespaces.add("v"+classID, "urn:schemas-microsoft-com:vml"); }
    209          Obj.className = Obj.className.concat(' ', classID);
    210          // Find which element provides position:relative for the target element (default to BODY)
    211  
    212         pos=jQuery(Obj).findPos();
    213         Left=pos.x;
    214         Top=pos.y;
    215         pos_src=jQuery(Obj.parentElement).findPos();
    216 
    217     var limit = 100, i = 0;
    218     var el = Obj; //(this) 
    219            style= el.currentStyle ;
    220          zindex = 3;
    221          var El_src = el.element;
    222 
    223          while ((typeof (El_src) != 'undefined') && (El_src.currentStyle.position != 'relative') && (El_src.tagName != 'BODY')) {
    224              El_src = El_src.parentElement;
    225              
    226              if (El_src.style.zIndex> zindex) zindex++;
    227              i++;
    228              if (i >= limit) { return (false); }
    229          }
    230        
    231 
    232          var el_zindex = parseInt(el.currentStyle.zIndex);
    233          if (isNaN(el_zindex)) { el_zindex = 3; }
    234          var m = el.children;
    235          for (i = 0; i < m.length; i++) {
    236              echild = m.item(i);
    237             echild.style.zIndex = el_zindex + 1  ;
    238          }
    239 
    240           Obj.style.zIndex = el_zindex+3 ;
    241      
    242 
    243          //=============================================================================       
    244 
     1093
     1094
     1095init=false ;
     1096
     1097texte_ombre=jQuery("#"+Init_fig+"_Texte" ).get(0);
     1098 
     1099
     1100if (mode==8)
     1101{
     1102 // transform(texte_ombre);
     1103 }else{
     1104 angle_1=angle;
     1105 angle=0;
     1106// transform(texte_ombre);
     1107  angle=angle_1;
     1108 }
     1109init=false ;
     1110 Vml=jQuery("#Vml_"+Init_fig ).get(0);
     1111// transform(Vml);
     1112
     1113//================================================================================
     1114/*
     1115 Obj=jQuery("#"+Init_fig).get(0);
     1116 Set_opacity(Obj);
     1117  Ombre=jQuery("#"+Init_fig+"_Ombre" ).get(0);
     1118  texte_ombre=jQuery("#"+Init_fig+"_Texte" ).get(0);
     1119  if (mode==8)
     1120  {
     1121 
     1122   transform(  texte_ombre);
     1123   }
     1124  transform(Ombre);
     1125 transform(Vml);
     1126
     1127 
     1128   transform(Obj_init);
    2451129   
    246          switch(Obj.currentStyle.borderWidth)
    247          {
    248          case 'solid':
    249             break;
    250          default:
    251          strokeWeight=parseInt(Obj.currentStyle.borderWidth);
    252              break;
    253          }
    254            
    255          switch(Obj.currentStyle.borderStyle)
    256          {
    257          case 'solid':
    258          strokeStyle=Obj.currentStyle.borderStyle;
    259             break;
    260         case 'double':
    261         strokeStyle=Obj.currentStyle.borderStyle;
    262             break;
    263 
    264          default:
    265          strokeStyle=Obj.currentStyle.borderStyle;
    266 
    267              break;
    268          }
    269 
    270          if (isNaN(strokeWeight)) {
    271              strokeWeight = 0;
    272              
    273          }
    274          stroked =( strokeWeight> 0);
    275          
    276 
    277          //================================================================================
    278          for (var i = 0; i < 16; i++) {
    279              for (var j = 0; j < 16; j++) {
    280                  decToHex[i * 16 + j] = i.toString(16) + j.toString(16);
    281              }
    282          }
    283          //==================================
    284          var fillColor = translateColor(Obj.currentStyle.backgroundColor);
    285          var strokeColor =  translateColor(Obj.currentStyle.borderColor);
    286  
    287 
    288          width=jQuery(Obj).width();
    289          height=jQuery(Obj).height();
    290               Width=(width+strokeWeight );
    291      Height=(height+strokeWeight);
    292 
    293          Left=parseInt(jQuery(Obj).css("left"));
    294          if (isNaN(Left)) Left=0 ;
    295          Top=parseInt(jQuery(Obj).css("top"));
    296            if (isNaN(Top)) Top=0 ;
    297    //=================================================================
    298            s = Obj.currentStyle;
    299 
    300          if (typeof s.transform != "undefined") {
    301              rotation = s['transform'];
    302              var angle1 = s.transform.split("rotate(");
    303              angle1 = angle1[1].split("deg)");
    304              angle = angle1[0];
    305          }
    306          //=================================================================
    307 
    308 
    309          var VgFillType = new Array("solid", "gradient", "gradientradial", "tile", "pattern", "frame");
    310          var VgFillmethod = new Array("none", "linear", "sigma", "any");
    311          var VgFillaspect = new Array("atless", "atmost")
    312 
    313 
    314          alpha = Obj.currentStyle['opacity'] || 1;
    315 
    316 
    317          var fillSrc = Obj.currentStyle.backgroundImage.replace(/^url\("(.+)"\)$/, '$1');
    318 
    319          if (fillSrc) var filltype = (Obj.currentStyle['type']) || "tile";
    320          else var filltype = (Obj.currentStyle['type']) || "gradientRadial";
    321   /*
    322          var fillopacity = alpha;
    323        
    324          var fillmethod = "none";
    325          var fillfocus = "100%";
    326 
    327          var fillcolor2 = "#00FF00";
    328          var fillcolors = "0,#ff0000, 0.5#00ff00, 0.6 #0000ff, 0.8 #ff0000, 0.9 #ff0000";
    329 
    330          var fillopacity2 = "1.0";
    331          var fillangle = "0";
    332          var fillfocusposition = "0.5,0.5";
    333          */
    334        
    335 
    336          //==================================================================================   
    337          radius = s['-moz-border-radius'];
    338 
    339 
    340          if (typeof radius == "undefined") { radius = "0" }
    341          if (typeof radius == undefined) { radius = "" }
    342                  
    343          if (radius.match("\/")) {
    344              //=============================================================
    345 
    346              var tableau = radius.split("/");
    347              var rect = document.createElement('v:oval');
    348              var typeelement="oval";
    349 
    350          } else {
    351                    if (radius.match("\ ")) {
    352           var tableau = radius.split(" ");
    353 
    354           }
    355 
    356   var tableau = radius.split(" "); 
    357       tableau = radius + " " + radius + " " +tableau[0] +" " + tableau[0] + " " + tableau[0];   
    358       tableau = tableau.split(" "); 
    359       top_left = parseInt(s['-moz-border-top-left-radius']||tableau[0]) ;
    360       top_right =  parseInt(s['-moz-border-top-right-radius']||tableau[1]);
    361       bottom_right =  parseInt(s['-moz-border-radius-radius']||tableau[2]);
    362       bottom_left =  parseInt(s['-moz-border-bottom-left-radius']||tableau[3]);       
    363 
    364 
    365      radius=tableau[0];
    366 //=============================================================
    367 if (parseInt(radius) != "0") {
    368     if (top_left!=top_right) {
    369           var typeelement="shape";
    370           var rect = document.createElement('v'+classID+':shape');     
    371 
    372        with(rect){
    373             fillColor = 'none';
    374             fillStroked = 'true';
    375              //   coordsize  = "100 , 100";
    376              //    coordSize  = "100 , 100";
    377                }
    378      
    379         rect.setAttribute("coordSize",Width + "," + Height); //mode7
    380  TL =top_left ;
    381  TR = top_right  ;
    382  BR = bottom_right ;
    383  BL =bottom_left ;
    384 
    385 
    386 
    387  var Origine ={ x: Width - TR, y:0} ;
    388  var TR_  ={ x: Width , y : 0 + TR} ;
    389  var L1 ={ x: Width , y:Height-BR} ;
    390  var BR_ ={ x: Width - BR, y:Height} ;
    391  var L2 ={ x:BL, y:Height} ;
    392  var BL_ ={ x:0 , y:Height-BL} ;
    393  var L3 ={ x:0 , y:TL} ;
    394  var TL_ ={ x:TL, y:0} ;
    395  var L4 ={ x: Width - TR, y:0} ;
    396 
    397  var path=" m "+ Origine.x +","+ Origine.y +
    398         " qx " + TR_.x + "," + TR_.y +
    399         " l  " + L1.x + "," + L1.y +
    400         " qy " + BR_.x + "," + BR_.y +
    401         " l " + L2.x + "," + L2.y +
    402         " qx "+ BL_.x + "," + BL_.y +
    403         " l " + L3.x + "," + L3.y +
    404         " qy "+ TL_.x + "," + TL_.y +
    405         " l " + L4.x + "," + L4.y +
    406         " x e";
    407     rect.path=path ;
    408 
    409  
    410     }   else {       
    411         var typeelement="roundrect";
    412         var rect = document.createElement('v'+classID+':roundrect');
    413         var arcSize = Math.min(parseInt(radius) / Math.min(Obj.offsetWidth, Obj.offsetHeight), 1);     
    414         rect.arcsize = arcSize + 'px';
    415         }
    416   } else {
    417                  var rect = document.createElement('v'+classID+':rect');
    418                  var typeelement="rect";
    419              }
    420 
    421          }
    422 
    423 
    424          /*===================================================================================*/
    425          var text_shadow = Obj.currentStyle['text-shadow'];
    426 
    427          var box_shadow = Obj.currentStyle['-moz-box-shadow'] ||
    428                    Obj.currentStyle['box-shadow'] ||
    429                    Obj.currentStyle['-webkit-box-shadow'] ||
    430                    Obj.currentStyle['-khtml-box-shadow'];
    431 
    432 
    433 
    434          if (text_shadow || box_shadow) {
    435              if (text_shadow) {
    436                  var sizeShadow = text_shadow.split(" ");
    437                  aff_filter(Obj, sizeShadow);
    438 
    439              }
    440 
    441 
    442              if (box_shadow) {
    443                  var sizeShadow = box_shadow.split(" ");
    444                  aff_filter(rect, sizeShadow)
    445              }
    446 
    447          }
    448          /*===================================================================================*/
    449 
    450          var fill = document.createElement('v'+classID+':fill');
    451 
    452          fill.src = fillSrc;
    453          fill.color = fillColor;
    454          fill.type = filltype;
    455      
    456 
    457 /*
    458          var fillopacity = alpha;
    459 if(fillopacity)      fill.opacity = fillopacity;
    460 
    461          var fillmethod = "none";
    462 if (fillmethod) fill.method = fillmethod;
    463 
    464          var fillfocus = "100%";
    465          var fillcolor2 = "#00FF00";
    466          var fillcolors = "0,#ff0000, 0.5#00ff00, 0.6 #0000ff, 0.8 #ff0000, 0.9 #ff0000";
    467             if (fillfocus) fill.focus = fillfocus;
    468             if (fillcolor2) fill.color2 = fillcolor2;
    469             if (fillcolors) fill.colors = fillcolors;
    470 
    471          var fillopacity2 = "1.0";
    472          var fillangle = "0";
    473          var fillfocusposition = "0.5,0.5";
    474             if (fillopacity2) fill.opacity2 = fillopacity2;
    475             if (fillangle) fill.angle = fillangle;
    476             if (fillfocusposition) fill.focusposition = fillfocusposition;
    477 
    478 */
    479               jQuery(rect).width(Width  );
    480               jQuery(rect).height(Height );
    481                
    482          rect.appendChild(fill);
    483 //================================================================
    484          with(rect.style){
    485                 left=Left+(0.5*strokeWeight);
    486                 top=Top+(0.5*strokeWeight);
    487                 position="absolute"
    488                 display = 'block';
    489                 antialias = true;
    490                 zindex = el_zindex+3;
    491 
    492              }
    493 //<v:stroke on="True" filltype="solid"
    494  //   color="#9094C9" weight="8pt" />
    495 //   filltype="pattern" src="rond.gif" />
    496 
    497 if (stroked) {
    498                     rect.strokecolor = strokeColor;
    499                     rect.strokeWeight = strokeWeight + 'px';
    500                     rect.stroked = stroked;
    501    }
    502         //================================================================
    503 document.body.appendChild(rect);
    504   var css =  document.createStyleSheet(); 
    505   var styleSheet = (document.styleSheets.length > 0) ? document.styleSheets[0] :  document.createStyleSheet();
    506         //  css = styleSheet;
    507 //if (stroked)  css.addRule('v'+classID+"\\:stroke" , "behavior: url(#default#VML)");
    508          css.addRule('v'+classID+"\\:"+typeelement, "behavior: url(#default#VML)");
    509          css.addRule('v'+classID+"\\:fill", "behavior: url(#default#VML)");
    510        //  css.addRule("v\\:*", "behavior: url(#default#VML)");
    511          //=================================================================   
    512    
    513        
    514 
    515           Obj.style.background =    'transparent';
    516           Obj.style.borderColor = 'transparent';
    517 
     1130
     1131   jQuery(Obj_init).css("borderWidth",2);
     1132   
     1133     */
     1134//==========================================================================
    5181135         isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
    5191136         // IE6 doesn't support transparent borders, use padding to offset original element
    520          if (isIE6 && (strokeWeight > 0)) {
     1137         if (isIE6 && (strokeWeight.Top > 0)) {
    5211138             Obj.style.borderStyle = 'none';
    522              Obj.style.paddingTop = parseInt(Obj.currentStyle.paddingTop || 0) + strokeWeight;
    523              Obj.style.paddingBottom = parseInt(Obj.currentStyle.paddingBottom || 0) + strokeWeight;
     1139             Obj.style.paddingTop = parseInt(Obj.currentStyle.paddingTop || 0) + strokeWeight.Top;
     1140             Obj.style.paddingBottom = parseInt(Obj.currentStyle.paddingBottom || 0) + strokeWeight.Bottom;
    5241141         }
    525 
    526 
    527    init_x = Left;
    528    init_y = Top;
    529    init_x0 = Left;
    530    init_y0 = Top;
    531 
    532         init_x  =parseInt(init_x)+strokeWeight;
    533         init_y = parseInt(init_y)+strokeWeight;
    534 
    535         init_x0  =parseInt(init_x);
    536         init_y0 = parseInt(init_y);
    537 
    538          Obj.vml = rect;
    539 
    540 //===============================================================================================
    541          if (typeof (window.rounded_elements) == 'undefined') {
    542              window.rounded_elements = new Array();
    543 
    544              if (typeof (window.onresize) == 'function') { window.previous_onresize = window.onresize; }
    545              window.onresize = window_resize;
    546          }
    547          window.rounded_elements[i]
    548          window.rounded_elements.push(Obj);
    549 
    550         // Resize(Obj.element);
    551          obj = Obj;
    552          init = false;
    553     transform(obj)
    554 
    555          Obj.attachEvent('onpropertychange', onPropertyChange);
    556      }
    557      //=====================================================================================
    558      var Curwidth = 0;
    559      var Curheight = 0;
    560 
    561      function Resize(obj) {
     1142//======================================================================================
     1143 if (typeof (window.rounded_elements) == 'undefined') {
     1144      window.rounded_elements = new Array();
     1145      if (typeof (window.onresize) == 'function') { window.previous_onresize = window.onresize; }
     1146        window.onresize = window_resize;
     1147
     1148 }
     1149 
     1150        if (typeof Vml!="undefined" ) {
     1151           window.rounded_elements.push(Vml);
     1152           Vml.attachEvent('onpropertychange', onPropertyChange);
     1153        }
     1154        if (Obj) {
     1155                window.rounded_elements.push(Obj);
     1156                Obj.attachEvent('onpropertychange', onPropertyChange);
     1157                }
     1158}
     1159//==================================================================
     1160function onResize(obj) {
     1161//transform(obj);
    5621162     return ;
    563 
    564          var h0 = 0;
    565          var strokeWeight = parseInt(obj.currentStyle.borderWidth);
    566          if (isNaN(strokeWeight)) { strokeWeight = 0; }
    567 
    568 
    569          Size = findSize(obj);
    570          //     obj.style.backgroundColor="green";
    571 
    572          pos = findPos(obj);
    573          var parent_pos = findPos(obj.vml.parentNode);
    574          //var position = $(obj).position();
    575          pos.y = pos.y + (0.5 * strokeWeight) - parent_pos.y;
    576          pos.x = pos.x + (0.5 * strokeWeight) - parent_pos.x;
    577          objvml = obj.vml;
    578          objvml.style.top = pos.y + 'px';
    579          objvml.style.left = pos.x + 'px';
    580 
    581          //===================================================
    582          if (Curwidth == 0) {
    583              OldWidth =  objvml.offsetWidth;
    584 
    585              OldHeight = objvml.offsetHeight;
    586              Curwidth = obj.offsetWidth - strokeWeight;
    587              Curheight =   obj.offsetHeight - strokeWeight;
    588  
    589          }
    590 
    591          objvml.style.width= Curwidth ;
    592          objvml.style.height=Curheight ;
    593 
    594      }
    595      //==================================================================================
    596      function window_resize() {
    597          if (typeof (window.rounded_elements) == 'undefined') { return (false); }
    598          if (typeof (handle) == 'undefined') { return (false); }
    599          old_handle = handle;
    600          old_angle = nangle;
    601          rotate(0, true)
    602          Curwidth = 0;
    603          for (var i in window.rounded_elements) {
     1163}
     1164//==================================================================
     1165function Resize(obj) {
     1166       
     1167//transform(obj);
     1168//jQuery(obj).width("100%");
     1169                Window.width = jQuery(window).width();
     1170                Window.height =  jQuery(window).height();
     1171
     1172          winit=jQuery(obj).width(); //  valeur interieur (auto,"",%)
     1173          hinit=jQuery(obj).height(); //  valeur interieur
     1174          if (winit==0) jQuery(obj).width(Window.width);
     1175          if (hinit==0) jQuery(obj).width(Window.height);
     1176     return ;
     1177}
     1178//==================================================================================
     1179function window_resize() {
     1180   if (typeof (window.rounded_elements) == 'undefined') { return (false); }
     1181   // return ;
     1182   //  rotate(0, true)
     1183   Curwidth = 0;
     1184   for (var i in window.rounded_elements) {
    6041185             Resize(window.rounded_elements[i]);
    605          }
    606 
    607          if (typeof (window.previous_onresize) == 'function') { window.previous_onresize(); }
    608          nangle = old_angle
    609          if (old_handle) toggleAnimation()
    610 
    611      }
    612      //=======================================================================================
    613 
    614      function aff_filter(obj, sizeShadow) {
    615      if (!obj) return ;
    616 
    617          if (typeof obj == "string") var s = document.getElementById(obj).style;
    618          else var s = obj.style;
    619          Blur = 0;
    620          ShadowColor = 0;
    621          Horizontal = sizeShadow[0];
    622          Vertical = sizeShadow[1];
    623          if (sizeShadow.length > 2) Blur = sizeShadow[2]; //radius
    624          if (sizeShadow.length > 3) ShadowColor = translateColor(sizeShadow[3]);
    625 
    626 
    627          direction = 180 - Math.atan((parseInt(Horizontal)) / (parseInt(Vertical))) * 180 / Math.PI;
    628          Strength = parseInt(Blur);
    629          couleur = ShadowColor;
    630 
    631          obj.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color =" + couleur + ",Direction =" + direction + ",Strength = " + Strength + ") ";
    632 
    633 
    634 
    635 
    636 
    637          return;
    638 
    639      }
    640 
     1186      }
     1187   if (typeof (window.previous_onresize) == 'function') { window.previous_onresize(); }
     1188    return ;
     1189}
     1190         
     1191//=======================================================================================
     1192function aff_filter(Obj, size_Shadow,type_element) {
     1193     if (!Obj) return ;
     1194   
     1195        argShadow=jQuery(Obj).getVariables(size_Shadow);
     1196        Blur =   argShadow.flou ;
     1197        ShadowColor =argShadow.couleur;
     1198        Horizontal = argShadow.offset_h  ;
     1199        Vertical =  argShadow.offset_v  ;
     1200
     1201       if ( Vertical==0) Vertical=1;
     1202        direction =  180 - Math.atan(Horizontal  / Vertical ) * 180 / Math.PI ;
     1203        Strength = parseInt(Blur);
     1204         
     1205        Obj_src=jQuery(Obj).get(0);
     1206
     1207 init=false ;
     1208     
     1209
     1210if (type_element=="text-shadow")  {
     1211
     1212if (mode==8){
     1213Obj_src.style.position="absolute";
     1214transform(Obj_src);   
     1215
     1216
     1217}
     1218
     1219Obj_src.style.color=  ShadowColor  ;
     1220}else {
     1221  transform(Obj_src);   
     1222}
     1223    name= Obj.tagName+ " " + Obj.id;
     1224    filtres=Obj_src.style.filter;
     1225
     1226//======================================================================================
     1227  sProperties =   "color="+ ShadowColor +", Direction="+direction+",Strength="+Strength/2 +" "  ;
     1228 if (!filtres.match("progid:DXImageTransform.Microsoft.Glow"))
     1229  filtres +=" progid:DXImageTransform.Microsoft.Glow("+sProperties+")" ; /**/
     1230 //======================================================================================
     1231
     1232  sProperties ="pixelradius="+Strength/2+" ,MakeShadow:"+'false'+",ShadowOpacity:"+'0.5' +"";
     1233 if (!filtres.match("progid:DXImageTransform.Microsoft.Blur"))
     1234      filtres += "  progid:DXImageTransform.Microsoft.Blur("+sProperties+") ";
     1235
     1236 
     1237 
     1238//============================================================
     1239 Obj_src.style.filter=filtres ;
     1240
     1241 return Obj_src;
     1242}
     1243//====================================================================================
     1244function Extract_Value(String,Start_Match,End_Match){
     1245       
     1246   var reg=new RegExp(Start_Match  , "gi");
     1247 var  string = String.toLowerCase() ;
     1248
     1249    if( reg.test(string)){
     1250        string=string.split(Start_Match);
     1251        string=string[1].split(End_Match)[0];
     1252        return Start_Match + string + End_Match ;
     1253    }
     1254     return String;
     1255}
     1256//====================================================================================
     1257function Sup_Bloc(String,Start_Match,End_Mach)
     1258{
     1259var n1=String;
     1260 var string=n1.toLowerCase();
     1261 var startmatch=Start_Match.toLowerCase();
     1262 var endmatch=End_Mach.toLowerCase();
     1263
     1264 while (p1 = string.indexOf(startmatch,0) >= 0 )
     1265                 {
     1266                   p1=string.indexOf(startmatch,0);
     1267                   p2=string.indexOf(endmatch,p1);
     1268                   p3=string.substring(p1,p2+endmatch.length);
     1269                   string=string.replace(p3,"");
     1270
     1271                   p3=n1.substring(p1,p2+endmatch.length);
     1272                   n1=n1.replace(p3,"");
     1273
     1274                }
     1275                n1=n1.replace("; ",";");
     1276                 n1=n1.replace("/t","");
     1277                n1=removeExtraSpace(n1) ;
     1278
     1279return n1;
     1280
     1281}
     1282
     1283
     1284//====================================================================================
     1285function Remplace_Value(String,Match,remplace){
     1286       
     1287
     1288if (typeof String!="string") csstext = String.style.cssText ;
     1289 else csstext = String ;
     1290
     1291//  HEIGHT: 50px; COLOR: red; text-shadow: blue 20px 20px 18px
     1292temp="";
     1293
     1294// removeExtraSpace
     1295csstext=removeExtraSpace( csstext);
     1296csstext = csstext.toLowerCase();
     1297reg=new RegExp(Match , "gi");
     1298string=csstext.split(Match);
     1299if (string.length>1 ) {
     1300    if (remplace) {
     1301        temp=string[1]+";" ;
     1302        string=temp.split(";");
     1303        string=Match+string[0];
     1304        temp=csstext.replace(string,remplace+" " );
     1305        }else{
     1306        temp=string.join(" ");
     1307
     1308        }
     1309   
     1310}else{
     1311  if (remplace)  temp = remplace + "; " + csstext;
     1312  else temp=  csstext;
     1313}
     1314
     1315 temp=removeExtraSpace(temp.replace(";;",";"));
     1316
     1317return temp;
     1318}
     1319//====================================================================================
     1320function Get_Value(String,Start_Match, Sep_Match,End_Mach){
     1321       
     1322
     1323if (typeof String!="string") csstext = String.style.cssText 
     1324else csstext = String 
     1325//  HEIGHT: 50px; COLOR: red; text-shadow: blue 20px 20px 18px
     1326
     1327var reg=new RegExp('"'  , "g");
     1328csstext=csstext.replace(reg,'') ;
     1329string=csstext.split(Start_Match + Sep_Match);
     1330
     1331reg=new RegExp(  End_Mach , "gi");
     1332
     1333ends=End_Mach.split('');
     1334string=string[1] ;
     1335valeur = "";
     1336for (t0 in ends)
     1337{
     1338reg = new RegExp(ends[t0] , "gi");
     1339    if (reg.test(string) ) {
     1340     valeur = string.split(ends[t0])[0];
     1341    break;
     1342    }
     1343}
     1344
     1345 
     1346
     1347return  removeExtraSpace( valeur +" "); ;
     1348}
     1349//====================================================================================
     1350function getClassValue(Obj,string){
     1351       
     1352        var temp = ""; var pos = string.length;
     1353      id=jQuery(Obj).attr("id") ;
     1354
     1355    if (!jQuery("#"+id).hasClass) return ;
     1356       var reg = new RegExp(id+"({)", "g");
     1357        temp=classes[id];
     1358        temp=classes["."+id];
     1359        temp=classes["#"+id];
     1360       
     1361        for (var j=0;j<classes.length;j++) {
     1362        p1=classes[j].indexOf(id );
     1363        if (classes[j].match(reg) ) {
     1364                   if (classes[j].indexOf(string)!= 0) {
     1365     
     1366                        temp = classes[j].split("{");
     1367            temp[1]=temp[1].replace("}","");
     1368         
     1369                        break; 
     1370            }
     1371                   }
     1372                }
     1373   
     1374        return temp;
     1375}
     1376
     1377function getClassAttribute(classes,string){
     1378       
     1379        var temp = 0; var pos = string.length;
     1380        for (var j=0;j<classes.length;j++) {
     1381                if (classes[j].indexOf(string) == 0) {
     1382                        temp = 1; break;
     1383                }
     1384        }
     1385        return temp;
     1386}
     1387//========================================
     1388function Add_Obj(Obj)
     1389{
     1390
     1391vmls = jQuery(Obj).aff_path(Obj,s,r) ;   
     1392
     1393
     1394        var vml;  var div; var pos; var i; var classes = '';
     1395        var display = ""; var flt = null; var width = null; var height = null;
     1396        var start, head, soft, shadow, fill, foot, end;
     1397        var left, top, bottom, right, lt, br, linear, inset;
     1398         
     1399    i=0;
     1400   // Nom_classe =  Prefix + "_" + classID ;
     1401                image = Obj;
     1402                 object = Obj.parentNode;
     1403
     1404         width =  Dimension[Obj.id].Width;
     1405         height = Dimension[Obj.id].Height;
     1406         Left=Dimension[Obj.id].Left;
     1407         Top=Dimension[Obj.id].Top;
     1408  //--------------------------------------------------------------------------
     1409display = (Obj.currentStyle.display.toLowerCase()=='block')?'block':'inline-block';
     1410vml = document.createElement('<div id="'+ Obj.id +'" '+
     1411' style="overflow:hidden' +
     1412'; position:absolute'+
     1413'; zoom:1'+
     1414'; zIndex:1'+
     1415'; left:'+Left+'px'+
     1416'; top:'+Top+'px'+
     1417 '; display:' + display +
     1418 '; width:' + width + 'px' +
     1419 '; height:' + height + 'px'+
     1420 '; border:1px solid blue'+
     1421 '; padding:0;">'
     1422 );
     1423 
     1424
     1425if (/import/.test(Obj.outerHTML)) {
     1426
     1427
     1428}else
     1429        try{   
     1430    //vml.className = newClasses;
     1431        /*      vml.style.cssText = Obj.style.cssText;
     1432                vml.style.height = height+'px';
     1433                vml.style.width = width+'px';
     1434*/
     1435       
     1436   
     1437
     1438
     1439        }catch(_){
     1440       
     1441        }
     1442
     1443
     1444Obj.innerHTML=vmls.Shape ;
     1445 
     1446
     1447var id=Obj.id;
     1448// object.replaceChild( vml,Obj);
     1449 
     1450
     1451   newObj=jQuery("#"+vml.id ).attr("id",id).get(0);
     1452 
     1453 return newObj ;
     1454}
     1455//***************************************************************************************
     1456if (0){
     1457        var theimages = getImages('img');// class name
     1458        var image; var object; var vml;  var div; var pos; var i;  classes = '';
     1459        var iradius = null; var ishadow = null; var ishade = null; var inverse = null;
     1460        var newClasses = ''; var maxdim = null; var offset = null; var radius = null;
     1461        var display = ""; var flt = null; var width = null; var height = null;
     1462        var start, head, soft, shadow, fill, foot, end;
     1463        var left, top, bottom, right, lt, br, linear, inset;
     1464         
     1465    i=0;
     1466
     1467                image = theimages[i];
     1468                object = image.parentNode;
     1469
     1470        width = image.width; height = image.height;
     1471  //--------------------------------------------------------------------------
     1472display = (image.currentStyle.display.toLowerCase()=='block')?'block':'inline-block';
     1473vml = document.createElement([
     1474'<var style="overflow:hidden;display:' + display +
     1475 ';width:' + width + 'px;height:' + height + 'px;padding:0;">'].join(''));
     1476flt = image.currentStyle.styleFloat.toLowerCase();
     1477
     1478display = (flt=='left'||flt=='right')?'inline':display;
     1479start = '<v:group style="zoom:1;'+
     1480        ' display:' + display + ';'+
     1481        ' margin:-1px 0 0 -1px;'+
     1482        ' padding:0;'+
     1483        ' position:absolute;'+
     1484        ' width:' + width + 'px;'+
     1485        ' height:' + height + 'px;'+
     1486        ' left:' + 300 + 'px;'+
     1487        ' top:' + 300 + 'px; '+
     1488        ' "'+
     1489        ' coordsize="' + width + ',' + height + '">';
     1490
     1491
     1492                fill = '<v:fill src="' + image.src + '" type="frame" />';
     1493                foot = (iradius>0?'</v:roundrect>':'</v:rect>');
     1494        end = '</v:group>';
     1495
     1496                soft = ''; shadow = ''; lt = ''; left = ''; top = ''; bottom = ''; right = '';
     1497
     1498iradius=28;
     1499ishadow=33 ;
     1500ishade=75;
     1501inverse=0;
     1502
     1503radius="30%";
     1504offset=14;
     1505maxdim = Math.min(_Width,_Height)/2;
     1506
     1507if(iradius<=0) {
     1508       
     1509        if (ishadow>0) {
     1510                if(inverse<=0) {
     1511                        ishadow = ishadow/50; offset = 8; inset = 4;
     1512                        soft = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:' + width + 'px;height:' + height + 'px;"><v:fill color="#ffffff" opacity="0.0" /></v:rect><v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="filter:Alpha(opacity=' + (ishadow*64) + '), progid:dxImageTransform.Microsoft.Blur(PixelRadius=' + inset + ', MakeShadow=false); zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:' + inset + 'px;left:' + inset + 'px;width:' + (width-(3*inset)) + 'px;height:' + (height-(3*inset)) + 'px;"><v:fill color="#000000" opacity="1" /></v:rect>';
     1513                                        head = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:' + (width-offset) + 'px;height:' + (height-offset) + 'px;">';
     1514                                }else if(inverse>0) {
     1515                                        ishadow = ishadow/50; iradius = 12; linear = "linear";
     1516                                        head = '<v:rect filled="t" stroked="t" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:' + width + 'px;height:' + height + 'px;">';
     1517                                        shadow = '<v:stroke weight="0.5" opacity="'+(ishadow/2)+'" color="#000000" />';
     1518                                        top = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + width + ',' + iradius + '" path="m 0,0 l '+width+',0,'+width+','+iradius+','+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + width + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" type="gradient" angle="0" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>';
     1519                                        left = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + iradius + ',' + height + '" path="m 0,0 l 0,'+height+','+iradius+','+height+','+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + iradius + 'px; height:' + height + 'px;"><v:fill method="' + linear + '" type="gradient" angle="90" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>';
     1520                                }
     1521                        }else {
     1522                                head = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="margin:-1px 0 0 -1px;padding:0;display:' + display + ';width:' + width + 'px;height:' + height + 'px;">';
     1523                        }
     1524                        if(ishade>0) {
     1525                                ishade = ishade/50; iradius = 12;
     1526                                top = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + (width-offset) + ',' + iradius + '" path="m 0,0 l '+(width-offset)+',0,'+(width-offset)+','+iradius+','+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + (width-offset) + 'px; height:' + iradius + 'px;"><v:fill method="linear" type="gradient" angle="0" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>';
     1527
     1528                                left = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + iradius + ',' + (height-offset) + '" path="m 0,0 l 0,'+(height-offset)+','+iradius+','+(height-offset)+','+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + iradius + 'px; height:' + (height-offset) + 'px;"><v:fill method="linear" type="gradient" angle="90" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>';
     1529
     1530                                bottom = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + (width-offset) + ',' + iradius + '" path="m 0,'+iradius+' l '+(width-offset)+','+iradius+','+(width-offset-iradius)+',0,'+iradius+',0 x e" style="position:absolute; margin: 0; top:' + (height-offset-iradius) + 'px; left: 0px; width:' + (width-offset) + 'px; height:' + iradius + 'px;"><v:fill method="linear" type="gradient" angle="180" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishade + '" /></v:shape>';
     1531
     1532                                right = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + iradius + ',' + (height-offset) + '" path="m '+iradius+',0 l '+iradius+','+(height-offset)+',0,'+(height-offset-iradius)+',0,'+iradius+' x e" style="position:absolute; margin: 0; top: 0px; left:' + (width-offset-iradius) + 'px; width:' + iradius + 'px; height:' + (height-offset) + 'px;"><v:fill method="linear" type="gradient" angle="270" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishade + '" /></v:shape>';
     1533
     1534                        }
     1535               
     1536                } else {
     1537                        if(ishadow>0) {
     1538                                linear = "linear sigma"; pos = 2;
     1539                                if(inverse<=0) {
     1540                                        ishadow = ishadow/50; inset = Math.round(offset*0.5);
     1541                                        soft = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:' + width + 'px;height:' + height + 'px;"><v:fill color="#ffffff" opacity="0.0" /></v:rect><v:roundrect arcsize="' + (radius+inset) + '" strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="filter:Alpha(opacity=' + (ishadow*64) + '), progid:dxImageTransform.Microsoft.Blur(PixelRadius=' + inset + ', MakeShadow=false); zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:' + inset + 'px;left:' + inset + 'px;width:' + (width-(3*inset)) + 'px;height:' + (height-(3*inset)) + 'px;"><v:fill color="#000000" opacity="1" /></v:roundrect>';
     1542                                        head = '<v:roundrect arcsize="' + radius + '" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:' + (width-offset) + 'px;height:' + (height-offset) + 'px;">';
     1543                                }else if(inverse>0) {
     1544                                        ishadow = ishadow/50;
     1545                                        head = '<v:roundrect arcsize="' + radius + '" filled="t" stroked="t" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:' + width + 'px;height:' + height + 'px;">';
     1546                                        shadow = '<v:stroke weight="0.5" opacity="'+(ishadow/2)+'" color="#000000" />';
     1547                                        top = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + width + ',' + iradius + '" path="m '+iradius+','+iradius+' l '+width+','+iradius+' qy '+(width-iradius)+',0 l '+iradius+',0 x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: -1px; width:' + (width+1) + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" type="gradient" angle="0" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>';
     1548                                        left = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + iradius + ',' + height + '" path="m 0,'+iradius+' l 0,'+(height-iradius)+' qy '+iradius+','+height+' l '+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: -1px; left: 0px; width:' + iradius + 'px; height:' + (height+1) + 'px;"><v:fill method="' + linear + '" type="gradient" angle="90" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>';
     1549                                        lt = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + iradius + ',' + iradius + '" path="m '+iradius+','+iradius+' l 0,'+iradius+' qy '+iradius+',0 l '+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + iradius + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" focus="1" focusposition="1,1" focussize="0.5,0.5" type="gradientradial" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>';
     1550                                }
     1551                        }else {
     1552                                pos = 1; offset = 0;
     1553                                head = '<v:roundrect arcsize="' + radius + '" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:' + width + 'px;height:' + height + 'px;">';
     1554                        }
     1555                        if(ishade>0) {
     1556                                ishade = ishade/50; linear = "linear";
     1557                                top = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + (width-offset) + ',' + iradius + '" path="m '+iradius+','+iradius+' l '+(width-offset)+','+iradius+' qy '+(width-offset-iradius)+',0 l '+iradius+',0 x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: -1px; width:' + (width-offset+pos) + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" type="gradient" angle="0" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>';
     1558                                left = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + iradius + ',' + (height-offset) + '" path="m 0,'+iradius+' l 0,'+(height-iradius-offset)+' qy '+iradius+','+(height-offset)+' l '+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: -1px; left: 0px; width:' + iradius + 'px; height:' + (height-offset+pos) + 'px;"><v:fill method="' + linear + '" type="gradient" angle="90" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>';
     1559                                lt = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + iradius + ',' + iradius + '" path="m '+iradius+','+iradius+' l 0,'+iradius+' qy '+iradius+',0 l '+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + iradius + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" focus="1" focusposition="1,1" focussize="0.5,0.5" type="gradientradial" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>';
     1560                        }
     1561                }
     1562               
     1563                vml.innerHTML = start + soft + head + fill + shadow + foot + right + bottom + top + left + lt + end;
     1564                //vml.className = newClasses;
     1565                vml.style.cssText = image.style.cssText;
     1566                vml.style.height = image.height+'px';
     1567                vml.style.width = image.width+'px';
     1568                vml.height = image.height;
     1569                vml.width = image.width;
     1570                vml.src = image.src;
     1571        vml.alt = image.alt;
     1572
     1573
     1574    //    object.replaceChild(vml,image);
     1575
     1576//  object.appendChild(vml);
     1577 
     1578 // object.removeChild(image);
     1579
     1580
     1581}
     1582
     1583//====================================================================================
     1584function getImages(className){
     1585        var children = document.getElementsByTagName('img');
     1586        var elements = new Array(); var i = 0;
     1587        var child; var classNames; var j = 0;
     1588        for (i=0;i<children.length;i++) {
     1589                child = children[i];
     1590                classNames = child.className.split(' ');
     1591                for (  j = 0; j < classNames.length; j++) {
     1592                        if (classNames[j] == className) {
     1593                                elements.push(child);
     1594                                break;
     1595                        }
     1596                }
     1597        }
     1598        return elements;
     1599}
     1600//================================ Excanvas ==========================================
    6411601     function hasSilverlight() {
    6421602         try {
     
    6471607         }
    6481608     }
    649 
     1609     //--------------------------------------------------------------------------
    6501610     function getRgbHslContent(styleString) {
    6511611         var start = styleString.indexOf('(', 3);
     
    6601620         return parts;
    6611621     }
    662 
     1622     //--------------------------------------------------------------------------
    6631623     function percent(s) {
    6641624         return parseFloat(s) / 100;
    6651625     }
    666 
     1626     //--------------------------------------------------------------------------
    6671627     function clamp(v, min, max) {
    6681628         return Math.min(max, Math.max(min, v));
    6691629     }
    670 
     1630     //--------------------------------------------------------------------------
    6711631     function hslToRgb(parts) {
    6721632         var r, g, b, h, s, l;
     
    6901650         decToHex[Math.floor(b * 255)];
    6911651     }
    692 
     1652     //--------------------------------------------------------------------------
    6931653     function hueToRgb(m1, m2, h) {
    6941654         if (h < 0)
     
    7061666             return m1;
    7071667     }
    708      function hexToDec(hex) {
    709          return parseInt(hex, 16);
    710      }
    711 
    712 
     1668     //--------------------------------------------------------------------------
     1669   
    7131670     function translateColor(styleString) {
    7141671         var str;
    7151672         var n = 0;
    716 
    717 
    718          styleString = String(styleString);
    719          if (styleString.charAt(0) == '#') {
    720              styleString = (styleString + "00000000").substring(0, 7);
    721 
    722              return styleString;
    723          } else if (/^rgb/.test(styleString)) {
    724              var parts = getRgbHslContent(styleString);
    725              var str = '', n;
     1673        var exp = new RegExp(/^#/);
     1674
     1675         style_String = jQuery.trim(String(styleString));
     1676         if (exp.test(style_String)) {
     1677                  return style_String;
     1678             } else if (/^rgb/.test(style_String)) {
     1679             parts = getRgbHslContent(style_String);
     1680             str = '', n;
    7261681             for (var i = 0; i < 3; i++) {
    7271682                 if (parts[i].indexOf('%') != -1) {
     
    7341689
    7351690             alpha = parts[3];
    736          } else if (/^hsl/.test(styleString)) {
    737              var parts = getRgbHslContent(styleString);
     1691         } else if (/^hsl/.test(style_String)) {
     1692            parts = getRgbHslContent(style_String);
    7381693             str = hslToRgb(parts);
    7391694             alpha = parts[3];
    740          } else if (styleString in colorData) {
    741              var exp = new RegExp(/^#/);
     1695         } else if (style_String in colorData) {
     1696         
    7421697
    7431698             return colorData[styleString];
    7441699
    745 
    746 
     1700          } else if ( !isNaN(style_String)) {
     1701
     1702           return translateColor("#"+style_String);
    7471703         } else {
    7481704
    7491705
    750              return styleString;
     1706             return style_String;
    7511707
    7521708
     
    7551711         return '#' + str;
    7561712     }         
    757  
     1713         
     1714         
     1715    //--------------------------------------------------------------------------
    7581716      var colorData = {
    7591717         aliceblue: '#F0F8FF',
     
    7641722         bisque: '#FFE4C4',
    7651723         black: '#000000',
     1724         blue:'#0000FF',
    7661725         blanchedalmond: '#FFEBCD',
    7671726         blueviolet: '#8A2BE2',
     
    8091768         grey: '#808080',
    8101769         greenyellow: '#ADFF2F',
     1770         green: '#00FF00',
    8111771         honeydew: '#F0FFF0',
    8121772         hotpink: '#FF69B4',
     
    8871847         wheat: '#F5DEB3',
    8881848         whitesmoke: '#F5F5F5',
    889          yellowgreen: '#9ACD32'
     1849         yellowgreen: '#9ACD32',
     1850         yellow: '#FFFF00'
    8901851     };
    891 //=====================================================================
    892 // Ajoute une fonctionnalité jQuery
    893 jQuery.extend(jQuery.expr[':'], {
    894         // Nom du sélecteur personnalisé
    895         Radius: function (a) {
    896             if (!jQuery.browser.msie) return;
    897 
    898     s= a.currentStyle;
    899            var moz = s['-moz-border-radius'] !== undefined   ;
    900             var webkit = s['-webkit-border-radius'] !== undefined;
    901             var radius = s['border-radius'] !== undefined ||s['border-Radius'] !== undefined || s['Border-Radius'] !== undefined;
    902 
    903             var mode = document.documentMode || 0;
    904             var noBottomFold = jQuery.browser.msie && ((jQuery.browser.version < 8 && !mode) || mode < 8);
    905 
    906             // Eléments correspondant
    907        Attribut = s[radius ? 'border-radius' : moz ? '-moz-border-radius' : '-webkit-border-radius'];
    908             if (Attribut != undefined) {
    909                 jQuery(a).crossbrowser(a);
    910                  
    911             }
    912             return false;
    913 
    914         }
    915     });
     1852    //--------------------------------------------------------------------------
     1853
     1854     function hexToDec(hex) {
     1855         return parseInt(hex, 16);
     1856     } 
     1857    for (i = 0; i < 16; i++) {
     1858             for (var j = 0; j < 16; j++) {
     1859                 decToHex[i * 16 + j] = i.toString(16) + j.toString(16);
     1860             }
     1861    }   
     1862   //=====================================================================
     1863   function copyState(o1, o2) {
     1864   o2.style=o1.style ;
     1865         o2.fillStyle = o1.fillStyle;
     1866         o2.lineCap = o1.lineCap;
     1867         o2.lineJoin = o1.lineJoin;
     1868         o2.lineWidth = o1.lineWidth;
     1869         o2.miterLimit = o1.miterLimit;
     1870         o2.shadowBlur = o1.shadowBlur;
     1871         o2.shadowColor = o1.shadowColor;
     1872         o2.shadowOffsetX = o1.shadowOffsetX;
     1873         o2.shadowOffsetY = o1.shadowOffsetY;
     1874         o2.strokeStyle = o1.strokeStyle;
     1875         o2.globalAlpha = o1.globalAlpha;
     1876         o2.font = o1.font;
     1877         o2.textAlign = o1.textAlign;
     1878         o2.textBaseline = o1.textBaseline;
     1879         o2.arcScaleX_ = o1.arcScaleX_;
     1880         o2.arcScaleY_ = o1.arcScaleY_;
     1881         o2.lineScale_ = o1.lineScale_;
     1882     }
     1883//================================================================================
     1884
     1885     // alias some functions to make (compiled) code shorter
     1886     var m = Math;
     1887     var mr = m.round;
     1888     var ms = m.sin;
     1889     var mc = m.cos;
     1890     var abs = m.abs;
     1891     var sqrt = m.sqrt;
     1892
     1893     // this is used for sub pixel precision
     1894     var Z = 10;
     1895     var Z2 = Z / 2;
     1896
     1897
     1898function createMatrixIdentity() {
     1899         return [
     1900       [1, 0, 0],
     1901       [0, 1, 0],
     1902       [0, 0, 1]
     1903     ];
     1904     }
     1905
     1906function getContext() {
     1907         return this.context_ ||
     1908         (this.context_ = new CanvasRenderingContext2D_(this));
     1909     }
     1910
     1911function CanvasRenderingContext2D_(canvasElement) {
     1912         this.m_ = createMatrixIdentity();
     1913
     1914         this.mStack_ = [];
     1915         this.aStack_ = [];
     1916         this.currentStringPath_ = [];
     1917
     1918         // Canvas context properties
     1919         this.strokeStyle = '#000';
     1920         this.fillStyle = '#000';
     1921
     1922         this.lineWidth = 1;
     1923         this.lineJoin = 'miter';
     1924         this.lineCap = 'butt';
     1925         this.miterLimit = Z * 1;
     1926         this.globalAlpha = 1;
     1927         this.font = '10px sans-serif';
     1928         this.textAlign = 'left';
     1929         this.textBaseline = 'alphabetic';
     1930         this.canvas = canvasElement;
     1931
     1932         var cssText = 'width:' + canvasElement.clientWidth + 'px;height:' +
     1933         canvasElement.clientHeight + 'px;overflow:hidden;position:absolute';
     1934
     1935         var el = canvasElement.ownerDocument.createElement('div');
     1936
     1937         el.style.cssText = cssText;
     1938         canvasElement.appendChild(el);
     1939
     1940         var overlayEl = el.cloneNode(false);
     1941         // Use a non transparent background.
     1942         overlayEl.style.backgroundColor = 'red';
     1943         overlayEl.style.filter = 'alpha(opacity=0)';
     1944         canvasElement.appendChild(overlayEl);
     1945
     1946         this.element_ = el;
     1947         this.currentPath_ = "";
     1948         this.arcScaleX_ = 1;
     1949         this.arcScaleY_ = 1;
     1950         this.lineScale_ = 1;
     1951     }
     1952
     1953//==================================================================================
     1954var G_vmlCanvasManager_ = {
     1955         init: function (opt_doc) {
     1956             var doc = opt_doc || document;
     1957             // Create a dummy element so that IE will allow canvas elements to be
     1958             // recognized.
     1959             doc.createElement('canvas');
     1960             doc.attachEvent('onreadystatechange', bind(this.init_, this, doc));
     1961         },
     1962
     1963         init_: function (doc) {
     1964             // find all canvas elements
     1965             var els = doc.getElementsByTagName('canvas');
     1966             for (var i = 0; i < els.length; i++) {
     1967                 this.initElement(els[i]);
     1968             }
     1969         },
     1970
     1971         /**
     1972         * Public initializes a canvas element so that it can be used as canvas
     1973         * element from now on. This is called automatically before the page is
     1974         * loaded but if you are creating elements using createElement you need to
     1975         * make sure this is called on the element.
     1976         * @param {HTMLElement} el The canvas element to initialize.
     1977         * @return {HTMLElement} the element that was created.
     1978         */
     1979         initElement: function (el) {
     1980             if (!el.getContext) {
     1981                 el.getContext = getContext;
     1982
     1983                 // Add namespaces and stylesheet to document of the element.
     1984               //  addNamespacesAndStylesheet(el.ownerDocument);
     1985
     1986                 // Remove fallback content. There is no way to hide text nodes so we
     1987                 // just remove all childNodes. We could hide all elements and remove
     1988                 // text nodes but who really cares about the fallback content.
     1989           //      el.innerHTML = '';
     1990
     1991                 // do not use inline function because that will leak memory
     1992                 el.attachEvent('onpropertychange', onPropertyChange);
     1993                 el.attachEvent('onresize', onResize);
     1994
     1995                 var attrs = el.attributes;
     1996                 if (attrs.width && attrs.width.specified) {
     1997                     // TODO: use runtimeStyle and coordsize
     1998                     // el.getContext().setWidth_(attrs.width.nodeValue);
     1999                     el.style.width = attrs.width.nodeValue + 'px';
     2000                 } else {
     2001                     el.width = el.clientWidth;
     2002                 }
     2003                 if (attrs.height && attrs.height.specified) {
     2004                     // TODO: use runtimeStyle and coordsize
     2005                     // el.getContext().setHeight_(attrs.height.nodeValue);
     2006                     el.style.height = attrs.height.nodeValue + 'px';
     2007                 } else {
     2008                     el.height = el.clientHeight;
     2009                 }
     2010                 //el.getContext().setCoordsize_()
     2011             }
     2012             return el;
     2013         }
     2014     };
     2015
     2016
    9162017 //==============================================================================
    9172018jQuery.fn.extend({
     2019
     2020
     2021aff_path: function (Obj_src,s,r ){
     2022if (Obj_src.tagName=="BODY")
     2023 return ;
     2024 if (Obj_src.tagName=="A")
     2025 return ;
     2026 //========================================
     2027 s = Obj_src.currentStyle;
     2028
     2029
     2030      if (mode==7)
     2031      {
     2032      correct={x:0,y:0};
     2033      }
     2034      else
     2035      {
     2036        correct={x:0,y:0};
     2037      }
     2038
     2039
     2040    //==================== width:300px;height:200px; /* interieur */==================================
     2041        _Width  =   Dimension[Obj_src.id].Width   ; 
     2042        _Height =   Dimension[Obj_src.id].Height ; 
     2043        _Left   =   Dimension[Obj_src.id].Left+  (strokeWeight.Left/2  ) ;  ;
     2044        _Top    =    Dimension[Obj_src.id].Top  + (strokeWeight.Top/2 ) ;;
     2045 
     2046    //==========================================================
     2047    var typeelement="";
     2048   path=Set_Path(r,_Width,_Height );
     2049   Path=path.Path;
     2050   typeelement=path.typeelement;
     2051  if ( path.typeelement=='no') return ;;
     2052   CoordSize=path.CoordSize;
     2053 var  coordorigin=path.CoordOrigin;
     2054
     2055    font=[];
     2056    var reg=new RegExp('(")', "g");
     2057 var   background=[];
     2058
     2059    for (i in s)
     2060    {
     2061  name = i.replace(rupper, "-$1").toLowerCase()
     2062    if (i.match("font")||i.match("background"))
     2063    {
     2064 variable= s[i]  ;
     2065
     2066   if (i.match("Color")) { variable = translateColor(variable); }
     2067   if (i.match("Size"))    variable = jQuery(Obj_src).css(i);
     2068
     2069
     2070        if (i.match("font"))   font.push(   variable );
     2071   //  if (i.match("background"))  background.push(  name +  ":" + variable + "; ");
     2072 
     2073        }
     2074
     2075    }
     2076         background = background.join( ' ').replace(reg,"") ;
     2077         font = font.join( ' ').replace(reg,"") ;
     2078    filled= (Fill_Color!="none") || (Fill_Src!="none") ;
     2079    filtre = Obj_src.style.filter ;
     2080
     2081     ;
     2082    //==================================================================
     2083    Options.style={};
     2084    Options.stroke={};
     2085    Options.fill={};
     2086    Options.shape={};
     2087
     2088
     2089
     2090    Options.style={   
     2091        position:"absolute",
     2092        width: _Width+'px'   ,
     2093        height: _Height+'px'  ,
     2094        font  : font ,
     2095        display : 'block',
     2096        antialias: 'true',
     2097        overflow: 'visible',
     2098        color:jQuery(Obj_src).css("color"),
     2099        padding:jQuery(Obj_src).css("padding"),
     2100        zoom:'1'
     2101    }
     2102
     2103
     2104
     2105        Options.style.left= _Left+correct.x+"px";
     2106        Options.style.top=_Top+correct.y+"px";
     2107
     2108        Options.element= typeelement;
     2109
     2110
     2111    //====================== STROKE =============================
     2112 
     2113    stroked = (strokeColor.Top != "none") && (strokeWeight.Top!=0)  ;
     2114
     2115    var  fn="none";
     2116    var tile="frame";
     2117
     2118    if (!stroked) {
     2119        strokeColor.Left="none" ;
     2120        strokeColor.Top="none" ;
     2121        strokeColor.Bottm="none" ;
     2122        strokeColor.Right="none" ;
     2123    };
     2124
     2125    Options.stroke={   
     2126    }
     2127     opacity= alpha|0.99;
     2128
     2129   Fill_Type=Fill_Type || "tile";
     2130    Options.fill={   
     2131         //  opacity obligatoire
     2132       opacity:alpha-0.01 ,
     2133       src: Fill_Src,
     2134       type : Fill_Type 
     2135    }
     2136    //==================================================================
     2137    Options.shape={
     2138        id: Obj_src.id+"_Shape" ,
     2139        path:Path ,
     2140        stroked : stroked ,
     2141     
     2142        strokecolor : strokeColor.Left,
     2143        strokelinestyle :  strokeStyle.Left ,
     2144        strokeweight : strokeWeight.Left+'px'  ,
     2145 
     2146        coordorigin: coordorigin,
     2147        coordSize: CoordSize,
     2148
     2149
     2150        FillColor:Fill_Color ,        //  Defines the brush color that fills the closed path of a shape. 
     2151        filled: (Fill_Color != "none")  || (Fill_Src!="none") ,  //  Determines whether the closed path will be filled.         
     2152        style:  Set_Value_to_str(Options.style,":",";")
     2153    }
     2154     
     2155    //============================================================================
     2156    //<textbox string="VML text" layout-flow="vertical"/>
     2157    Options.textbox={   
     2158        string : texte,
     2159        'layout-flow':"vertical"
     2160    }     
     2161
     2162    Options.group={   
     2163             
     2164
     2165    } 
     2166
     2167    //====================================================================
     2168  var  vml_str=[];
     2169 
     2170    vml_str.push(  Set_Shape(Nom_classe,Options) );
     2171    vml_str.push(  Set_Fill( Nom_classe,Options )  );
     2172    //   vml_str.push(  Set_Stroke( Nom_classe,Options )  );
     2173     vml_str.push("<div style='line-height:"+Obj_src.currentStyle.lineHeight+"'>" + texte + "</div>"  );
     2174  //     vml_str.push(Set_textbox( Nom_classe,Options )  );
     2175 
     2176//================================================================
     2177//--- ajout du texte ---
     2178
     2179  l0=0  ;
     2180  t0=0  ;
     2181  texte= jQuery( Obj_src).text(); ;
     2182  fils  = Obj_src.childNodes ;
     2183  texte_couleur_ombre="";
     2184//==========================================================   
     2185  vml_texte=[];
     2186 if (texte!="") {
     2187texte=S;
     2188    if (text_shadow)  {
     2189     var argShadow= jQuery(Obj_src).getVariables(text_shadow);
     2190   jQuery.each(Obj_src.childNodes, function (i, val) {
     2191        if (val.nodeType!=3) val.id=val.id+"_"+i ;
     2192                jQuery.each(val.childNodes, function (i, val) {
     2193                 if (val.nodeType!=3) val.id=val.id+"_"+i ;
     2194                });
     2195
     2196            })
     2197
     2198
     2199        l0= argShadow.offset_v -argShadow.flou;
     2200        t0= argShadow.offset_h -argShadow.flou;
     2201        l0=0;
     2202        t0=0;
     2203 
     2204        vml_texte.push('<div id="' +  Obj_src.id  + '_Texte_Ombre" style=" '+
     2205        'padding:' + strokeWeight.Top + 'px ;  '+ ' '+
     2206        'position:absolute;left:'+ l0 +'px ; top:'+ t0 +'px;  ">'+ texte +"</div>") ;
     2207   
     2208//=======================================================================   
     2209
     2210 vml_texte.push('<div id="' +  Obj_src.id  + '_Texte" style=" '+
     2211    'padding:' + strokeWeight.Top + 'px ; '+
     2212     'position:absolute; '+
     2213    'left:-'+ l0+'px ; top:'+ l0+'px;  ">' + texte +"</div>" );   
     2214   
     2215
     2216    }
     2217//=======================================================================   
     2218
     2219     
     2220 
     2221
     2222   
     2223  if(argShadow)  texte_couleur_ombre=argShadow.couleur;
     2224
     2225  }
     2226
     2227//==================================================
     2228 var  vml_Ombre=[];;
     2229 if (box_shadow)  {
     2230    argShadow= jQuery(Obj_src).getVariables(box_shadow);
     2231        vml_Ombre=[];
     2232        Options.shape.id=Obj_src.id + "_Ombre";
     2233        Options.shape.FillColor=argShadow.couleur;
     2234        Options.shape.filled=true;
     2235        Options.stroke.color=argShadow.couleur;
     2236        Options.fill.src="none";
     2237        Options.fill.type="solid";
     2238          /*
     2239        Options.stroke.weight="0px"; 
     2240        Options.style.padding="0px";
     2241        Options.style.background="transparent";
     2242        Options.style.position="absolute";
     2243        Options.style.padding="0px"; 
     2244        Options.style.left="-100px";
     2245        Options.style.top="0px";
     2246*/
     2247  //  Obj_init.style.padding="0px";
     2248 
     2249  //  Obj_init.style.marginLeft=Dimension[Obj_init.id].Left+argShadow.offset_v|0+"px";
     2250  //  Obj_init.style.marginTop=Dimension[Obj_init.id].Top+argShadow.offset_h|0+"px";
     2251 
     2252    // Options.stroke.weight="0px"; 
     2253    l0=argShadow.flou-argShadow.offset_v ;
     2254    t0=argShadow.flou-argShadow.offset_h ;
     2255    Options.shape.coordorigin= l0 + " , " + t0 ;
     2256    vml_Ombre.push(  Set_Shape(Nom_classe,Options) );
     2257    vml_Ombre.push(  Set_Fill( Nom_classe,Options )  );
     2258    vml_Ombre.push(  Set_Stroke( Nom_classe,Options )  );
     2259   vml_Ombre.push(  Set_end_Shape( Nom_classe,Options) );
     2260
     2261 
     2262 }
     2263    //============================================================
     2264     
     2265vml_Ombre= vml_Ombre.join(" ") ;
     2266vml_texte=vml_texte.join(" ") ; 
     2267   vml_str.push(   Set_end_Shape( Nom_classe,Options) );
     2268vml_str= vml_str.join(" ") ; 
     2269
     2270 jQuery("#"+Obj_src.id).css("backgroundColor","transparent");
     2271
     2272
     2273/* */
     2274   if (texte_couleur_ombre)
     2275  jQuery("#"+Obj_src.id+"_Texte_Ombre").css("color",texte_couleur_ombre);
     2276  ret={};
     2277
     2278  return { ombre:vml_Ombre, Shape:vml_str,Texte:vml_texte};
     2279
     2280},
     2281//------------------------------------------------------------------------
     2282rotate:  function ( deg) {
     2283
     2284    obj_str=jQuery(this);
     2285    obj=obj_str.get(0);
     2286if (!obj) return ;
     2287
     2288
     2289     if (typeof obj_str != "string") obj = jQuery(obj_str).get(0);
     2290        else obj = jQuery("#"+obj_str).get(0);
     2291
     2292        if (!externe) {
     2293           angle=deg;
     2294
     2295            jQuery(obj).affFiltres( argShadow);
     2296
     2297        } else {
     2298
     2299            //===========================================================
     2300            boxShadow = jQuery(obj).css("box-shadow");
     2301
     2302
     2303 var argShadow = jQuery(obj).getVariables(boxShadow);
     2304           
     2305            argShadow.gradientType= -1;
     2306            argShadow.boxShadow= (argShadow.offset_h !=0) || (argShadow.offset_v !=0) ;
     2307
     2308            argShadow.texteShadow=false;
     2309            argShadow.texteRotation=false;
     2310
     2311             argShadow.boxRotation= (argShadow.deg !=deg) ;
     2312             argShadow.deg=deg;
     2313
     2314          //   argShadow.offset_h +=200;
     2315
     2316             jQuery(obj).affFiltres( argShadow);
     2317
     2318        }
     2319   },
     2320 //-----------------------------------------------------------------------------
     2321 affFiltres: function(argShadow)
     2322 {
     2323obj=this.get(0);
     2324
     2325    obj.style.zIndex=1;
     2326    obj.style.zoom=1;
     2327    obj.style.position="absolute";
     2328 
     2329
     2330 id=obj.id;
     2331  var  Ombre=jQuery("#"+obj.id+"_ombre").get(0)  ;
     2332
     2333  if (obj.style.position!='absolute')    obj.style.position='absolute';
     2334   if (obj.style.zIndex=='') obj.style.zIndex=1;
     2335   if (obj.style.zoom=='')  obj.style.zoom=1;
     2336   if (!argShadow) argShadow = jQuery(obj).getVariables(obj.style['boxShadow']);
     2337    if (!argShadow) return ;
     2338if ( argShadow.boxShadow  ) 
     2339        if (!Ombre) {
     2340         
     2341                jQuery(this).clone().insertBefore(obj).addClass("Ombre").attr("id", id + "_ombre1");
     2342                ombre=jQuery("#"+obj.id+"_ombre1").get(0);
     2343             
     2344                ombre.style.backgroundImage="none";
     2345                ombre.style.backgroundColor="transparent";
     2346               
     2347                ombre.filled = "true" ;
     2348                ombre.fillColor =  argShadow.couleur;
     2349               
     2350                ombre.stroked = "true" ;
     2351                 ombre.strokeweight=0;
     2352                ombre.strokecolor = argShadow.couleur;
     2353                childs = jQuery( ombre.childNodes).remove() ;
     2354
     2355
     2356                jQuery(ombre).clone().insertBefore(obj).addClass("Ombre").attr("id", id + "_ombre");
     2357               jQuery("#"+obj.id+"_ombre1").remove();
     2358                ombre=jQuery("#"+obj.id+"_ombre");
     2359                Ombre=jQuery("#"+obj.id+"_ombre").get(0)  ;
     2360            //   
     2361                texte=Ombre.outerHTML;
     2362if (/import namespace/.test(texte))
     2363{
     2364    /*
     2365        Ombre.style.backgroundColor="transparent" ;
     2366        Ombre.style.backgroundImage="none";
     2367        Ombre.filled = "true" ;
     2368        Ombre.fillcolor = argShadow.couleur ;
     2369        Ombre.stroked = "true" ;
     2370        Ombre.strokecolor = argShadow.couleur;
     2371        */
     2372
     2373}else{     
     2374            jQuery( Ombre).css("background-color",argShadow.couleur);
     2375            jQuery( Ombre).css("border-color", argShadow.couleur);
     2376            jQuery( Ombre).css("background-image", "none");
     2377           
     2378          }
     2379
     2380    }
     2381
     2382   
     2383
     2384        if (!Init[obj.id]) Init[obj.id]=jQuery("#"+obj.id).position();
     2385        if ( Ombre)     if (!Init[ Ombre.id]) Init[Ombre.id]=jQuery("#"+ Ombre.id).position();
     2386     
     2387         var opacity = parseInt(argShadow.alpha, 10) + "" === "NaN" ? "100" : "" + argShadow.alpha * 100 + "";
     2388         if (opacity>100) opacity = parseInt(argShadow.alpha, 10);
     2389
     2390        var   alpha = opacity;
     2391        var   Strength = argShadow.flou;
     2392        var   ShadowColor = argShadow.couleur;
     2393        var   Horizontal = argShadow.offset_h|1;
     2394        var   Vertical = argShadow.offset_v|1;
     2395        var   gradientType = argShadow.gradientType ;
     2396        var   startColorStr = argShadow.startColorStr ;
     2397        var   endColorStr = argShadow.endColorStr ;
     2398        var   deg = argShadow.deg ;
     2399        if (Vertical == 0) Vertical = 1;
     2400        var  direction = 180 - Math.atan(Horizontal / Vertical) * 180 / Math.PI;
     2401
     2402
     2403
     2404        //======================================================================================
     2405if ( argShadow.boxRotation )  {       
     2406        var deg2radians = Math.PI * 2 / 360;
     2407        var rad = deg * deg2radians;
     2408        var costheta = Math.cos(rad);
     2409        var sintheta = Math.sin(rad);
     2410        sProperties = "sizingMethod='auto expand',M11=" + costheta + ",M12=" + (-sintheta) + ",M21=" + sintheta + ",M22=" + costheta;
     2411
     2412        obj.style.filter = "progid:DXImageTransform.Microsoft.Matrix(" + sProperties + ")";
     2413        if ( Ombre)   Ombre.style.filter = "progid:DXImageTransform.Microsoft.Matrix(" + sProperties + ")";
     2414}
     2415        //========= gradient ==========================
     2416if (gradientType >= 0) {
     2417        sProperties = "gradientType=" + gradientType + ",startColorStr=" + startColorStr + ",endColorStr=" + endColorStr + "";
     2418        obj.style.filter += "  progid:DXImageTransform.Microsoft.Gradient(" + sProperties + ") ";
     2419}
     2420
     2421        //=========== opacity========================
     2422        sProperties = "opacity = " +  opacity;
     2423        if (!obj.style.filter.match("progid:DXImageTransform.Microsoft.Alpha"))
     2424        {
     2425        if ( Ombre) Ombre.style.filter += "  progid:DXImageTransform.Microsoft.Alpha(" + sProperties + ") ";
     2426        obj.style.filter += "  progid:DXImageTransform.Microsoft.Alpha(" + sProperties + ") ";
     2427        }
     2428//======================================================================================
     2429
     2430if ( Ombre)     {
     2431        filtres =  Ombre.style.filter;
     2432
     2433        //======================================================================================
     2434        sProperties = "color=" + ShadowColor + ", Direction=" + direction + ",Strength=" + Strength / 2 + " ";
     2435        if (!filtres.match("progid:DXImageTransform.Microsoft.Glow"))
     2436            filtres += " progid:DXImageTransform.Microsoft.Glow(" + sProperties + ")"; /**/
     2437        //======================================================================================
     2438
     2439        sProperties = "pixelradius=" + Strength / 2 + " ,MakeShadow:" + 'false' + ",ShadowOpacity:" + '0.8' + "";
     2440        if (!filtres.match("progid:DXImageTransform.Microsoft.Blur"))
     2441            filtres += "  progid:DXImageTransform.Microsoft.Blur(" + sProperties + ") ";
     2442
     2443
     2444        //========== DRop==========================================
     2445        sProperties = "OffX=" + Horizontal + ", OffY=" + Vertical + ", Color='" + ShadowColor + "', Positive='true'";
     2446        //  filtres += "  progid:DXImageTransform.Microsoft.dropshadow(" + sProperties + ") ";
     2447        //============================================================
     2448         Ombre.style.filter = filtres;
     2449
     2450        var Top = (( Ombre.clientHeight - Ombre.offsetHeight) / 2);
     2451        var Left = (( Ombre.clientWidth - Ombre.offsetWidth) / 2);
     2452
     2453            jQuery( Ombre).css("left", Left + Init[ Ombre.id].left + Vertical + "px");
     2454            jQuery( Ombre).css("top", Top + Init[ Ombre.id].top + Horizontal + "px");
     2455
     2456
     2457}
     2458        //================================================================================
     2459        Top = ((obj.clientHeight - obj.offsetHeight) / 2);
     2460        Left = ((obj.clientWidth - obj.offsetWidth) / 2);
     2461        jQuery(obj).css("left", Left + Init[obj.id].left + "px");
     2462        jQuery(obj).css("top", Top + Init[obj.id].top + "px");
     2463
     2464
     2465
     2466 },
     2467
     2468//============================================================
     2469 getVariables: function(Args)
     2470{
     2471 var argShadow={
     2472       alpha:0.99,
     2473       flou:0,
     2474       couleur:'transparent',
     2475       offset_h:0,
     2476       offset_v:0,
     2477       gradientType:0,
     2478       startColorStr:'yellow',
     2479       endColorStr:'blue',
     2480       deg:0
     2481
     2482}
     2483
     2484if (!Args) return argShadow;
     2485
     2486                if (Args.length==4)  Args=Args.join(" ");
     2487                Args =   removeExtraSpace(Args);
     2488               if (/rgb/.test(Args)) {
     2489                     var start = Args.indexOf('(', 3);
     2490                     var end = Args.indexOf(')', start + 1);
     2491                     var temp = Args.substring(start + 1, end)
     2492
     2493                if (/rgba/.test(Args))  temp= "rgba(" +temp  +")";
     2494               else temp= "rgba(" +temp  +")";
     2495
     2496                      var  color_Shadow = temp;
     2497                        Args=Args.replace(color_Shadow,translateColor(color_Shadow));
     2498                    }
     2499
     2500                   var sizeShadow = Args.split(" ");
     2501
     2502                   c=sizeShadow.length-1 ;
     2503                   a=0 ;
     2504                   var st_v=false,st_h=false,st_f=false,st_c=false;
     2505
     2506                   for (i in sizeShadow)
     2507                   {
     2508                        g=sizeShadow[i] ;
     2509 
     2510                        if ( /#/.test(g) ) { argShadow.couleur=sizeShadow[i];st_c=true }
     2511                        else if ( st_v && /px/.test(g) )   { argShadow.flou=parseInt(g|0);st_f=true } 
     2512                        else if ( st_h  &&  /px/.test(g) )  {  argShadow.offset_v=parseInt(g );st_v=true }
     2513                        else if ( !st_h && /px/.test(g) ) { argShadow.offset_h=parseInt(g  );st_h=true }
     2514                        else if (isNaN(g))  { argShadow.couleur=translateColor(sizeShadow[i]);st_c=true }
     2515                        else   { argShadow.flou=parseInt(sizeShadow[i]);st_f=true };
     2516 
     2517                   }
     2518
     2519//==========================================================
     2520argShadow.boxShadow=(argShadow.offset_v != 0)||(argShadow.offset_h != 0);
     2521            argShadow.gradientType= -1;
     2522
     2523            argShadow.texteShadow=false;
     2524            argShadow.texteRotation=false;
     2525            argShadow.boxRotation= (argShadow.deg !=angle) ;
     2526            argShadow.deg=angle;
     2527
     2528            return argShadow;
     2529  },
     2530   //=======================================================
    9182531   findPos : function() {
    919        obj = jQuery(this).get(0);
    920        var curleft = obj.offsetLeft || 0;
    921        var curtop = obj.offsetTop || 0;
    922        while (obj = obj.offsetParent) {
    923                 curleft += obj.offsetLeft
    924                 curtop += obj.offsetTop
    925        }
    926        return {x:curleft,y:curtop};
    927    }
     2532    obj_ = jQuery(this).get(0);
     2533    if (typeof (obj_)=="undefined") return ;
     2534
     2535    var curleft = obj_.offsetLeft || 0;
     2536    var curtop = obj_.offsetTop || 0;
     2537
     2538
     2539    s=obj_.currentStyle ;
     2540    id=obj_.id ;
     2541      if ( obj_.tagName!='IMG')   
     2542   {
     2543      while (obj_  = obj_.offsetParent) {
     2544        id=obj_.id ;
     2545        tag=obj_.tagName ;
     2546
     2547        if (obj_.style.position !="absolute") {
     2548        if (mode==8)
     2549        if (tag=="BODY")
     2550        break ;
     2551
     2552        curleft += obj_.offsetLeft;
     2553        curtop += obj_.offsetTop;
     2554
     2555        curleft += obj_.clientLeft;
     2556        curtop += obj_.clientTop;
     2557        if (mode==7)
     2558                if (tag=="BODY")
     2559                    break ;
     2560             
     2561          }
     2562        }
     2563        obj_ = jQuery(this).get(0);
     2564  var   Origine=jQuery( obj_).position() ;
     2565        curwidth  = jQuery(obj_ ).width(); //300x200
     2566        curheight = jQuery(obj_ ).height();   
     2567        winit=jQuery(obj_ ).css("width") ; //  valeur interieur (auto,"",%)
     2568        hinit=jQuery(obj_ ).css("height") ; //  valeur interieur
     2569    }else{
     2570        tag=obj_.tagName ;
     2571        winit= obj_.width || "auto" ; //  Dimension Image
     2572        hinit=obj_.height || "auto"  ; ; //   Dimension Image
     2573        jQuery(obj_).css("width", winit) ;
     2574        jQuery(obj_).css("height", hinit) ;
     2575        jQuery(obj_).css("left", obj_.style.left) ;
     2576        jQuery(obj_).css("top", obj_.style.top) ;
     2577        curwidth  = jQuery(obj_ ).css("width"); //300x200
     2578        curheight = jQuery(obj_ ).css("height");
     2579        jQuery(obj_ ).width(curwidth);
     2580        jQuery(obj_ ).height(curheight);
     2581
     2582    Origine={left:obj_.style.left,top:obj_.style.top};
     2583         w =  parseInt(curwidth) +strokeWeight.Left+strokeWeight.Right; //  valeur interieur + left  border+ right border
     2584         h =  parseInt(curheight)+strokeWeight.Bottom+strokeWeight.Top ; //  valeur interieur + left  border+ right border
     2585
     2586       ;
     2587    }
     2588         
     2589           
     2590 
     2591
     2592 
     2593
     2594    if (curleft != Origine.left) {
     2595    if (mode==7) {   
     2596
     2597    }
     2598    }
     2599    if (curtop != Origine.top) {
     2600            if (mode==7) {   
     2601
     2602    }
     2603    }
     2604
     2605    curleft +=strokeWeight.Left ;
     2606    curtop +=strokeWeight.Top ;
     2607 
     2608        if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
     2609                    largeur = document.documentElement.clientWidth;
     2610                    hauteur = document.documentElement.clientHeight;
     2611
     2612                    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
     2613                    largeur = jQuery('body').width();
     2614                    hauteur =  jQuery('body').height();
     2615                    }
     2616
     2617
     2618
     2619
     2620
     2621
     2622
     2623
     2624    if (curwidth==0) // init document
     2625    {
     2626    curwidth=largeur ;
     2627    if (winit.match("%"))
     2628            curwidth=largeur * percent( winit) ;
     2629    else if (winit.match("auto"))
     2630            curwidth=largeur ;
     2631   
     2632    jQuery(obj_).width(curwidth);
     2633    curheight = jQuery(obj_).height();
     2634
     2635    }
     2636    if (!/img/gi.test(tag)){
     2637    w = this[0].offsetWidth ; //  valeur interieur + left  border+ right border
     2638    h = this[0].offsetHeight ; //  valeur interieur + left  border+ right border
     2639    }
     2640    return {x:curleft,y:curtop,Left:Origine.left,Top:Origine.top,Width:curwidth,Height:curheight,w:w,h:h};
     2641    }
     2642,
     2643                                 
     2644findSize : function() {
     2645         obj = jQuery(this).get(0);
     2646
     2647
     2648          size={
     2649                 offsetWidth: obj.offsetWidth,
     2650                 offsetHeight: obj.offsetHeight,
     2651                 offsetLeft: obj.offsetLeft,
     2652                 offsetTop: obj.offsetTop,
     2653
     2654                 clientWidth: obj.clientWidth,
     2655                 clientHeight: obj.clientHeight,
     2656                 clientLeft: obj.clientLeft,
     2657                 clientTop: obj.clientTop,
     2658
     2659                 scrollWidth: obj.scrollWidth,
     2660                 scrollHeight: obj.scrollHeight,
     2661                 scrollLeft: obj.scrollLeft,
     2662                 scrollTop: obj.scrollTop
     2663                 
     2664          }
     2665
     2666
     2667 if (obj.style.position=="")  obj.style.position= "static"  ;
     2668 var pos_obj = jQuery(obj).findPos();
     2669 //=======================================================================
     2670 var sel = jQuery(obj).position();
     2671          return  { 'Width': obj.offsetWidth,
     2672                   'Height': obj.offsetHeight,
     2673                   'Left':  pos_obj.x ,
     2674                   'Top':  pos_obj.y  ,
     2675
     2676                 clientWidth: obj.clientWidth,
     2677                 clientHeight: obj.clientHeight,
     2678                 clientLeft: obj.clientLeft,
     2679                 clientTop: obj.clientTop,
     2680
     2681                 scrollWidth: obj.scrollWidth,
     2682                 scrollHeight: obj.scrollHeight,
     2683                 scrollLeft: obj.scrollLeft,
     2684                 scrollTop: obj.scrollTop,
     2685
     2686                 x:sel.left+obj.clientLeft,
     2687                 y:sel.top+obj.clientTop
     2688                    } ;
     2689    },
     2690                                 
     2691    setStyle : function() {
     2692                tables= jQuery("style").get();
     2693                reg=new RegExp("(})", "g");
     2694            var Styles=[];
     2695
     2696
     2697                for (table in tables)
     2698                        {
     2699                        styl=removeExtraSpace(tables[table].innerHTML);
     2700                        if (styl !="")  Styles.push( styl.replace(reg,"}|") ) ;
     2701                        }
     2702         var tranche=Styles.slice(0,Styles.length);
     2703
     2704        classes = removeExtraSpace(Styles.join("")).split("|") ; 
     2705        classes=classes.slice(0,classes.length>1 ? classes.length-1 : 0);
     2706        classe_style={};
     2707                //========== Lecture des Classess ===============
     2708        jQuery.each(classes, function (i, val) {
     2709
     2710            if (val==" }") return ;
     2711            n=i;
     2712            if(classes[i+1]==" }") val +=classes[i+1];
     2713            cl_str=[];
     2714            classe_style2={};
     2715
     2716            cl_str= (val.replace(reg,'').split("{") );
     2717            n2=[];
     2718            n0= cl_str[0];
     2719            n1= cl_str[1];
     2720            n0 = Sup_Bloc(n0,"/\*","\*/" );
     2721            if (n0 !="")
     2722                {
     2723
     2724                   n1 = Sup_Bloc(n1,"/\*","\*/" );
     2725                   n2=n1.split(";");
     2726                //  replace(/[\t\n]/g," ")
     2727                var    del =new RegExp("((-)[a-zA-Z0-9/.]+(-))+","gi");
     2728                for (n20 in n2)
     2729                   {
     2730                   if ( !isNaN(n20)){
     2731                     {
     2732                        adr1=removeExtraSpace(n2[n20].split(":")[0]).replace(del,"");
     2733                        if (adr1)
     2734                        {
     2735                        val1=removeExtraSpace(n2[n20].split(":")[1]);
     2736                         if (val1.indexOf("/\*",0) >= 0){
     2737                       
     2738                        val1 = Sup_Bloc(val1,"/\*","\*/" );
     2739
     2740                            }
     2741
     2742                        if(val1 ) classe_style2[adr1]=val1 ;
     2743                        }
     2744                       }
     2745                     }
     2746                   }
     2747                  classe_style[n0] = classe_style2 ;
     2748              //================================================
     2749                                   try {
     2750                                        c1=jQuery(n0);
     2751                                                        if (c1.length>0)
     2752                                                                if ( classe_style2 )   jQuery(n0).css(classe_style2);
     2753                                                } catch (_) {
     2754             
     2755                                        }
     2756
     2757                }
     2758                    });
     2759                //================================================
     2760                   IDS=" ";
     2761 }
     2762
     2763 });
     2764
     2765//================================================================================
     2766var window={cross_elements:[]};
     2767
     2768//=========================================================================
     2769jQuery(window).resize(function () {
     2770var tmp = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0;
     2771if(tmp) var isIE = document.namespaces ? 1 : 0;
     2772
     2773Window.Width=jQuery(window).width() ;
     2774Window.Height=jQuery(window).height() ;
     2775     if (  (window.cross_elements.length>  0)  ) {
     2776   for (a in window.cross_elements)
     2777    jQuery().crossbrowser(window.cross_elements[a]);
     2778     }
     2779 
     2780     
     2781});
     2782//=========================================================================
     2783 jQuery(window).ready(function () {
     2784  externe= (typeof externe!="undefined") ? externe : false ;
     2785  if (externe)    jQuery().setStyle();
     2786  else   jQuery(':Radius') ;
     2787   
     2788   var doc =   document;
     2789           if (  (window.cross_elements.length>  0)  ) {
     2790    for (a in window.cross_elements)
     2791   jQuery().crossbrowser( window.cross_elements[a]);
     2792   
     2793     }
     2794
     2795
     2796});
     2797
     2798
     2799//=============================================================================================
     2800// Ajoute une fonctionnalité jQuery
     2801jQuery.extend( jQuery.expr[':'], {
     2802    // Nom du sélecteur personnalisé
     2803    Radius: function (a) {
     2804        var mode = document.documentMode || 0; 
     2805        //==========================================================================
     2806     
     2807        var reg = new RegExp("body+","gi");
     2808        if ( reg.test(a.tagName))  {
     2809       jQuery(a).setStyle();
     2810        }
     2811   
     2812    if (IDS=="") return ;
     2813    if (a.tagName=="BR") return ;
     2814    if (a.tagName=="STYLE") return ;
     2815    if (a.tagName=="SCRIPT") return ;
     2816    if (a.tagName=="BODY") return ;
     2817    if (typeof a.uniqueID=="undefined") {
     2818       IDS += "op_" + uniqueId + " " + a.tagName + "|";
     2819      }
     2820     else{
     2821    if ( IDS.match(a.uniqueID)) return ;
     2822    if ( (a.id=="No")) return ;
     2823      IDS += a.uniqueID + " " + a.tagName +" " +a.id + "|";
     2824  }
     2825if (a.tagName=="!") return ;
     2826  reg = new RegExp("(clone|ombre)","gi") ; // atention a la casse
     2827    if (reg.test( a.id) ) return ;
     2828   reg = new RegExp("(src)","gi") ; // atention a la casse
     2829    if (reg.test( a.id) ) return ;
     2830  reg = new RegExp("(vml)","gi") ; // atention a la casse
     2831    if (reg.test( a.id) ) return ;
     2832
     2833Unique_id += 1;
     2834var m1=style_match.join(",").split(","); 
     2835var   Attribut = false;
     2836var argus= arguments[3] ;
     2837var ids=IDS;
     2838
     2839 Object = a ;
     2840 var  s = a.style;
     2841  if (typeof  Object.currentStyle!="undefined") s = Object.currentStyle ;
     2842  var cssText =   a.style.cssText ; // lecture style="....
     2843    // recupère le style courant
     2844  var cle = style_match;
     2845
     2846  var Message = a.innerText;
     2847
     2848
     2849   Message   =  a.id + "<br />" ;
     2850   var name=a.id ;
     2851    jQuery.each(jQuery.browser, function (i, val) {
     2852    Message += i +  " " + val + ", " ;
     2853     
     2854    });
     2855   Message  +=  "<br />" ;
     2856var sMatch ;
     2857
     2858if (!a.id) a.id=a.uniqueID;       
     2859for(var j in cle) {
     2860
     2861  /*
     2862    name = cle[j].replace(rdashAlpha, fcamelCase); test-shadow -> textShadow ;
     2863    name = name.replace(rupper, "-$1").toLowerCase();textShadow -> test-shadow ;
     2864    */
     2865    //   var camelCase = name.replace(rdashAlpha, fcamelCase);
     2866 
     2867if (!isNaN(j))
     2868{
     2869  Smatch=cle[j].replace(rupper, "-$1").toLowerCase();
     2870  sMatch=Smatch.replace(rdashAlpha, fcamelCase);
     2871
     2872   var valeur  = s[Smatch] || s[sMatch];
     2873
     2874
     2875if (classe_style["#"+a.id])  if (!valeur) { valeur = classe_style["#"+a.id][Smatch] ; }
     2876
     2877         reg = new RegExp(Smatch,"g") ; // atention a la casse
     2878             if ( cssText.match(reg) ) {   //======= si défini dans le style
     2879                                         Message  += "Style(csstext) OK  : " + a.id + " " + Smatch + ":" + valeur;   
     2880                                         }
     2881
     2882  if (!valeur) {
     2883              for (cl in  classe_style["#"+a.id])
     2884              {
     2885               cl0=classe_style["#"+a.id][cl] ;
     2886               if (reg.test(cl)) { valeur=cl0; }
     2887               }
     2888           }
     2889if ( valeur) {
     2890        var Nmatch="xxx";
     2891         jQuery.each(jQuery.browser, function (i, val) {
     2892         if (val==true){
     2893                    Nmatch=browsers[i];
     2894                    return ;
     2895                    }
     2896               
     2897            })
     2898 
     2899      Attribut= true   ;
     2900       jQuery("#"+a.id).css( Nmatch + Smatch,valeur);
     2901       Window={ width:jQuery(window).width(),height:jQuery(window).height()
     2902     };
     2903       
     2904
     2905      try{
     2906     Message +="W:" + Window.width + "#"+a.id+ " " + Nmatch + "<br /> "+Nmatch  + Smatch + ":" + valeur + "  --> " + Smatch + ":" + jQuery("#"+a.id).css( Nmatch + Smatch)+ "<br /> ";
     2907      jQuery("#debug").get(0).innerHTML=("<pre>"+Message+"<br /></pre>");}catch (_)
     2908      {            }
     2909    }
     2910
     2911     }
     2912  }
     2913    if ( Attribut && jQuery.browser.msie) { 
     2914           if (typeof (window.cross_elements) == 'undefined') {
     2915             window.cross_elements = new Array();
     2916           
     2917         }else{
     2918 
     2919 }
     2920       
     2921         window.cross_elements.push(a);
     2922          return Attribut;
     2923           
     2924      }
     2925 return false;
     2926        }
    9282927});
    9292928 //==============================================================================       
    930 jQuery.fn.crossbrowser = function (options) {
    931          oncontentready(options);
     2929jQuery.fn.crossbrowser = function (Element) {
     2930  jQuery(Element).ready(function () {
     2931  if (Element.readyState=="complete")
     2932  {
     2933  //--------------------------------------------------
     2934  t1=Element.tagName + Element.id;
     2935       
     2936      jQuery(Element,"img" ).ready(function () {
     2937                    oncontentready(Element);
     2938      });
     2939
     2940
     2941
     2942   //--------------------------------------------------
     2943     }
     2944     });
    9322945 }
    933  
     2946
    9342947})(jQuery);
    935 //================================================================================
    936  
    937 
    938 
    939 jQuery(document).ready(function () {
    940 
    941  jQuery(':Radius');
    942 
    943      
    944 });
  • extensions/gally/gally-cuise/local_head.tpl

    r6471 r6926  
    11{* the next css is used to fix radius *}
    22{html_head}
    3 {known_script id="jquery" src="themes/default/js/jquery.js"}
     3
    44<!--[if IE]>
    5 {known_script id="crossbrowser" src="themes/gally-cuise/js/crossbrowser.js"}
     5
    66
    77 <![endif]-->
Note: See TracChangeset for help on using the changeset viewer.