| 156 | | info_licencetag = jQuery(".licencetag").info(); |
| 157 | | if (info_licencetag.bottom > info_description.bottom) { |
| 158 | | jQuery(".licencetag").css("border", "solid 2px transparent"); |
| 159 | | info_description.bottom = info_licencetag.bottom ; |
| 160 | | |
| 161 | | } |
| 162 | | |
| 163 | | if (info_description.top < 1) |
| 164 | | info_description.top = info_description.bottom; |
| 165 | | |
| 166 | | |
| 167 | | var Info_the_page = jQuery("#the_page").info(); |
| 168 | | var Bandeau_t = Info_entete(Parent); |
| 169 | | |
| 170 | | if (info_description.bottom < info_description.top) |
| 171 | | info_description.bottom = info_description.top = 1; |
| 172 | | |
| 173 | | info_description.top += Bandeau_t.marge_top; |
| 174 | | // info_description.bottom 739 ; |
| 175 | | // info_description.height 277 ; |
| 176 | | // info_description.top 465 |
| 177 | | info_description.height = (info_description.bottom + Info_the_page.top) - info_description.top; |
| 178 | | if (check_desc_v != 'checked="checked"') { |
| 179 | | info_description.height = 0; |
| 180 | | } |
| 181 | | |
| 182 | | return info_description; |
| 183 | | |
| 184 | | } |
| 185 | | /* |
| 186 | | * Get_val_int |
| 187 | | * params: element,valeur maxi |
| 188 | | * return: valeur entiere |
| 189 | | */ |
| 190 | | function Get_Val_int(myObj, Maxi_val, Mini_val) { |
| 191 | | var val = 0; |
| 192 | | var reg1 = new RegExp("%", "g") |
| 193 | | Maxi_val = parseInt(Maxi_val || "0"); |
| 194 | | |
| 195 | | /* |
| 196 | | - num�rique suivie de px ou % ou pt ou em, |
| 197 | | - thin, bordure mince, |
| 198 | | - medium, bordure moyenne (valeur par d�faut), |
| 199 | | - thick, bordure �paisse, |
| 200 | | - inherit, h�rite de son parent (css2). |
| 201 | | */ |
| 202 | | |
| 203 | | if (!myObj) { |
| 204 | | return Maxi_val; |
| 205 | | } |
| 206 | | if (typeof (myObj) == "string") { |
| 207 | | if (myObj == "none") return Maxi_val; |
| 208 | | if (myObj == "auto") return Maxi_val; |
| 209 | | if (Mini_val) |
| 210 | | if (myObj < Mini_val) return Maxi_val; |
| 211 | | switch (myObj) { |
| 212 | | case 'thin': |
| 213 | | return 1; |
| 214 | | break; |
| 215 | | case 'medium': |
| 216 | | return 2; |
| 217 | | break; |
| 218 | | case 'thick': |
| 219 | | return 4; |
| 220 | | break; |
| 221 | | case 'inherit': |
| 222 | | |
| 223 | | |
| 224 | | break; |
| 225 | | |
| 226 | | default: |
| 227 | | |
| 228 | | |
| 229 | | break; |
| 230 | | } |
| 231 | | |
| 232 | | |
| 233 | | |
| 234 | | |
| 235 | | |
| 236 | | if (myObj.match(reg1)) val = myObj * Maxi_val / 100; |
| 237 | | val = parseInt(myObj); |
| 238 | | |
| 239 | | } else |
| 240 | | val = parseInt(myObj); |
| 241 | | |
| 242 | | |
| 243 | | if (typeof (val) == "NaN") return Maxi_val; |
| 244 | | return val; |
| 245 | | } |
| 246 | | |
| 247 | | /* |
| 248 | | * |
| 249 | | */ |
| 250 | | jQuery("#pamoorama_iner").bind('resize', function () { |
| 251 | | wait_Timer(); |
| 252 | | }) |
| 253 | | //============================================================//== |
| 254 | | jQuery("#pamoorama_outter").bind('resize', function () { |
| 255 | | wait_Timer(); |
| 256 | | }) |
| 257 | | |
| 258 | | |
| 259 | | |
| 260 | | //============================================================ |
| 261 | | jQuery("#iGMapsIcon").bind('resize', function () { |
| 262 | | jQuery().recentrage_widget(); |
| 263 | | }) |
| 264 | | |
| 265 | | |
| 266 | | |
| 267 | | |
| 268 | | |
| 269 | | |
| 270 | | |
| 271 | | /* jQuery */ |
| 272 | | var img_init = { height: img_height, width: img_width }; // taille initiale |
| 273 | | var img_defaut = { height: scaled_height, width: scaled_width }; |
| 274 | | var img_reelle = { height: img_height, width: img_width }; |
| 275 | | var img_finale = { height: 0, width: 0 }; |
| 276 | | var zone_affichage = { height: 0, width: 0 }; |
| 277 | | |
| 278 | | //============================================================ |
| 279 | | |
| 280 | | var Info_the_page = jQuery("#the_page").info(); |
| 281 | | var Zone_Affichage = jQuery("#theImage").info(); |
| 282 | | |
| 283 | | var Bandeau = Info_entete("theImage").img_top; |
| 284 | | |
| 285 | | var Bandeau_bas = Info_description("theImage"); |
| 286 | | |
| 287 | | var init_taille_thumblink = { height: 0, width: 0 }; |
| 288 | | if (init_taille_thumblink.height == 0) |
| 289 | | init_taille_thumblink = { |
| 290 | | height: jQuery(".thumbLink").height(), |
| 291 | | width: jQuery(".thumbLink").width() |
| 292 | | }; |
| 293 | | //=================================================================== |
| 294 | | |
| 295 | | |
| 296 | | |
| 297 | | |
| 298 | | /* |
| 299 | | * window .resize |
| 300 | | */ |
| 301 | | jQuery(window).resize(function (event, ui) { |
| 302 | | if (typeof (event) == 'undefined') return; |
| 303 | | if (!cl_visible) return; |
| 304 | | |
| 305 | | //========================================================================== |
| 306 | | var winwidth = jQuery(window).width(); |
| 307 | | var winheight = jQuery(window).height(); |
| 308 | | if (old_w == winwidth && old_h == winheight) return; |
| 309 | | |
| 310 | | |
| 311 | | /* |
| 312 | | * recherche la plus grande image (hauteur ou largeur) |
| 313 | | */ |
| 314 | | |
| 315 | | |
| 316 | | function Get_Img_Maxi(myobj) { |
| 317 | | var w00 = 0; |
| 318 | | var TheImg = null; |
| 319 | | jQuery(myobj).each(function (i) { |
| 320 | | w0 = img_reelle.width; |
| 321 | | h0 = img_reelle.height; |
| 322 | | if (h0 > w0) w0 = h0; |
| 323 | | if (w0 > w00) { |
| 324 | | if (!this.src.match(RegExp(".png", "g"))) |
| 325 | | if (!this.src.match(RegExp(thumbnail, "g"))) { |
| 326 | | TheImg = this; |
| 327 | | w00 = w0; |
| 328 | | } |
| 329 | | |
| 330 | | } |
| 331 | | }); |
| 332 | | return TheImg; |
| 333 | | } |
| 334 | | |
| 335 | | if (old_w != winwidth) |
| 336 | | { old_w = winwidth; } |
| 337 | | else |
| 338 | | { if (old_h != winheight) old_h = winheight; } |
| 339 | | //=========================================================================== |
| 340 | | |
| 341 | | |
| 342 | | Cadre = jQuery("#theImage").get(0); |
| 343 | | |
| 344 | | //=============== Information cadre ====== |
| 345 | | var info_the_page = jQuery("#the_page").info(); |
| 346 | | |
| 347 | | //============================================================================= |
| 348 | | var info_HeaderBar = jQuery("#imageHeaderBar").info(); |
| 349 | | var info_imageInfoBar = jQuery("#imageInfoBar").info(); |
| 350 | | var info_content = jQuery("#content").info(); |
| 351 | | var info_ToolBar = jQuery("#imageToolBar").info(); |
| 352 | | |
| 353 | | var info_titrePage = jQuery("#titrePage").info(); |
| 354 | | |
| 355 | | var info_the_page = jQuery("#the_page").info(); |
| 356 | | var zone_affichage = jQuery("#theImage").info(); |
| 357 | | |
| 358 | | |
| 359 | | var Type_Img = ""; |
| 360 | | //====== d�tection du type d'images ====== |
| 361 | | if (jQuery("#charlie").length > 0) { |
| 362 | | Type_Img = "charlie"; |
| 363 | | } else if (jQuery("#pamoorama").length) { |
| 364 | | Type_Img = "pamoorama"; |
| 365 | | } else if (jQuery("#theImage embed").length > 0) { |
| 366 | | Type_Img = "embed"; |
| 367 | | } else if (jQuery("#map").length) { |
| 368 | | Type_Img = "map"; |
| 369 | | } else if (jQuery("#Panorama").length) { |
| 370 | | Type_Img = "panorama"; |
| 371 | | } else if (jQuery(Cadre).find("img").length > 0) { |
| 372 | | Type_Img = "img"; |
| 373 | | } else if (jQuery("img").length > 0) { |
| 374 | | Type_Img = "img_autre"; |
| 375 | | return; |
| 376 | | } else { |
| 377 | | return; |
| 378 | | } |
| 379 | | |
| 380 | | |
| 381 | | |
| 382 | | var info_Cadre = jQuery(Cadre).info(); |
| 383 | | |
| 384 | | |
| 385 | | if (info_Cadre.position != "static") { |
| 386 | | /* Si LLGBO met le cadre en relative */ |
| 387 | | if (theme.match(RegExp("gally", "g"))) { |
| 388 | | //--- passage absolute ==> static ===/ |
| 389 | | jQuery(Cadre).css("position", "static"); |
| 390 | | info_Cadre = jQuery(Cadre).info(); |
| 391 | | |
| 392 | | } |
| 393 | | } |
| 394 | | |
| 395 | | jQuery("#imageToolBar").css("position", "relative"); |
| 396 | | jQuery("#imageHeaderBar").css("position", "relative"); |
| 397 | | jQuery("#imageToolBar").css("top", 0 + "px"); |
| 398 | | jQuery("#imageHeaderBar").css("top", "0px"); |
| 399 | | |
| 400 | | |
| 401 | | var marge_right = 0; |
| 402 | | var marge_left = 0; |
| 403 | | if (info_content.width > 100) { |
| 404 | | marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right); |
| 405 | | winwidth = info_content.width; |
| 406 | | marge_right = info_imageInfoBar.width + marge_right; |
| 407 | | } |
| 408 | | else |
| 409 | | winwidth = info_ToolBar.width - 2; |
| 410 | | |
| 411 | | // var marge_top = info_ToolBar.top + info_ToolBar.height; |
| 412 | | |
| 413 | | //====================================================================== |
| 414 | | info_theHeader = jQuery("#theHeader").info(); |
| 415 | | // var marge_top =info_theHeader.bottom + info_HeaderBar.height+ info_ToolBar.height; //145 |
| 416 | | var marge_top = info_HeaderBar.bottom + info_ToolBar.height; //145 |
| 417 | | if (Type_Img == "pamoorama") { |
| 418 | | var info_pamoorama = jQuery("#pamoorama").info(); |
| 419 | | var info_pamoorama_outter = jQuery("#pamoorama_outter").info(); |
| 420 | | var info_pamoorama_inner = jQuery("#pamoorama_inner").info(); |
| 421 | | var info_pamoorama_footer = jQuery("#pamoorama_footer").info(); |
| 422 | | TheImg = jQuery("#pamoorama"); |
| 423 | | |
| 424 | | /* |
| 425 | | pamoorama_outter |
| 426 | | pamoorama_inner |
| 427 | | pamoorama_footer |
| 428 | | pamoorama_caption |
| 429 | | pamoorama_thumb |
| 430 | | pamoorama_frame |
| 431 | | */ |
| 432 | | } else { |
| 433 | | //==== r�cup�re Img la plus grande ===== |
| 434 | | if (jQuery("#theImg")) IMG = "#theImg"; |
| 435 | | else IMG = Cadre; |
| 436 | | |
| 437 | | TheImg2 = Get_Img_Maxi(IMG + " img"); |
| 438 | | //================================================================= |
| 439 | | if (TheImg2 == null) { |
| 440 | | if (jQuery(Cadre).find("img").length > 0) { |
| 441 | | IMG = Cadre; |
| 442 | | TheImg = Get_Img_Maxi("#theImage img"); |
| 443 | | } |
| 444 | | } else { |
| 445 | | TheImg = TheImg2 //luciano ? |
| 446 | | |
| 447 | | } |
| 448 | | } |
| 449 | | //================================================================= |
| 450 | | |
| 451 | | |
| 452 | | switch (Type_Img) { |
| 453 | | case "map": |
| 454 | | var info_image = jQuery("#map").info(); |
| 455 | | |
| 456 | | var info_map = jQuery("#mapPicture").info(); |
| 457 | | |
| 458 | | marge_left = info_map.width; |
| 459 | | jQuery("#map").css("left", marge_left); |
| 460 | | |
| 461 | | var TheImg = jQuery("#map").get(0); |
| 462 | | info_image = jQuery("#map").info(); |
| 463 | | |
| 464 | | |
| 465 | | pos_page = jQuery("#the_page").info(); |
| 466 | | ; |
| 467 | | |
| 468 | | break |
| 469 | | |
| 470 | | |
| 471 | | case "panorama": |
| 472 | | |
| 473 | | var w00 = 0; |
| 474 | | jQuery("#Panorama img").each(function (i) { |
| 475 | | w0 = this.width; |
| 476 | | if (w0 > w00) { |
| 477 | | TheImg = this; |
| 478 | | n = TheImg.nameProp; |
| 479 | | w00 = w0; |
| 480 | | } |
| 481 | | }); |
| 482 | | |
| 483 | | pos_image = jQuery(TheImg).info(); |
| 484 | | pos_page = jQuery("#the_page").info(); |
| 485 | | |
| 486 | | break |
| 487 | | case "img": |
| 488 | | |
| 489 | | if (!TheImg) return; |
| 490 | | pos_image = jQuery(TheImg).info(); |
| 491 | | pos_page = jQuery("#the_page").info(); |
| 492 | | |
| 493 | | |
| 494 | | break |
| 495 | | case "img_autre": |
| 496 | | if (!TheImg) return; |
| 497 | | pos_image = jQuery(TheImg).position(); |
| 498 | | pos_page = jQuery("#the_page").position(); |
| 499 | | |
| 500 | | |
| 501 | | break |
| 502 | | case "embed": |
| 503 | | // |
| 504 | | |
| 505 | | TheImg = jQuery(Cadre).find("embed"); |
| 506 | | |
| 507 | | pos_image = jQuery(Cadre).position(); |
| 508 | | pos_page = jQuery("#the_page").position(); |
| 509 | | if (rapport < 0) { |
| 510 | | img_height = parseInt(jQuery(TheImg).outerHeight()); |
| 511 | | img_width = parseInt(jQuery(TheImg).outerWidth()); |
| 512 | | |
| 513 | | img_reelle.height = img_height; |
| 514 | | img_reelle.width = img_width; |
| 515 | | |
| 516 | | } |
| 517 | | |
| 518 | | break |
| 519 | | case "charlie": |
| 520 | | |
| 521 | | TheImg = jQuery('#charlie object').get(0); |
| 522 | | pos_image = jQuery(Cadre).position(); |
| 523 | | pos_page = jQuery("#the_page").position(); |
| 524 | | if (rapport < 0) { |
| 525 | | img_height = parseInt(TheImg.height); |
| 526 | | img_width = parseInt(TheImg.width); |
| 527 | | |
| 528 | | img_reelle.height = parseInt(TheImg.height); |
| 529 | | img_reelle.width = parseInt(TheImg.width); |
| 530 | | } |
| 531 | | |
| 532 | | break |
| 533 | | case "pamoorama": |
| 534 | | //========================================================= |
| 535 | | var Images = jQuery("#pamoorama img"); |
| 536 | | var Image = jQuery("#pamoorama").find("img"); |
| 537 | | |
| 538 | | pos_image = jQuery("#pamoorama").info(); |
| 539 | | pos_page = jQuery("#the_page").info(); |
| 540 | | break |
| 541 | | |
| 542 | | |
| 543 | | } |
| 544 | | |
| 545 | | //=============== V�rification taille minimale autoriz�e ====================== |
| 546 | | miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); |
| 547 | | miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); |
| 548 | | |
| 549 | | |
| 550 | | var maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth,"0"); |
| 551 | | maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight,"0"); |
| 552 | | |
| 553 | | mini_width = parseInt(miniWidth); |
| 554 | | mini_height = parseInt(miniHeight); |
| 555 | | |
| 556 | | img_reelle.width = parseInt(img_reelle.width); |
| 557 | | |
| 558 | | |
| 559 | | if (img_reelle.width < mini_width) return; |
| 560 | | |
| 561 | | img_reelle.height = parseInt(img_reelle.height); |
| 562 | | if (img_reelle.height < parseInt(mini_height)) return; |
| 563 | | //================================================================================== |
| 564 | | if (rapport < 0) { |
| 565 | | |
| 566 | | img_init.height = parseInt(img_height); |
| 567 | | img_init.width = parseInt(img_width); |
| 568 | | |
| 569 | | rapport = img_width / img_height; |
| 570 | | |
| 571 | | if (Type_Img != "map") |
| 572 | | rapport = (img_init.width / img_init.height); |
| 573 | | else |
| 574 | | rapport = 0; |
| 575 | | |
| 576 | | } |
| 577 | | |
| 578 | | |
| 579 | | //=============== Zone d'affichage ============================ |
| 580 | | |
| 581 | | borderW = Get_Val_int(zone_affichage.borderwidth.left, 2); |
| 582 | | borderW += Get_Val_int(zone_affichage.borderwidth.right, 2); |
| 583 | | |
| 584 | | |
| 585 | | zone_affichage.width = winwidth - borderW; |
| 586 | | zone_affichage.height = winheight - marge_top; |
| 587 | | |
| 588 | | |
| 589 | | |
| 590 | | //=========================================================================== |
| 591 | | var sel0 = { top: 0 }; |
| 592 | | |
| 593 | | |
| 594 | | |
| 595 | | |
| 596 | | |
| 597 | | //================================================================================== |
| 598 | | jQuery("#theImage #theImg IMG").css("marginTop", "0px") |
| 599 | | |
| 600 | | var h = 15; |
| 601 | | if (theme.match(RegExp("sobre", "g"))) { |
| 602 | | h += 0; //?? |
| 603 | | } else if (theme.match(RegExp("Pure", "g"))) { |
| 604 | | h += 0; //?? |
| 605 | | } else if (theme.match(RegExp("luciano", "g"))) { |
| 606 | | h += 0; //?? |
| 607 | | } else if (theme.match(RegExp("simple", "g"))) { |
| 608 | | h += 0; //?? |
| 609 | | } else if (theme.match(RegExp("gally", "g"))) { |
| 610 | | h += 0; //?? |
| 611 | | |
| 612 | | } |
| 613 | | //================ Licence ======================== |
| 614 | | var Licence = jQuery(".licencetag"); |
| 615 | | if (Licence.length > 0) { |
| 616 | | jQuery(".licencetag").css("padding", "0px"); |
| 617 | | |
| 618 | | } |
| 619 | | //==================================================== |
| 620 | | info_img = jQuery(TheImg).info(); |
| 621 | | |
| 622 | | |
| 623 | | //========================================================================= |
| 624 | | img_top = Bandeau; |
| 625 | | //============ Padding image ? =============== |
| 626 | | |
| 627 | | img_padding_top = Get_Val_int(info_img.padding.top); |
| 628 | | img_padding_top += Get_Val_int(info_img.padding.bottom); |
| 629 | | img_padding_top += Get_Val_int(info_img.borderwidth.top); |
| 630 | | img_padding_top += Get_Val_int(info_img.borderwidth.bottom); |
| 631 | | |
| 632 | | margin_top = Get_Val_int(info_Cadre.margin.top); |
| 633 | | padding_top = Get_Val_int(info_Cadre.padding.top); |
| 634 | | padding_top += Get_Val_int(info_Cadre.padding.bottom); |
| 635 | | |
| 636 | | Marge_Basse = parseInt(marge_basse || 0); // hors bandeau |
| 637 | | //========================================================================== |
| 638 | | h = 0; |
| 639 | | zone_affichage.height = winheight - Bandeau - Marge_Basse - h - margin_top - padding_top; |
| 640 | | var Image_height = zone_affichage.height - Bandeau_bas.height - img_padding_top; |
| 641 | | var Delta = zone_affichage.height - Image_height; |
| 642 | | |
| 643 | | //============================================================= |
| 644 | | var height_user = eval(user_status + "_height"); |
| 645 | | |
| 646 | | |
| 647 | | var reg1 = new RegExp("%", "g"); |
| 648 | | if (height_user.match(reg1)) |
| 649 | | Image_height = Image_height * parseInt(height_user) / 100; |
| 650 | | else |
| 651 | | Image_height = parseInt(height_user); |
| 652 | | |
| 653 | | //============================================================ |
| 654 | | echelle_max = parseFloat(echelle_max, '3'); |
| 655 | | var echelle = parseFloat(Image_height / img_reelle.height, 3); |
| 656 | | |
| 657 | | if (echelle > echelle_max) { echelle = echelle_max; } |
| 658 | | Image_height = parseInt(img_reelle.height * echelle); |
| 659 | | |
| 660 | | var Image_width; |
| 661 | | if (rapport > 0) |
| 662 | | Image_width = parseInt(Image_height * rapport); |
| 663 | | |
| 664 | | else if (Type_Img == "map") { |
| 665 | | Image_width = zone_affichage.width - marge_left - marge_right; |
| 666 | | |
| 667 | | if (theme.match(RegExp("gally", "g"))) { |
| 668 | | // Image_height -= "30"; |
| 669 | | } |
| 670 | | |
| 671 | | } else { |
| 672 | | Image_width = zone_affichage.width; |
| 673 | | } |
| 674 | | |
| 675 | | //=============================================================== |
| 676 | | align_auto = "center"; |
| 677 | | if (jQuery("#theImg").css("textAlign")) |
| 678 | | align_auto = jQuery("#theImg").css("textAlign"); |
| 679 | | |
| 680 | | if (check_auto_w == 'checked="checked"') { |
| 681 | | // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { |
| 682 | | //==== largeur � atteindre === |
| 683 | | var width_user = eval(user_status + "_width"); |
| 684 | | // Largeur maximale en fonction du statut |
| 685 | | if (width_user.match(reg1)) |
| 686 | | // pourcentage |
| 687 | | widthmin = maxWidth * parseInt(width_user) / 100; |
| 688 | | else |
| 689 | | widthmin = parseInt(width_user); |
| 690 | | |
| 691 | | if (Image_width > widthmin) { |
| 692 | | // Image_width largeur � atteindre |
| 693 | | // Calcul du rapport d'agrandissement |
| 694 | | var echelle_w = parseFloat(widthmin / img_reelle.width, 3); |
| 695 | | if (echelle_w > echelle_max) { echelle_w = echelle_max; } |
| 696 | | Image_width = parseInt(img_reelle.width * echelle_w); |
| 697 | | if (rapport > 0) |
| 698 | | Image_height = parseInt(Image_width / rapport); |
| 699 | | } |
| 700 | | |
| 701 | | |
| 702 | | |
| 703 | | } |
| 704 | | |
| 705 | | |
| 706 | | // } |
| 707 | | |
| 708 | | // zone_affichage.height = Image_height + Delta + info_pamoorama_footer.height; |
| 709 | | |
| 710 | | zoom = echelle; |
| 711 | | |
| 712 | | // zone_affichage.height *= zoom; |
| 713 | | // zone_affichage.width *= zoom; |
| 714 | | //=============LLGBO2 =========================== |
| 715 | | marges = 0; |
| 716 | | t1 = { top: 0 }; |
| 717 | | if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { |
| 718 | | llgboframe = jQuery("#gbo div:first"); |
| 719 | | marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); |
| 720 | | |
| 721 | | m1 = jQuery(llgboframe).outerHeight(); |
| 722 | | t1 = jQuery(llgboframe).position(); |
| 723 | | |
| 724 | | |
| 725 | | if (TheImg.src) { |
| 726 | | marge_top = t1.top - img_top; |
| 727 | | Image_height -= marge_top; |
| 728 | | Image_width = Image_height * rapport; |
| 729 | | if ((winwidth) < Image_width) { |
| 730 | | _width = maxWidth; |
| 731 | | } else { |
| 732 | | _width = Image_width; |
| 733 | | } |
| 734 | | |
| 735 | | |
| 736 | | jQuery("#gbo").outerWidth(_width); |
| 737 | | jQuery("#gbo").outerHeight(Image_height); |
| 738 | | jQuery("#gbo").css("width", (_width) + "px"); |
| 739 | | jQuery("#gbo").css("height", (Image_height) + "px"); |
| 740 | | |
| 741 | | Image_height -= marges; |
| 742 | | Image_width -= marges; |
| 743 | | |
| 744 | | } else { |
| 745 | | |
| 746 | | jQuery("#gbo").width(zone_affichage.width - marges); |
| 747 | | jQuery("#gbo").height(Image_height + marges) |
| 748 | | jQuery("#gbo").css("width", zone_affichage.width - marges + "px"); |
| 749 | | jQuery("#gbo").css("height", Image_height - marges + "px") |
| 750 | | |
| 751 | | } |
| 752 | | |
| 753 | | |
| 754 | | |
| 755 | | if (jQuery("area").length > 0) { |
| 756 | | jQuery("area").each(function (i) { |
| 757 | | |
| 758 | | obj1 = this.rel; |
| 759 | | obj2 = this.coords; |
| 760 | | if (obj1 == "up") |
| 761 | | this.coords = (Image_width / 3) + "," + 0 + "," + (Image_width * 2 / 3) + "," + Image_height; |
| 762 | | else if (obj1 == "prev") |
| 763 | | this.coords = 0 + "," + 0 + "," + (Image_width / 3) + "," + Image_height; |
| 764 | | else if (obj1 == "next") |
| 765 | | this.coords = (Image_width * 2) / 3 + "," + 0 + "," + (Image_width * 3 / 3) + "," + Image_height; |
| 766 | | |
| 767 | | }); |
| 768 | | |
| 769 | | |
| 770 | | |
| 771 | | |
| 772 | | |
| 773 | | |
| 774 | | } |
| 775 | | |
| 776 | | |
| 777 | | } |
| 778 | | |
| 779 | | //========================================================= |
| 780 | | // jQuery(Cadre).css("position", "relative"); |
| 781 | | |
| 782 | | jQuery(Cadre).css("top", "0px"); |
| 783 | | jQuery("#standard").css("top", 0 + "px"); |
| 784 | | jQuery("#comments").css("top", 0 + "px"); |
| 785 | | |
| 786 | | |
| 787 | | //jQuery("#copyright").css("top", 0 + "px"); |
| 788 | | |
| 789 | | |
| 790 | | jQuery("#linkNext").height(Image_height); |
| 791 | | jQuery("#linkPrev").height(Image_height); |
| 792 | | //================ Zone affichage ========================= |
| 793 | | // Image_height, Image_width = valeur a atteindre. |
| 794 | | if (theme.match(RegExp("luciano", "g"))) { |
| 795 | | zone_affichage.height -= Bandeau_bas; |
| 796 | | } |
| 797 | | |
| 798 | | // jQuery(Cadre).height(zone_affichage.height); |
| 799 | | // jQuery(Cadre).height(mb-zone_affichage.top); |
| 800 | | jQuery(Cadre).width(zone_affichage.width); |
| 801 | | //============================================================== |
| 802 | | |
| 803 | | img_finale.height = Image_height; |
| 804 | | img_finale.width = Image_width; |
| 805 | | //============================================================== |
| 806 | | |
| 807 | | if (typeof (gmaps) != "undefined") { |
| 808 | | Gmap_ = gmaps.maps[0]; |
| 809 | | if (Gmap_.sizeMode == 'A'); |
| 810 | | { |
| 811 | | jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" }); |
| 812 | | |
| 813 | | } |
| 814 | | } |
| 815 | | //============================================================== |
| 816 | | if (Type_Img == "charlie") { |
| 817 | | t1 = jQuery("#charlie").position(); |
| 818 | | /**/ |
| 819 | | pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight")); |
| 820 | | jQuery("#charlie").css({ |
| 821 | | width: Image_width + pdf, |
| 822 | | height: Image_height, |
| 823 | | margin: "auto" |
| 824 | | }); |
| 825 | | |
| 826 | | |
| 827 | | jQuery("#player").css("width", Image_width + 100 + "px"); |
| 828 | | jQuery("#player").css("height", Image_height); |
| 829 | | |
| 830 | | jQuery("#embedplayer").css("width", Image_width); |
| 831 | | jQuery("#embedplayer").css("height", Image_height); |
| 832 | | |
| 833 | | |
| 834 | | jQuery("object").width(Image_width); |
| 835 | | jQuery("object").height(Image_height); |
| 836 | | } else if (Type_Img == "panorama") { |
| 837 | | |
| 838 | | // jQuery(TheImg).panorama2(img_finale.height, img_finale.width); |
| 839 | | jQuery(TheImg).height(img_finale.height); |
| 840 | | jQuery(TheImg).width(img_finale.width); |
| 841 | | jQuery("#Panorama div").height(Image_height); |
| 842 | | // class=simple_panorama |
| 843 | | |
| 844 | | jQuery(".panorama-viewport").css("left", "2px"); |
| 845 | | jQuery(".panorama-viewport").css("width", "auto"); |
| 846 | | // setTimeout("cl_Timer()", 500); |
| 847 | | |
| 848 | | } else if (Type_Img == "pamoorama") { |
| 849 | | return; |
| 850 | | marge_left += 0; |
| 851 | | new_width = zone_affichage.width - marge_right - marge_left; |
| 852 | | jQuery("#pamoorama").css({ margin: 0 + "px", |
| 853 | | left: marge_left + "px", |
| 854 | | height: Image_height + info_pamoorama_footer.height + "px", |
| 855 | | width: new_width + "px" |
| 856 | | }); |
| 857 | | |
| 858 | | jQuery("#pamoorama").width(new_width); |
| 859 | | |
| 860 | | |
| 861 | | jQuery("#pamoorama_outter").css({ |
| 862 | | left: marge_left + "px", |
| 863 | | height: Image_height + "px", |
| 864 | | width: (new_width) + "px" |
| 865 | | }); |
| 866 | | jQuery("#pamoorama_outter").width(new_width); |
| 867 | | |
| 868 | | |
| 869 | | jQuery("#pamoorama_footer").width((zone_affichage.width - marge_right - marge_left)); |
| 870 | | jQuery("#pamoorama_footer").css('width', (zone_affichage.width - marge_right - marge_left) + "px"); |
| 871 | | zoom = Image_height / img_height; |
| 872 | | info_pamoorama_outter = jQuery("#pamoorama_outter").info(); |
| 873 | | |
| 874 | | h_frame = jQuery("#pamoorama").width(); |
| 875 | | if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) { |
| 876 | | |
| 877 | | /* if (info_pamoorama_outter.width == 0) |
| 878 | | setTimeout("wait_Timer()", 100); |
| 879 | | */ |
| 880 | | // jQuery(TheImg).css("zoom", zoom); |
| 881 | | } |
| 882 | | |
| 883 | | |
| 884 | | } else if (TheImg.src) { |
| 885 | | //--- background ?? --- |
| 886 | | jQuery(TheImg).height(img_finale.height); |
| 887 | | jQuery(TheImg).width(img_finale.width); |
| 888 | | jQuery(TheImg).css("height", img_finale.height + "px"); |
| 889 | | jQuery(TheImg).css("width", img_finale.width + "px"); |
| 890 | | |
| 891 | | } else { |
| 892 | | //===map ? === |
| 893 | | jQuery(TheImg).height(img_finale.height); |
| 894 | | jQuery(TheImg).width(img_finale.width); |
| 895 | | jQuery(TheImg).css("height", img_finale.height + "px"); |
| 896 | | jQuery(TheImg).css("width", img_finale.width + "px"); |
| 897 | | } |
| 898 | | |
| 899 | | |
| 900 | | try { |
| 901 | | if (theme.match(RegExp("gally", "g"))) { |
| 902 | | |
| 903 | | jQuery("#navThumbNext").height(init_taille_thumblink.height*2); |
| 904 | | jQuery("#navThumbPrev").height(init_taille_thumblink.height*2); |
| 905 | | |
| 906 | | jQuery(".thumbLink").css("height", init_taille_thumblink.height + "px"); |
| 907 | | jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px"); |
| 908 | | |
| 909 | | jQuery(Cadre).height(zone_affichage.height); |
| 910 | | |
| 911 | | } else { |
| 912 | | |
| 913 | | jQuery("#imageToolBar").css("position", "static"); |
| 914 | | } |
| 915 | | } catch (e) { |
| 916 | | |
| 917 | | } |
| 918 | | // |
| 919 | | if (!pos) pos = jQuery("#copyright").position(); |
| 920 | | if (pos != jQuery("#copyright").position()) |
| 921 | | pos = jQuery("#copyright").position(); |
| 922 | | if (pos.top > 100) jQuery("#the_page").height(pos.top); |
| 923 | | |
| 924 | | if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return; |
| 925 | | jQuery(window).resize(); |
| 926 | | return; |
| 927 | | }); |
| 928 | | var pos; |
| 929 | | //=================================================================== |
| 930 | | jQuery(window).resize(); |
| 931 | | |
| 932 | | |
| 933 | | } // function |
| 934 | | ); // ready |
| | 191 | info_licencetag = jQuery(".licencetag").info(); |
| | 192 | if (info_licencetag.bottom > info_description.bottom) { |
| | 193 | jQuery(".licencetag").css("border", "solid 2px transparent"); |
| | 194 | info_description.bottom = info_licencetag.bottom; |
| | 195 | |
| | 196 | } |
| | 197 | |
| | 198 | if (info_description.top < 1) |
| | 199 | info_description.top = info_description.bottom; |
| | 200 | |
| | 201 | |
| | 202 | var Info_the_page = jQuery("#the_page").info(); |
| | 203 | var Bandeau_t = Info_entete(Parent); |
| | 204 | |
| | 205 | if (info_description.bottom < info_description.top) |
| | 206 | info_description.bottom = info_description.top = 1; |
| | 207 | |
| | 208 | info_description.top += Bandeau_t.marge_top; |
| | 209 | // info_description.bottom 739 ; |
| | 210 | // info_description.height 277 ; |
| | 211 | // info_description.top 465 |
| | 212 | info_description.height = (info_description.bottom + Info_the_page.top) - info_description.top; |
| | 213 | if (check_desc_v != 'checked="checked"') { |
| | 214 | info_description.height = 0; |
| | 215 | } |
| | 216 | |
| | 217 | return info_description; |
| | 218 | |
| | 219 | } |
| | 220 | /* |
| | 221 | * Get_val_int |
| | 222 | * params: element,valeur maxi |
| | 223 | * return: valeur entiere |
| | 224 | */ |
| | 225 | function Get_Val_int(myObj, Maxi_val, Mini_val) { |
| | 226 | var val = 0; |
| | 227 | var reg1 = new RegExp("%", "g") |
| | 228 | Maxi_val = parseInt(Maxi_val || "0"); |
| | 229 | |
| | 230 | /* |
| | 231 | - num�rique suivie de px ou % ou pt ou em, |
| | 232 | - thin, bordure mince, |
| | 233 | - medium, bordure moyenne (valeur par d�faut), |
| | 234 | - thick, bordure �paisse, |
| | 235 | - inherit, h�rite de son parent (css2). |
| | 236 | */ |
| | 237 | |
| | 238 | if (!myObj) { |
| | 239 | return Maxi_val; |
| | 240 | } |
| | 241 | if (typeof (myObj) == "string") { |
| | 242 | if (myObj == "none") return Maxi_val; |
| | 243 | if (myObj == "auto") return Maxi_val; |
| | 244 | if (Mini_val) |
| | 245 | if (myObj < Mini_val) return Maxi_val; |
| | 246 | switch (myObj) { |
| | 247 | case 'thin': |
| | 248 | return 1; |
| | 249 | break; |
| | 250 | case 'medium': |
| | 251 | return 2; |
| | 252 | break; |
| | 253 | case 'thick': |
| | 254 | return 4; |
| | 255 | break; |
| | 256 | case 'inherit': |
| | 257 | |
| | 258 | |
| | 259 | break; |
| | 260 | |
| | 261 | default: |
| | 262 | |
| | 263 | |
| | 264 | break; |
| | 265 | } |
| | 266 | |
| | 267 | |
| | 268 | |
| | 269 | |
| | 270 | |
| | 271 | if (myObj.match(reg1)) val = myObj * Maxi_val / 100; |
| | 272 | val = parseInt(myObj); |
| | 273 | |
| | 274 | } else |
| | 275 | val = parseInt(myObj); |
| | 276 | |
| | 277 | |
| | 278 | if (typeof (val) == "NaN") return Maxi_val; |
| | 279 | return val; |
| | 280 | } |
| | 281 | |
| | 282 | /* |
| | 283 | * |
| | 284 | */ |
| | 285 | jQuery("#pamoorama_iner").bind('resize', function () { |
| | 286 | wait_Timer(); |
| | 287 | }) |
| | 288 | //============================================================//== |
| | 289 | jQuery("#pamoorama_outter").bind('resize', function () { |
| | 290 | wait_Timer(); |
| | 291 | }) |
| | 292 | |
| | 293 | |
| | 294 | |
| | 295 | //============================================================ |
| | 296 | jQuery("#iGMapsIcon").bind('resize', function () { |
| | 297 | jQuery().recentrage_widget(); |
| | 298 | }) |
| | 299 | |
| | 300 | |
| | 301 | |
| | 302 | |
| | 303 | |
| | 304 | |
| | 305 | |
| | 306 | /* jQuery */ |
| | 307 | var img_init = { height: img_height, width: img_width }; // taille initiale |
| | 308 | var img_defaut = { height: scaled_height, width: scaled_width }; |
| | 309 | var img_reelle = { height: img_height, width: img_width }; |
| | 310 | var img_finale = { height: 0, width: 0 }; |
| | 311 | var zone_affichage = { height: 0, width: 0 }; |
| | 312 | |
| | 313 | //============================================================ |
| | 314 | |
| | 315 | var Info_the_page = jQuery("#the_page").info(); |
| | 316 | var Zone_Affichage = jQuery("#theImage").info(); |
| | 317 | |
| | 318 | var Bandeau = Info_entete("theImage").img_top; |
| | 319 | |
| | 320 | var Bandeau_bas = Info_description("theImage"); |
| | 321 | |
| | 322 | var init_taille_thumblink = { height: 0, width: 0 }; |
| | 323 | if (init_taille_thumblink.height == 0) |
| | 324 | init_taille_thumblink = { |
| | 325 | height: jQuery(".thumbLink").height(), |
| | 326 | width: jQuery(".thumbLink").width() |
| | 327 | }; |
| | 328 | //=================================================================== |
| | 329 | |
| | 330 | |
| | 331 | |
| | 332 | |
| | 333 | /* |
| | 334 | * window .resize |
| | 335 | */ |
| | 336 | jQuery(window).resize(function (event, ui) { |
| | 337 | if (typeof (event) == 'undefined') return; |
| | 338 | if (!cl_visible) return; |
| | 339 | |
| | 340 | //========================================================================== |
| | 341 | var winwidth = jQuery(window).width(); |
| | 342 | var winheight = jQuery(window).height(); |
| | 343 | if (old_w == winwidth && old_h == winheight) return; |
| | 344 | |
| | 345 | |
| | 346 | /* |
| | 347 | * recherche la plus grande image (hauteur ou largeur) |
| | 348 | */ |
| | 349 | |
| | 350 | |
| | 351 | function Get_Img_Maxi(myobj) { |
| | 352 | var w00 = 0; |
| | 353 | var TheImg = null; |
| | 354 | jQuery(myobj).each(function (i) { |
| | 355 | w0 = img_reelle.width; |
| | 356 | h0 = img_reelle.height; |
| | 357 | if (h0 > w0) w0 = h0; |
| | 358 | if (w0 > w00) { |
| | 359 | if (!this.src.match(RegExp(".png", "g"))) |
| | 360 | if (!this.src.match(RegExp(thumbnail, "g"))) { |
| | 361 | TheImg = this; |
| | 362 | w00 = w0; |
| | 363 | } |
| | 364 | |
| | 365 | } |
| | 366 | }); |
| | 367 | return TheImg; |
| | 368 | } |
| | 369 | |
| | 370 | if (old_w != winwidth) |
| | 371 | { old_w = winwidth; } |
| | 372 | else |
| | 373 | { if (old_h != winheight) old_h = winheight; } |
| | 374 | //=========================================================================== |
| | 375 | |
| | 376 | |
| | 377 | Cadre = jQuery("#theImage").get(0); |
| | 378 | |
| | 379 | //=============== Information cadre ====== |
| | 380 | var info_the_page = jQuery("#the_page").info(); |
| | 381 | |
| | 382 | //============================================================================= |
| | 383 | var info_HeaderBar = jQuery("#imageHeaderBar").info(); |
| | 384 | var info_imageInfoBar = jQuery("#imageInfoBar").info(); |
| | 385 | var info_content = jQuery("#content").info(); |
| | 386 | var info_ToolBar = jQuery("#imageToolBar").info(); |
| | 387 | |
| | 388 | var info_titrePage = jQuery("#titrePage").info(); |
| | 389 | |
| | 390 | var info_the_page = jQuery("#the_page").info(); |
| | 391 | var zone_affichage = jQuery("#theImage").info(); |
| | 392 | |
| | 393 | |
| | 394 | var Type_Img = ""; |
| | 395 | //====== d�tection du type d'images ====== |
| | 396 | if (jQuery("#charlie").length > 0) { |
| | 397 | Type_Img = "charlie"; |
| | 398 | } else if (jQuery("#pamoorama").length) { |
| | 399 | Type_Img = "pamoorama"; |
| | 400 | } else if (jQuery("#theImage embed").length > 0) { |
| | 401 | Type_Img = "embed"; |
| | 402 | } else if (jQuery("#map").length) { |
| | 403 | Type_Img = "map"; |
| | 404 | } else if (jQuery("#Panorama").length) { |
| | 405 | Type_Img = "panorama"; |
| | 406 | } else if (jQuery(Cadre).find("img").length > 0) { |
| | 407 | Type_Img = "img"; |
| | 408 | } else if (jQuery("img").length > 0) { |
| | 409 | Type_Img = "img_autre"; |
| | 410 | return; |
| | 411 | } else { |
| | 412 | return; |
| | 413 | } |
| | 414 | |
| | 415 | |
| | 416 | |
| | 417 | var info_Cadre = jQuery(Cadre).info(); |
| | 418 | |
| | 419 | |
| | 420 | if (info_Cadre.position != "static") { |
| | 421 | /* Si LLGBO met le cadre en relative */ |
| | 422 | if (theme.match(RegExp("gally", "g"))) { |
| | 423 | //--- passage absolute ==> static ===/ |
| | 424 | jQuery(Cadre).css("position", "static"); |
| | 425 | info_Cadre = jQuery(Cadre).info(); |
| | 426 | |
| | 427 | } |
| | 428 | } |
| | 429 | |
| | 430 | jQuery("#imageToolBar").css("position", "relative"); |
| | 431 | jQuery("#imageHeaderBar").css("position", "relative"); |
| | 432 | jQuery("#imageToolBar").css("top", 0 + "px"); |
| | 433 | jQuery("#imageHeaderBar").css("top", "0px"); |
| | 434 | |
| | 435 | |
| | 436 | var marge_right = 0; |
| | 437 | var marge_left = 0; |
| | 438 | if (info_content.width > 100) { |
| | 439 | marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right); |
| | 440 | winwidth = info_content.width; |
| | 441 | marge_right = info_imageInfoBar.width + marge_right; |
| | 442 | } |
| | 443 | else |
| | 444 | winwidth = info_ToolBar.width - 2; |
| | 445 | |
| | 446 | // var marge_top = info_ToolBar.top + info_ToolBar.height; |
| | 447 | |
| | 448 | //====================================================================== |
| | 449 | info_theHeader = jQuery("#theHeader").info(); |
| | 450 | // var marge_top =info_theHeader.bottom + info_HeaderBar.height+ info_ToolBar.height; //145 |
| | 451 | var marge_top = info_HeaderBar.bottom + info_ToolBar.height; //145 |
| | 452 | if (Type_Img == "pamoorama") { |
| | 453 | var info_pamoorama = jQuery("#pamoorama").info(); |
| | 454 | var info_pamoorama_outter = jQuery("#pamoorama_outter").info(); |
| | 455 | var info_pamoorama_inner = jQuery("#pamoorama_inner").info(); |
| | 456 | var info_pamoorama_footer = jQuery("#pamoorama_footer").info(); |
| | 457 | TheImg = jQuery("#pamoorama"); |
| | 458 | |
| | 459 | /* |
| | 460 | pamoorama_outter |
| | 461 | pamoorama_inner |
| | 462 | pamoorama_footer |
| | 463 | pamoorama_caption |
| | 464 | pamoorama_thumb |
| | 465 | pamoorama_frame |
| | 466 | */ |
| | 467 | } else { |
| | 468 | //==== r�cup�re Img la plus grande ===== |
| | 469 | if (jQuery("#theImg")) IMG = "#theImg"; |
| | 470 | else IMG = Cadre; |
| | 471 | |
| | 472 | TheImg2 = Get_Img_Maxi(IMG + " img"); |
| | 473 | //================================================================= |
| | 474 | if (TheImg2 == null) { |
| | 475 | if (jQuery(Cadre).find("img").length > 0) { |
| | 476 | IMG = Cadre; |
| | 477 | TheImg = Get_Img_Maxi("#theImage img"); |
| | 478 | } |
| | 479 | } else { |
| | 480 | TheImg = TheImg2 //luciano ? |
| | 481 | |
| | 482 | } |
| | 483 | } |
| | 484 | //================================================================= |
| | 485 | |
| | 486 | |
| | 487 | switch (Type_Img) { |
| | 488 | case "map": |
| | 489 | var info_image = jQuery("#map").info(); |
| | 490 | |
| | 491 | var info_map = jQuery("#mapPicture").info(); |
| | 492 | |
| | 493 | marge_left = info_map.width; |
| | 494 | jQuery("#map").css("left", marge_left); |
| | 495 | |
| | 496 | var TheImg = jQuery("#map").get(0); |
| | 497 | info_image = jQuery("#map").info(); |
| | 498 | |
| | 499 | |
| | 500 | pos_page = jQuery("#the_page").info(); |
| | 501 | ; |
| | 502 | |
| | 503 | break |
| | 504 | |
| | 505 | |
| | 506 | case "panorama": |
| | 507 | |
| | 508 | var w00 = 0; |
| | 509 | jQuery("#Panorama img").each(function (i) { |
| | 510 | w0 = this.width; |
| | 511 | if (w0 > w00) { |
| | 512 | TheImg = this; |
| | 513 | n = TheImg.nameProp; |
| | 514 | w00 = w0; |
| | 515 | } |
| | 516 | }); |
| | 517 | |
| | 518 | pos_image = jQuery(TheImg).info(); |
| | 519 | pos_page = jQuery("#the_page").info(); |
| | 520 | |
| | 521 | break |
| | 522 | case "img": |
| | 523 | |
| | 524 | if (!TheImg) return; |
| | 525 | pos_image = jQuery(TheImg).info(); |
| | 526 | pos_page = jQuery("#the_page").info(); |
| | 527 | |
| | 528 | |
| | 529 | break |
| | 530 | case "img_autre": |
| | 531 | if (!TheImg) return; |
| | 532 | pos_image = jQuery(TheImg).position(); |
| | 533 | pos_page = jQuery("#the_page").position(); |
| | 534 | |
| | 535 | |
| | 536 | break |
| | 537 | case "embed": |
| | 538 | // |
| | 539 | |
| | 540 | TheImg = jQuery(Cadre).find("embed"); |
| | 541 | |
| | 542 | pos_image = jQuery(Cadre).position(); |
| | 543 | pos_page = jQuery("#the_page").position(); |
| | 544 | if (rapport < 0) { |
| | 545 | img_height = parseInt(jQuery(TheImg).outerHeight()); |
| | 546 | img_width = parseInt(jQuery(TheImg).outerWidth()); |
| | 547 | |
| | 548 | img_reelle.height = img_height; |
| | 549 | img_reelle.width = img_width; |
| | 550 | |
| | 551 | } |
| | 552 | |
| | 553 | break |
| | 554 | case "charlie": |
| | 555 | |
| | 556 | TheImg = jQuery('#charlie object').get(0); |
| | 557 | pos_image = jQuery(Cadre).position(); |
| | 558 | pos_page = jQuery("#the_page").position(); |
| | 559 | if (rapport < 0) { |
| | 560 | img_height = parseInt(TheImg.height); |
| | 561 | img_width = parseInt(TheImg.width); |
| | 562 | |
| | 563 | img_reelle.height = parseInt(TheImg.height); |
| | 564 | img_reelle.width = parseInt(TheImg.width); |
| | 565 | } |
| | 566 | |
| | 567 | break |
| | 568 | case "pamoorama": |
| | 569 | //========================================================= |
| | 570 | var Images = jQuery("#pamoorama img"); |
| | 571 | var Image = jQuery("#pamoorama").find("img"); |
| | 572 | |
| | 573 | pos_image = jQuery("#pamoorama").info(); |
| | 574 | pos_page = jQuery("#the_page").info(); |
| | 575 | break |
| | 576 | |
| | 577 | |
| | 578 | } |
| | 579 | |
| | 580 | //=============== V�rification taille minimale autoriz�e ====================== |
| | 581 | miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); |
| | 582 | miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); |
| | 583 | |
| | 584 | |
| | 585 | var maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0"); |
| | 586 | maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0"); |
| | 587 | |
| | 588 | mini_width = parseInt(miniWidth); |
| | 589 | mini_height = parseInt(miniHeight); |
| | 590 | |
| | 591 | img_reelle.width = parseInt(img_reelle.width); |
| | 592 | |
| | 593 | |
| | 594 | if (img_reelle.width < mini_width) return; |
| | 595 | |
| | 596 | img_reelle.height = parseInt(img_reelle.height); |
| | 597 | if (img_reelle.height < parseInt(mini_height)) return; |
| | 598 | //================================================================================== |
| | 599 | if (rapport < 0) { |
| | 600 | |
| | 601 | img_init.height = parseInt(img_height); |
| | 602 | img_init.width = parseInt(img_width); |
| | 603 | |
| | 604 | rapport = img_width / img_height; |
| | 605 | |
| | 606 | if (Type_Img != "map") |
| | 607 | rapport = (img_init.width / img_init.height); |
| | 608 | else |
| | 609 | rapport = 0; |
| | 610 | |
| | 611 | } |
| | 612 | |
| | 613 | |
| | 614 | //=============== Zone d'affichage ============================ |
| | 615 | |
| | 616 | borderW = Get_Val_int(zone_affichage.borderwidth.left, 2); |
| | 617 | borderW += Get_Val_int(zone_affichage.borderwidth.right, 2); |
| | 618 | |
| | 619 | |
| | 620 | zone_affichage.width = winwidth - borderW; |
| | 621 | zone_affichage.height = winheight - marge_top; |
| | 622 | |
| | 623 | |
| | 624 | |
| | 625 | //=========================================================================== |
| | 626 | var sel0 = { top: 0 }; |
| | 627 | |
| | 628 | |
| | 629 | |
| | 630 | |
| | 631 | |
| | 632 | //================================================================================== |
| | 633 | jQuery("#theImage #theImg IMG").css("marginTop", "0px") |
| | 634 | |
| | 635 | var h = 15; |
| | 636 | if (theme.match(RegExp("sobre", "g"))) { |
| | 637 | h += 0; //?? |
| | 638 | } else if (theme.match(RegExp("Pure", "g"))) { |
| | 639 | h += 0; //?? |
| | 640 | } else if (theme.match(RegExp("luciano", "g"))) { |
| | 641 | h += 0; //?? |
| | 642 | } else if (theme.match(RegExp("simple", "g"))) { |
| | 643 | h += 0; //?? |
| | 644 | } else if (theme.match(RegExp("gally", "g"))) { |
| | 645 | h += 0; //?? |
| | 646 | |
| | 647 | } |
| | 648 | //================ Licence ======================== |
| | 649 | var Licence = jQuery(".licencetag"); |
| | 650 | if (Licence.length > 0) { |
| | 651 | jQuery(".licencetag").css("padding", "0px"); |
| | 652 | |
| | 653 | } |
| | 654 | //==================================================== |
| | 655 | info_img = jQuery(TheImg).info(); |
| | 656 | |
| | 657 | |
| | 658 | //========================================================================= |
| | 659 | img_top = Bandeau; |
| | 660 | //============ Padding image ? =============== |
| | 661 | |
| | 662 | img_padding_top = Get_Val_int(info_img.padding.top); |
| | 663 | img_padding_top += Get_Val_int(info_img.padding.bottom); |
| | 664 | img_padding_top += Get_Val_int(info_img.borderwidth.top); |
| | 665 | img_padding_top += Get_Val_int(info_img.borderwidth.bottom); |
| | 666 | |
| | 667 | margin_top = Get_Val_int(info_Cadre.margin.top); |
| | 668 | padding_top = Get_Val_int(info_Cadre.padding.top); |
| | 669 | padding_top += Get_Val_int(info_Cadre.padding.bottom); |
| | 670 | |
| | 671 | Marge_Basse = parseInt(marge_basse || 0); // hors bandeau |
| | 672 | //========================================================================== |
| | 673 | h = 0; |
| | 674 | zone_affichage.height = winheight - Bandeau - Marge_Basse - h - margin_top - padding_top; |
| | 675 | var Image_height = zone_affichage.height - Bandeau_bas.height - img_padding_top; |
| | 676 | var Delta = zone_affichage.height - Image_height; |
| | 677 | |
| | 678 | //============================================================= |
| | 679 | var height_user = eval(user_status + "_height"); |
| | 680 | |
| | 681 | |
| | 682 | var reg1 = new RegExp("%", "g"); |
| | 683 | if (height_user.match(reg1)) |
| | 684 | Image_height = Image_height * parseInt(height_user) / 100; |
| | 685 | else |
| | 686 | Image_height = parseInt(height_user); |
| | 687 | |
| | 688 | //============================================================ |
| | 689 | echelle_max = parseFloat(echelle_max, '3'); |
| | 690 | var echelle = parseFloat(Image_height / img_reelle.height, 3); |
| | 691 | |
| | 692 | if (echelle > echelle_max) { echelle = echelle_max; } |
| | 693 | Image_height = parseInt(img_reelle.height * echelle); |
| | 694 | |
| | 695 | var Image_width; |
| | 696 | if (rapport > 0) |
| | 697 | Image_width = parseInt(Image_height * rapport); |
| | 698 | |
| | 699 | else if (Type_Img == "map") { |
| | 700 | Image_width = zone_affichage.width - marge_left - marge_right; |
| | 701 | |
| | 702 | if (theme.match(RegExp("gally", "g"))) { |
| | 703 | // Image_height -= "30"; |
| | 704 | } |
| | 705 | |
| | 706 | } else { |
| | 707 | Image_width = zone_affichage.width; |
| | 708 | } |
| | 709 | |
| | 710 | //=============================================================== |
| | 711 | align_auto = "center"; |
| | 712 | if (jQuery("#theImg").css("textAlign")) |
| | 713 | align_auto = jQuery("#theImg").css("textAlign"); |
| | 714 | var widthmin = Image_width; |
| | 715 | |
| | 716 | if (check_auto_w == 'checked="checked"') { |
| | 717 | // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { |
| | 718 | //==== largeur � atteindre === |
| | 719 | var width_user = eval(user_status + "_width"); |
| | 720 | // Largeur maximale en fonction du statut |
| | 721 | if (width_user.match(reg1)) |
| | 722 | // pourcentage |
| | 723 | widthmin = maxWidth * parseInt(width_user) / 100; |
| | 724 | else |
| | 725 | widthmin = parseInt(width_user); |
| | 726 | |
| | 727 | widthmin -= Get_Val_int(info_img.borderwidth.left); |
| | 728 | widthmin -= Get_Val_int(info_img.borderwidth.right); |
| | 729 | |
| | 730 | |
| | 731 | |
| | 732 | if (Image_width > widthmin) { |
| | 733 | // Image_width largeur � atteindre |
| | 734 | // Calcul du rapport d'agrandissement |
| | 735 | var echelle_w = parseFloat((widthmin ) / img_reelle.width, 3); |
| | 736 | if (echelle_w > echelle_max) { echelle_w = echelle_max; } |
| | 737 | Image_width = parseInt(img_reelle.width * echelle_w); |
| | 738 | if (rapport > 0) |
| | 739 | Image_height = parseInt(Image_width / rapport); |
| | 740 | } |
| | 741 | |
| | 742 | |
| | 743 | |
| | 744 | } |
| | 745 | |
| | 746 | |
| | 747 | // } |
| | 748 | |
| | 749 | // zone_affichage.height = Image_height + Delta + info_pamoorama_footer.height; |
| | 750 | |
| | 751 | zoom = echelle; |
| | 752 | |
| | 753 | // zone_affichage.height *= zoom; |
| | 754 | // zone_affichage.width *= zoom; |
| | 755 | //=============LLGBO2 =========================== |
| | 756 | marges = 0; |
| | 757 | t1 = { top: 0 }; |
| | 758 | if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { |
| | 759 | llgboframe = jQuery("#gbo div:first"); |
| | 760 | marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); |
| | 761 | |
| | 762 | m1 = jQuery(llgboframe).outerHeight(); |
| | 763 | t1 = jQuery(llgboframe).position(); |
| | 764 | |
| | 765 | |
| | 766 | if (TheImg.src) { |
| | 767 | marge_top = t1.top - img_top; |
| | 768 | Image_height -= marge_top; |
| | 769 | Image_width = Image_height * rapport; |
| | 770 | if ((winwidth) < Image_width) { |
| | 771 | _width = maxWidth; |
| | 772 | } else { |
| | 773 | _width = Image_width; |
| | 774 | } |
| | 775 | |
| | 776 | |
| | 777 | jQuery("#gbo").outerWidth(_width); |
| | 778 | jQuery("#gbo").outerHeight(Image_height); |
| | 779 | jQuery("#gbo").css("width", (_width) + "px"); |
| | 780 | jQuery("#gbo").css("height", (Image_height) + "px"); |
| | 781 | |
| | 782 | Image_height -= marges; |
| | 783 | Image_width -= marges; |
| | 784 | |
| | 785 | } else { |
| | 786 | |
| | 787 | jQuery("#gbo").width(zone_affichage.width - marges); |
| | 788 | jQuery("#gbo").height(Image_height + marges) |
| | 789 | jQuery("#gbo").css("width", zone_affichage.width - marges + "px"); |
| | 790 | jQuery("#gbo").css("height", Image_height - marges + "px") |
| | 791 | |
| | 792 | } |
| | 793 | |
| | 794 | |
| | 795 | |
| | 796 | if (jQuery("area").length > 0) { |
| | 797 | jQuery("area").each(function (i) { |
| | 798 | |
| | 799 | obj1 = this.rel; |
| | 800 | obj2 = this.coords; |
| | 801 | if (obj1 == "up") |
| | 802 | this.coords = (Image_width / 3) + "," + 0 + "," + (Image_width * 2 / 3) + "," + Image_height; |
| | 803 | else if (obj1 == "prev") |
| | 804 | this.coords = 0 + "," + 0 + "," + (Image_width / 3) + "," + Image_height; |
| | 805 | else if (obj1 == "next") |
| | 806 | this.coords = (Image_width * 2) / 3 + "," + 0 + "," + (Image_width * 3 / 3) + "," + Image_height; |
| | 807 | |
| | 808 | }); |
| | 809 | |
| | 810 | |
| | 811 | |
| | 812 | |
| | 813 | |
| | 814 | |
| | 815 | } |
| | 816 | |
| | 817 | |
| | 818 | } |
| | 819 | |
| | 820 | //========================================================= |
| | 821 | // jQuery(Cadre).css("position", "relative"); |
| | 822 | |
| | 823 | jQuery(Cadre).css("top", "0px"); |
| | 824 | jQuery("#standard").css("top", 0 + "px"); |
| | 825 | jQuery("#comments").css("top", 0 + "px"); |
| | 826 | |
| | 827 | |
| | 828 | //jQuery("#copyright").css("top", 0 + "px"); |
| | 829 | |
| | 830 | |
| | 831 | jQuery("#linkNext").height(Image_height); |
| | 832 | jQuery("#linkPrev").height(Image_height); |
| | 833 | //================ Zone affichage ========================= |
| | 834 | // Image_height, Image_width = valeur a atteindre. |
| | 835 | if (theme.match(RegExp("luciano", "g"))) { |
| | 836 | zone_affichage.height -= Bandeau_bas; |
| | 837 | } |
| | 838 | |
| | 839 | // jQuery(Cadre).height(zone_affichage.height); |
| | 840 | // jQuery(Cadre).height(mb-zone_affichage.top); |
| | 841 | jQuery(Cadre).width(zone_affichage.width); |
| | 842 | //============================================================== |
| | 843 | |
| | 844 | img_finale.height = Image_height; |
| | 845 | img_finale.width = Image_width; |
| | 846 | //============================================================== |
| | 847 | |
| | 848 | if (typeof (gmaps) != "undefined") { |
| | 849 | Gmap_ = gmaps.maps[0]; |
| | 850 | if (Gmap_.sizeMode == 'A'); |
| | 851 | { |
| | 852 | jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" }); |
| | 853 | |
| | 854 | } |
| | 855 | } |
| | 856 | //============================================================== |
| | 857 | if (Type_Img == "charlie") { |
| | 858 | t1 = jQuery("#charlie").position(); |
| | 859 | /**/ |
| | 860 | pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight")); |
| | 861 | jQuery("#charlie").css({ |
| | 862 | width: Image_width + pdf, |
| | 863 | height: Image_height, |
| | 864 | margin: "auto" |
| | 865 | }); |
| | 866 | |
| | 867 | |
| | 868 | jQuery("#player").css("width", Image_width + 100 + "px"); |
| | 869 | jQuery("#player").css("height", Image_height); |
| | 870 | |
| | 871 | jQuery("#embedplayer").css("width", Image_width); |
| | 872 | jQuery("#embedplayer").css("height", Image_height); |
| | 873 | |
| | 874 | |
| | 875 | jQuery("object").width(Image_width); |
| | 876 | jQuery("object").height(Image_height); |
| | 877 | } else if (Type_Img == "panorama") { |
| | 878 | |
| | 879 | // jQuery(TheImg).panorama2(img_finale.height, img_finale.width); |
| | 880 | jQuery(TheImg).height(img_finale.height); |
| | 881 | jQuery(TheImg).width(img_finale.width); |
| | 882 | jQuery("#Panorama div").height(Image_height); |
| | 883 | // class=simple_panorama |
| | 884 | |
| | 885 | jQuery(".panorama-viewport").css("left", "2px"); |
| | 886 | jQuery(".panorama-viewport").css("width", "auto"); |
| | 887 | // setTimeout("cl_Timer()", 500); |
| | 888 | |
| | 889 | } else if (Type_Img == "pamoorama") { |
| | 890 | return; |
| | 891 | marge_left += 0; |
| | 892 | new_width = zone_affichage.width - marge_right - marge_left; |
| | 893 | jQuery("#pamoorama").css({ margin: 0 + "px", |
| | 894 | left: marge_left + "px", |
| | 895 | height: Image_height + info_pamoorama_footer.height + "px", |
| | 896 | width: new_width + "px" |
| | 897 | }); |
| | 898 | |
| | 899 | jQuery("#pamoorama").width(new_width); |
| | 900 | |
| | 901 | |
| | 902 | jQuery("#pamoorama_outter").css({ |
| | 903 | left: marge_left + "px", |
| | 904 | height: Image_height + "px", |
| | 905 | width: (new_width) + "px" |
| | 906 | }); |
| | 907 | jQuery("#pamoorama_outter").width(new_width); |
| | 908 | |
| | 909 | |
| | 910 | jQuery("#pamoorama_footer").width((zone_affichage.width - marge_right - marge_left)); |
| | 911 | jQuery("#pamoorama_footer").css('width', (zone_affichage.width - marge_right - marge_left) + "px"); |
| | 912 | zoom = Image_height / img_height; |
| | 913 | info_pamoorama_outter = jQuery("#pamoorama_outter").info(); |
| | 914 | |
| | 915 | h_frame = jQuery("#pamoorama").width(); |
| | 916 | if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) { |
| | 917 | |
| | 918 | /* if (info_pamoorama_outter.width == 0) |
| | 919 | setTimeout("wait_Timer()", 100); |
| | 920 | */ |
| | 921 | // jQuery(TheImg).css("zoom", zoom); |
| | 922 | } |
| | 923 | |
| | 924 | |
| | 925 | } else if (TheImg.src) { |
| | 926 | //--- background ?? --- |
| | 927 | jQuery(TheImg).height(img_finale.height); |
| | 928 | jQuery(TheImg).width(img_finale.width); |
| | 929 | jQuery(TheImg).css("height", img_finale.height + "px"); |
| | 930 | jQuery(TheImg).css("width", img_finale.width + "px"); |
| | 931 | |
| | 932 | } else { |
| | 933 | //===map ? === |
| | 934 | jQuery(TheImg).height(img_finale.height); |
| | 935 | jQuery(TheImg).width(img_finale.width); |
| | 936 | jQuery(TheImg).css("height", img_finale.height + "px"); |
| | 937 | jQuery(TheImg).css("width", img_finale.width + "px"); |
| | 938 | } |
| | 939 | |
| | 940 | |
| | 941 | try { |
| | 942 | if (theme.match(RegExp("gally", "g"))) { |
| | 943 | |
| | 944 | jQuery("#navThumbNext").height(init_taille_thumblink.height * 2); |
| | 945 | jQuery("#navThumbPrev").height(init_taille_thumblink.height * 2); |
| | 946 | |
| | 947 | jQuery(".thumbLink").css("height", init_taille_thumblink.height + "px"); |
| | 948 | jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px"); |
| | 949 | |
| | 950 | jQuery(Cadre).height(zone_affichage.height); |
| | 951 | |
| | 952 | } else { |
| | 953 | |
| | 954 | jQuery("#imageToolBar").css("position", "static"); |
| | 955 | } |
| | 956 | } catch (e) { |
| | 957 | |
| | 958 | } |
| | 959 | // |
| | 960 | if (!pos) pos = jQuery("#copyright").position(); |
| | 961 | if (pos != jQuery("#copyright").position()) |
| | 962 | pos = jQuery("#copyright").position(); |
| | 963 | if (pos.top > 100) jQuery("#the_page").height(pos.top); |
| | 964 | |
| | 965 | if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return; |
| | 966 | jQuery(window).resize(); |
| | 967 | return; |
| | 968 | }); |
| | 969 | var pos; |
| | 970 | //=================================================================== |
| | 971 | jQuery(window).resize(); |
| | 972 | |
| | 973 | |
| | 974 | } // function |
| | 975 | ); // ready |