2 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3 * Copyright (C) 2002-2011 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 :)
22 * $NucleusJP: compatibility.js,v 1.4 2006/07/12 07:11:47 kimitake Exp $
25 // to get the script working when page is sent as application/xhtml+xml
26 function createElement(element) {
27 if (document.createElementNS) {
28 return document.createElementNS('http://www.w3.org/1999/xhtml', element);
30 if (document.createElement) {
31 return document.createElement(element);