Subversion Repositories oidinfo_new_design

Rev

View as "text/javascript" | Blame | Last modification | View Log | RSS feed

  1. var _hidediv = null;
  2. function showdiv(id) {
  3.     if (_hidediv)
  4.         _hidediv();
  5.     var div = document.getElementById(id);
  6.     div.style.display = 'block';
  7.     _hidediv = function () { div.style.display = 'none'; };
  8. }
  9.  
  10. var _showdiv = null;
  11. function hidediv(id) {
  12.     if (_showdiv)
  13.         _showdiv();
  14.     var div = document.getElementById(id);
  15.     div.style.display = 'none';
  16.     _showdiv = function () { div.style.display = 'block'; };
  17. }
  18.  
  19. function switchInfoPerso(id) {
  20.     var divInfo = document.getElementById(id);
  21.     if (divInfo.style.display == 'none')
  22.         divInfo.style.display = 'block';
  23.     else
  24.         divInfo.style.display = 'none';
  25. }
  26.  
  27. var _hidediv_mobile = null;
  28. function showdiv_mobile(id) {
  29.     if (_hidediv_mobile)
  30.         _hidediv_mobile();
  31.     var div = document.getElementById(id);
  32.     div.style.display = 'block';
  33.     _hidediv_mobile = function () { div.style.display = 'none'; };
  34. }
  35.  
  36. var _showdiv_mobile = null;
  37. function hidediv_mobile(id) {
  38.     if (_showdiv_mobile)
  39.         _showdiv_mobile();
  40.     var div = document.getElementById(id);
  41.     div.style.display = 'none';
  42.     _showdiv_mobile = function () { div.style.display = 'block'; };
  43. }
  44.  
  45. var _hidediv_mobile_validate = null;
  46. function showdiv_mobile_validate(id) {
  47.     if (_hidediv_mobile_validate)
  48.         _hidediv_mobile_validate();
  49.     var div = document.getElementById(id);
  50.     div.style.display = 'block';
  51.     _hidediv_mobile_validate = function () { div.style.display = 'none'; };
  52. }
  53.  
  54. var _showdiv_mobile_validate = null;
  55. function hidediv_mobile_validate(id) {
  56.     if (_showdiv_mobile_validate)
  57.         _showdiv_mobile_validate();
  58.     var div = document.getElementById(id);
  59.     div.style.display = 'none';
  60.     _showdiv_mobile_validate = function () { div.style.display = 'block'; };
  61. }
  62.  
  63. function _onload() {
  64.  
  65.     // In sub-folders we need <base href="../">, however,
  66.     // then <a href="#top"> won't work anymore.
  67.     // So, this code will find all anchor-links and convert them
  68.     // to absolute paths.
  69.     var elems = document.getElementsByTagName("a");
  70.     for (var i = 0; i < elems.length; i++) {
  71.         var s = elems[i].getAttribute('href');
  72.         if ((s != null) && (s.substr(0, 1) == "#")) {
  73.             //console.log("Changed " + s);
  74.             elems[i].setAttribute('href', document.location.href.split("#")[0] + s);
  75.         }
  76.     }
  77.  
  78. }
  79.