+\r
+/*\r
+ * Window\r
+ * by http://nurucom-archives.hp.infoseek.co.jp/digital/trans-uri.html\r
+ */\r
+\r
+/* 正規表現が使われているため、まだ投入しない itozyun\r
+window.encodeURI || (window.encodeURI = function (x) {\r
+ return ("" + x).replace(/[^!#$&-;=?-Z_a-z~]/g, function (s) {\r
+ var c = s.charCodeAt(0), p = "%";\r
+ return (\r
+ c < 16 ? "%0" + c.toString(16) :\r
+ c < 128 ? p + c.toString(16) :\r
+ c < 2048 ? p + (c >> 6 | 192).toString(16) + p + (c & 63 | 128).toString(16) :\r
+ p + (c >> 12 | 224).toString(16) + p + (c >> 6 & 63 | 128).toString(16) + p + (c & 63 | 128).toString(16)\r
+ ).toUpperCase();\r
+ });\r
+});\r
+\r
+window.encodeURIComponent || (window.encodeURIComponent = function (x) {\r
+ return ("" + x).replace(/[^!'-*.0-9A-Z_a-z~-]/g, function (s) {\r
+ var c = s.charCodeAt(0), p = "%";\r
+ return (\r
+ c < 16 ? "%0" + c.toString(16) :\r
+ c < 128 ? p + c.toString(16) :\r
+ c < 2048 ? p + (c >> 6 | 192).toString(16) + p + (c & 63 | 128).toString(16) :\r
+ p + (c >> 12 | 224).toString(16) + p + (c >> 6 & 63 | 128).toString(16) + p + (c & 63 | 128).toString(16)\r
+ ).toUpperCase();\r
+ });\r
+});\r
+\r
+// 手抜き\r
+window.decodeURI || (window.decodeURI = function (x) {\r
+ return ("" + x).replace(/%(E(0%[AB]|[1-CEF]%[89AB]|D%[89])[0-9A-F]|C[2-9A-F]|D[0-9A-F])%[89AB][0-9A-F]|%[0-7][0-9A-F]/ig, function (s) {\r
+ var c = parseInt(s.substring(1), 16);\r
+ return String.fromCharCode(\r
+ c < 128 ? c :\r
+ c < 224 ? (c & 31) << 6 | parseInt(s.substring(4), 16) & 63 :\r
+ ((c & 15) << 6 | parseInt(s.substring(4), 16) & 63) << 6 | parseInt(s.substring(7), 16) & 63\r
+ );\r
+ });\r
+});\r
+*/\r
+\r
+\r
+//window.decodeURIComponent || (window.decodeURIComponent = window.decodeURI);\r
+\r
+\r
+/*\r
+ * String\r
+ */\r
+\r
+// replace(RegExp, Function)対応\r
+/*\r
+if (window.ActiveXObject ? !Number.prototype.toFixed : (!navigator.taintEnabled && !document.createElement("input").setSelectionRange))\r
+ (function () {\r
+ var g = String.prototype.replace;\r
+ String.prototype.replace = function (x, y) {\r
+ var s = this, z = y;\r
+ // 第二引数が関数\r
+ if (y instanceof Function) {\r
+ // 第一引数が正規表現\r
+ if (x instanceof RegExp) {\r
+ // その上、グローバルマッチ\r
+ if (x.global || /^\/.*g$/.test(x)) {\r
+ var r = [], m;\r
+ while ((m = x.exec(s)) != null) {\r
+ var i = m.index;\r
+ r[r.length] = s.slice(0, i);\r
+ s = s.slice(i + m[0].length);\r
+ r[r.length] = y.apply(null, m.concat(i, this));\r
+ }\r
+ r[r.length] = s;\r
+ return r.join("");\r
+ }\r
+ var m = x.exec(s);\r
+ if (!m)\r
+ return s;\r
+ z = y.apply(null, m.concat(m.index, s));\r
+ }\r
+ else {\r
+ var i = s.indexOf(x);\r
+ if (i < 0)\r
+ return s;\r
+ z = y(x, i, s);\r
+ }\r
+ }\r
+ return g.call(s, x, z);\r
+ };\r
+ })(); */\r
+ \r
+/*\r
+ * Safari の JavaScript の不備 \r
+ * http://nanto.asablo.jp/blog/2006/01/13/209495\r
+ * \r
+ * web.paulownia.jp - JavaScriptとクロージャ\r
+ * https://web.archive.org/web/20070526063400/http://web.paulownia.jp/script/oop/closure.html\r
+ * MacOSX 10.3のsafariにはhasOwnPropertyが実装されていないので、独自に追加する必要があります。\r
+ */\r
+/*\r
+Object.prototype.hasOwnProperty || (Object.prototype.hasOwnProperty = function( p ){\r
+ var proto = this.constructor && this.constructor.prototype,\r
+ __p__ = proto && ( '__proto__' in proto ) && proto.__proto__,\r
+ v = this[ p ],\r
+ nan = v !== v, // isNaN\r
+ r = false, save;\r
+ \r
+ if( __p__ ) proto.__proto__ = v === null ? undefined : null;\r
+ \r
+ if( nan ){\r
+ if( proto[ p ] !== proto[ p ] ){ // proto is NaN\r
+ proto[ p ] = 0; // different value\r
+ r = this[ p ] !== this[ p ]; // isNaN\r
+ proto[ p ] = NaN; // proto で定義されていた.\r
+ } else {\r
+ r = true;\r
+ };\r
+ } else\r
+ if( p in this ){\r
+ if( !proto || !( p in proto ) || ( proto[ p ] !== v ) ){\r
+ r = true;\r
+ } else {\r
+ // this と proto に同名で同値が書かれている可能性あり\r
+ save = proto[ p ];\r
+ proto[ p ] = v + ' '; // different value\r
+ r = v === this[ p ];\r
+ \r
+ delete proto[ p ];\r
+ \r
+ if( proto[ p ] !== v ){\r
+ // proto で定義されていた.\r
+ proto[ p ] = save; \r
+ };\r
+ };\r
+ };\r
+ \r
+ if( __p__ ) proto.__proto__ = __p__;\r
+ \r
+ return r;\r
+ });*/\r