2 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3 * Copyright (C) 2002-2012 The Nucleus Group
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * (see nucleus/documentation/index.html#license for more info)
11 * Javascript code to make sure that:
12 * - javascript still works when sending pages as application/xhtml+xml
13 * - this doesn't break functionality in IE
17 * - Use createElement() instead of document.createElement()
19 * That's basically it :)
21 * $Id: compatibility.js 1388 2009-07-18 06:31:28Z shizuki $
24 // to get the script working when page is sent as application/xhtml+xml
25 function createElement(element) {
26 if (document.createElementNS) {
27 return document.createElementNS('http://www.w3.org/1999/xhtml', element);
29 if (document.createElement) {
30 return document.createElement(element);