var onload_funcs = new Array(); var is_ie = false; function __onload_handler() { // Adapted from Dean Edwards's code @ http://dean.edwards.name/my/busted3.html if (document.addEventListener) { document.addEventListener("DOMContentLoaded", initNakama, false); } // Internet Explorer (using conditional comments) /*@cc_on @*/ /*@if (@_win32) is_ie = true; document.write("'); } function getHexValueForColor(c) { if (!c) { return ''; } str = c.toLowerCase(); if (str == "transparent") { str = ''; } else if (str.indexOf('rgb') === 0) { function tohex(inval) { inval = parseInt(inval); var out = '0123456789ABCDEF'.charAt(inval / 16); out += '0123456789ABCDEF'.charAt(inval % 16); return out; } var j; j = (str.substr(4, str.indexOf(')') - 4)).split(','); str = '#' + tohex(j[0]) + tohex(j[1]) + tohex(j[2]); } if (str.indexOf('#') === 0) { if (str.length == 4) { // transformons #xyz en #xxyyzz str = '' + str.charAt(1) + str.charAt(1) + str.charAt(2) + str.charAt(2) + str.charAt(3) + str.charAt(3); } else { // virons les # str = str.substr(1); } } else { str = ''; } return str.toUpperCase(); } function getStylePropertyValueWithRoot(root, elm, property) { if (elm) { if (root.all && elm.currentStyle) { property = property.replace(/\-([a-z])/g, function(match, chr) { return chr.toUpperCase(); }); if (elm.currentStyle[property]) { return (elm.currentStyle[property]); } } else if (root.defaultView && root.defaultView.getComputedStyle) { var cs = root.defaultView.getComputedStyle(elm, null); if (!cs) { return false; } return cs.getPropertyValue(property, null); } } return false; } function getColorValueForProperty(root, elm, property, defaultValue) { var v = getStylePropertyValueWithRoot(root, elm, property); var c = getHexValueForColor(v); if (!c) { c = defaultValue; } return c; } function generateVocalPlayer() { var elm = document.getElementById('cybercop'); var color = false if (elm) { color = getColorValueForProperty(document, elm, 'background-color', false) } if (!color) { elm = document.getElementById('barleft'); if (elm) color = getColorValueForProperty(document, elm, 'background-color', '000000') else color = '000000' } if (typeof blog_id_skynaute != 'undefined') var __id_skynaute = blog_id_skynaute else if (typeof profil_id_skynaute != 'undefined') var __id_skynaute = profil_id_skynaute else return; elm = document.getElementById('mvocal'); var str = ''; str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; elm.innerHTML = str; } function captcha_refresh() { var c = document.getElementById('captcha_captcha'); if (c) { c.src = c.src.replace(/replaceme([0-9]+)replaceme/, 'replaceme' + (new Date().getTime()) + 'replaceme'); } } /* Copyright (c) 2007-2008, Google All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ function contains(parent, descendant) { // IE / Safari(some) DOM if (typeof parent.contains != 'undefined') { return parent == descendant || parent.contains(descendant); } // W3C DOM Level 3 if (typeof parent.compareDocumentPosition != 'undefined') { return parent == descendant || Boolean(parent.compareDocumentPosition(descendant) & 16); } // W3C DOM Level 1 while (descendant && parent !== descendant && descendant.tagName.toLowerCase() != "body") { descendant = descendant.parentNode; } return descendant == parent; }