0,0 → 1,78 |
var _hidediv = null; |
function showdiv(id) { |
if (_hidediv) |
_hidediv(); |
var div = document.getElementById(id); |
div.style.display = 'block'; |
_hidediv = function () { div.style.display = 'none'; }; |
} |
|
var _showdiv = null; |
function hidediv(id) { |
if (_showdiv) |
_showdiv(); |
var div = document.getElementById(id); |
div.style.display = 'none'; |
_showdiv = function () { div.style.display = 'block'; }; |
} |
|
function switchInfoPerso(id) { |
var divInfo = document.getElementById(id); |
if (divInfo.style.display == 'none') |
divInfo.style.display = 'block'; |
else |
divInfo.style.display = 'none'; |
} |
|
var _hidediv_mobile = null; |
function showdiv_mobile(id) { |
if (_hidediv_mobile) |
_hidediv_mobile(); |
var div = document.getElementById(id); |
div.style.display = 'block'; |
_hidediv_mobile = function () { div.style.display = 'none'; }; |
} |
|
var _showdiv_mobile = null; |
function hidediv_mobile(id) { |
if (_showdiv_mobile) |
_showdiv_mobile(); |
var div = document.getElementById(id); |
div.style.display = 'none'; |
_showdiv_mobile = function () { div.style.display = 'block'; }; |
} |
|
var _hidediv_mobile_validate = null; |
function showdiv_mobile_validate(id) { |
if (_hidediv_mobile_validate) |
_hidediv_mobile_validate(); |
var div = document.getElementById(id); |
div.style.display = 'block'; |
_hidediv_mobile_validate = function () { div.style.display = 'none'; }; |
} |
|
var _showdiv_mobile_validate = null; |
function hidediv_mobile_validate(id) { |
if (_showdiv_mobile_validate) |
_showdiv_mobile_validate(); |
var div = document.getElementById(id); |
div.style.display = 'none'; |
_showdiv_mobile_validate = function () { div.style.display = 'block'; }; |
} |
|
function _onload() { |
|
// In sub-folders we need <base href="../">, however, |
// then <a href="#top"> won't work anymore. |
// So, this code will find all anchor-links and convert them |
// to absolute paths. |
var elems = document.getElementsByTagName("a"); |
for (var i = 0; i < elems.length; i++) { |
var s = elems[i].getAttribute('href'); |
if ((s != null) && (s.substr(0, 1) == "#")) { |
//console.log("Changed " + s); |
elems[i].setAttribute('href', document.location.href.split("#")[0] + s); |
} |
} |
|
} |