source for sakino.kelbie.scot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

600 lines
20 KiB

7 months ago
  1. //<!--
  2. // Ultimate client-side JavaScript client sniff. Version 3.03
  3. // (C) Netscape Communications 1999-2001. Permission granted to reuse and distribute.
  4. // Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
  5. // Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
  6. // also added support for IE5.5 Opera4&5 HotJava3 AOLTV
  7. // Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4,
  8. // correct Opera 5 detection
  9. // add support for winME and win2k
  10. // synch with browser-type-oo.js
  11. // Revised 26 Mar 01 to correct Opera detection
  12. // Revised 02 Oct 01 to add IE6 detection
  13. // Everything you always wanted to know about your JavaScript client
  14. // but were afraid to ask. Creates "is_" variables indicating:
  15. // (1) browser vendor:
  16. // is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV
  17. // (2) browser version number:
  18. // is_major (integer indicating major version number: 2, 3, 4 ...)
  19. // is_minor (float indicating full version number: 2.02, 3.01, 4.04 ...)
  20. // (3) browser vendor AND major version number
  21. // is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3,
  22. // is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up,
  23. // is_opera2, is_opera3, is_opera4, is_opera5, is_opera5up
  24. // (4) JavaScript version number:
  25. // is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...)
  26. // (5) OS platform and version:
  27. // is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k
  28. // is_os2
  29. // is_mac, is_mac68k, is_macppc
  30. // is_unix
  31. // is_sun, is_sun4, is_sun5, is_suni86
  32. // is_irix, is_irix5, is_irix6
  33. // is_hpux, is_hpux9, is_hpux10
  34. // is_aix, is_aix1, is_aix2, is_aix3, is_aix4
  35. // is_linux, is_sco, is_unixware, is_mpras, is_reliant
  36. // is_dec, is_sinix, is_freebsd, is_bsd
  37. // is_vms
  38. //
  39. // See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and
  40. // http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html
  41. // for detailed lists of userAgent strings.
  42. //
  43. // Note: you don't want your Nav4 or IE4 code to "turn off" or
  44. // stop working when new versions of browsers are released, so
  45. // in conditional code forks, use is_ie5up ("IE 5.0 or greater")
  46. // is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
  47. // to check version in code which you want to work on future
  48. // versions.
  49. // convert all characters to lowercase to simplify testing
  50. var agt=navigator.userAgent.toLowerCase();
  51. // *** BROWSER VERSION ***
  52. // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
  53. var is_major = parseInt(navigator.appVersion);
  54. var is_minor = parseFloat(navigator.appVersion);
  55. // Note: Opera and WebTV spoof Navigator. We do strict client detection.
  56. // If you want to allow spoofing, take out the tests for opera and webtv.
  57. var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
  58. && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
  59. && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
  60. var is_nav2 = (is_nav && (is_major == 2));
  61. var is_nav3 = (is_nav && (is_major == 3));
  62. var is_nav4 = (is_nav && (is_major == 4));
  63. var is_nav4up = (is_nav && (is_major >= 4));
  64. var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) ||
  65. (agt.indexOf("; nav") != -1)) );
  66. var is_nav6 = (is_nav && (is_major == 5));
  67. var is_nav6up = (is_nav && (is_major >= 5));
  68. var is_gecko = (agt.indexOf('gecko') != -1);
  69. var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
  70. var is_ie3 = (is_ie && (is_major < 4));
  71. var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
  72. var is_ie4up = (is_ie && (is_major >= 4));
  73. var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
  74. var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
  75. var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
  76. var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
  77. var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
  78. var is_ie6up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
  79. // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
  80. // or if this is the first browser window opened. Thus the
  81. // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
  82. var is_aol = (agt.indexOf("aol") != -1);
  83. var is_aol3 = (is_aol && is_ie3);
  84. var is_aol4 = (is_aol && is_ie4);
  85. var is_aol5 = (agt.indexOf("aol 5") != -1);
  86. var is_aol6 = (agt.indexOf("aol 6") != -1);
  87. var is_opera = (agt.indexOf("opera") != -1);
  88. var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
  89. var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
  90. var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
  91. var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
  92. var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
  93. var is_webtv = (agt.indexOf("webtv") != -1);
  94. var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
  95. var is_AOLTV = is_TVNavigator;
  96. var is_hotjava = (agt.indexOf("hotjava") != -1);
  97. var is_hotjava3 = (is_hotjava && (is_major == 3));
  98. var is_hotjava3up = (is_hotjava && (is_major >= 3));
  99. // *** JAVASCRIPT VERSION CHECK ***
  100. var is_js;
  101. if (is_nav2 || is_ie3) is_js = 1.0;
  102. else if (is_nav3) is_js = 1.1;
  103. else if (is_opera5up) is_js = 1.3;
  104. else if (is_opera) is_js = 1.1;
  105. else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
  106. else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
  107. else if (is_hotjava3up) is_js = 1.4;
  108. else if (is_nav6 || is_gecko) is_js = 1.5;
  109. // NOTE: In the future, update this code when newer versions of JS
  110. // are released. For now, we try to provide some upward compatibility
  111. // so that future versions of Nav and IE will show they are at
  112. // *least* JS 1.x capable. Always check for JS version compatibility
  113. // with > or >=.
  114. else if (is_nav6up) is_js = 1.5;
  115. // NOTE: ie5up on mac is 1.4
  116. else if (is_ie5up) is_js = 1.3
  117. // HACK: no idea for other browsers; always check for JS version with > or >=
  118. else is_js = 0.0;
  119. // *** PLATFORM ***
  120. var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
  121. // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
  122. // Win32, so you can't distinguish between Win95 and WinNT.
  123. var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
  124. // is this a 16 bit compiled version?
  125. var is_win16 = ((agt.indexOf("win16")!=-1) ||
  126. (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) ||
  127. (agt.indexOf("windows 16-bit")!=-1) );
  128. var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
  129. (agt.indexOf("windows 16-bit")!=-1));
  130. var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
  131. var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1));
  132. // NOTE: Reliable detection of Win98 may not be possible. It appears that:
  133. // - On Nav 4.x and before you'll get plain "Windows" in userAgent.
  134. // - On Mercury client, the 32-bit version will return "Win98", but
  135. // the 16-bit version running on Win98 will still return "Win95".
  136. var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
  137. var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
  138. var is_win32 = (is_win95 || is_winnt || is_win98 ||
  139. ((is_major >= 4) && (navigator.platform == "Win32")) ||
  140. (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));
  141. var is_os2 = ((agt.indexOf("os/2")!=-1) ||
  142. (navigator.appVersion.indexOf("OS/2")!=-1) ||
  143. (agt.indexOf("ibm-webexplorer")!=-1));
  144. var is_mac = (agt.indexOf("mac")!=-1);
  145. // hack ie5 js version for mac
  146. if (is_mac && is_ie5up) is_js = 1.4;
  147. var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) ||
  148. (agt.indexOf("68000")!=-1)));
  149. var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) ||
  150. (agt.indexOf("powerpc")!=-1)));
  151. var is_sun = (agt.indexOf("sunos")!=-1);
  152. var is_sun4 = (agt.indexOf("sunos 4")!=-1);
  153. var is_sun5 = (agt.indexOf("sunos 5")!=-1);
  154. var is_suni86= (is_sun && (agt.indexOf("i86")!=-1));
  155. var is_irix = (agt.indexOf("irix") !=-1); // SGI
  156. var is_irix5 = (agt.indexOf("irix 5") !=-1);
  157. var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));
  158. var is_hpux = (agt.indexOf("hp-ux")!=-1);
  159. var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1));
  160. var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1));
  161. var is_aix = (agt.indexOf("aix") !=-1); // IBM
  162. var is_aix1 = (agt.indexOf("aix 1") !=-1);
  163. var is_aix2 = (agt.indexOf("aix 2") !=-1);
  164. var is_aix3 = (agt.indexOf("aix 3") !=-1);
  165. var is_aix4 = (agt.indexOf("aix 4") !=-1);
  166. var is_linux = (agt.indexOf("inux")!=-1);
  167. var is_sco = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
  168. var is_unixware = (agt.indexOf("unix_system_v")!=-1);
  169. var is_mpras = (agt.indexOf("ncr")!=-1);
  170. var is_reliant = (agt.indexOf("reliantunix")!=-1);
  171. var is_dec = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) ||
  172. (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) ||
  173. (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1));
  174. var is_sinix = (agt.indexOf("sinix")!=-1);
  175. var is_freebsd = (agt.indexOf("freebsd")!=-1);
  176. var is_bsd = (agt.indexOf("bsd")!=-1);
  177. var is_unix = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux ||
  178. is_sco ||is_unixware || is_mpras || is_reliant ||
  179. is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);
  180. var is_vms = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));
  181. //--> end hide JavaScript
  182. var windowNumber = 0;
  183. var windowFrame = {width:0,height:0};
  184. var sizeMainWindow = {width:0,height:0};
  185. var mediaWindow = {top:0,left:0};
  186. var currentParams = {};
  187. /*
  188. if (opener && opener.windowFrame) {
  189. windowFrame = opener.windowFrame;
  190. }
  191. */
  192. function WindowOpenMain( width, height, windowName, param ) {
  193. sizeMainWindow.width = width;
  194. sizeMainWindow.height = height;
  195. if (windowNumber == 0) {
  196. var left = (screen.width - width) / 2;
  197. var top = (screen.height - height) / 2;
  198. }
  199. else {
  200. var tmp_left = (screen.width - width) / 2 + windowNumber * 20;
  201. var tmp_top = (screen.height - height) / 2 + windowNumber * 20;
  202. var left = Math.max(0, Math.min(tmp_left, screen.width - width));
  203. var top = Math.max(0, Math.min(tmp_top, screen.height - height));
  204. }
  205. var keyword = param.keyword;
  206. var pagecode = param.pagecode;
  207. var sid = param.sid;
  208. var paramStr = "";
  209. if(keyword){
  210. keyword = encodeURI(keyword);
  211. paramStr = "?k=" + keyword;
  212. }else{
  213. paramStr = "?";
  214. }
  215. if(sid){
  216. if(paramStr != "?"){
  217. paramStr = paramStr + "&";
  218. }
  219. paramStr = paramStr + "sid=" + sid;
  220. }
  221. if(pagecode){
  222. if(paramStr != "?"){
  223. paramStr = paramStr + "&";
  224. }
  225. paramStr = paramStr + "pagecode=" + pagecode;
  226. }else{
  227. if(paramStr == "?"){
  228. paramStr = "";
  229. }
  230. }
  231. var hwnd = window.open("_SWF_Window.html" + paramStr, windowName, "width=" + width + ",height=" + height + ","
  232. + "resizable=" + ((param.resizable)?param.resizable:'yes') + ","
  233. + "screenX=" + left + ","
  234. + "screenY=" + top + ","
  235. + "left=" + left + ","
  236. + "top=" + top + ","
  237. + "scrollbars=no"
  238. );
  239. windowNumber++;
  240. if (is_ie) {
  241. windowFrame.width = tmp_left - left;
  242. windowFrame.height = tmp_top - top;
  243. }
  244. }
  245. function WindowOpenSample( width, height, windowName, param ) {
  246. sizeMainWindow.width = width;
  247. sizeMainWindow.height = height;
  248. if (windowNumber == 0) {
  249. var left = (screen.width - width) / 2;
  250. var top = (screen.height - height) / 2;
  251. }
  252. else {
  253. var tmp_left = (screen.width - width) / 2 + windowNumber * 20;
  254. var tmp_top = (screen.height - height) / 2 + windowNumber * 20;
  255. var left = Math.max(0, Math.min(tmp_left, screen.width - width));
  256. var top = Math.max(0, Math.min(tmp_top, screen.height - height));
  257. }
  258. var hwnd = window.open("_SWF_Window.html?mode=1063", windowName, "width=" + width + ",height=" + height + ","
  259. + "resizable=" + ((param.resizable)?param.resizable:'yes') + ","
  260. + "screenX=" + left + ","
  261. + "screenY=" + top + ","
  262. + "left=" + left + ","
  263. + "top=" + top + ","
  264. + "scrollbars=no"
  265. );
  266. windowNumber++;
  267. if (is_ie) {
  268. windowFrame.width = tmp_left - left;
  269. windowFrame.height = tmp_top - top;
  270. }
  271. }
  272. function WindowOpenMedia( url, params ) {
  273. var width_match = new String(params.match( /width=([0-9]+)/i ));
  274. var height_match = new String(params.match( /height=([0-9]+)/i ));
  275. var width = width_match.substring(width_match.indexOf(",")+1);
  276. var height = height_match.substring(height_match.indexOf(",")+1);
  277. var left = (screen.width - width) / 2;
  278. var top = (screen.height - height) / 2;
  279. params = params + ((params == '')?'':',')
  280. + "resizable=yes,"
  281. + "screenX=" + left + ","
  282. + "screenY=" + top + ","
  283. + "left=" + left + ","
  284. + "top=" + top + "";
  285. var hwnd = window.open( url, "MediaWindow", params );
  286. }
  287. function getLeftMargin() {
  288. if (is_ie) {
  289. return windowFrame.width + 2;
  290. }
  291. if (is_gecko) {
  292. return 3;
  293. }
  294. if (is_opera) {
  295. return window.screenX;
  296. }
  297. return 0;
  298. }
  299. function getTopMargin() {
  300. if (is_ie) {
  301. return windowFrame.height + 2;
  302. }
  303. if (is_gecko) {
  304. return 23;
  305. }
  306. if (is_opera) {
  307. return window.screenY;
  308. }
  309. return 0;
  310. }
  311. function getWindowLeft() {
  312. if (is_ie) {
  313. return window.screenLeft;
  314. }
  315. if (is_gecko) {
  316. return window.screenX;
  317. }
  318. if (is_opera) {
  319. return window.screenX;
  320. }
  321. return (window.screenLeft | window.screenX);
  322. }
  323. function getWindowTop() {
  324. if (is_ie) {
  325. return window.screenTop;
  326. }
  327. if (is_gecko) {
  328. return window.screenY;
  329. }
  330. if (is_opera) {
  331. return window.screenY;
  332. }
  333. return (window.screenTop | window.screenY);
  334. }
  335. function getInnerWidth() {
  336. if (is_ie) {
  337. return document.body.clientWidth;
  338. }
  339. if (is_gecko) {
  340. return window.innerWidth;
  341. }
  342. if (is_opera) {
  343. return window.innerWidth;
  344. }
  345. return (window.innerWidth | document.body.clientWidth);
  346. }
  347. function getInnerHeight() {
  348. if (is_ie) {
  349. return document.body.clientHeight;
  350. }
  351. if (is_gecko) {
  352. return window.innerHeight;
  353. }
  354. if (is_opera) {
  355. return window.innerHeight;
  356. }
  357. return (window.innerHeight | document.body.clientHeight);
  358. }
  359. function getTopToolbarMargin() {
  360. if (is_ie) {
  361. return 0;//windowFrame.height + 2;
  362. }
  363. if (is_gecko) {
  364. return 67;
  365. }
  366. if (is_opera) {
  367. return 0;//window.screenY;
  368. }
  369. return 0;
  370. }
  371. function _parseParamString( str ) {
  372. var params = new Array;
  373. var tmp = str.match( /[^=,&]+=[^=,&]+/ig );
  374. for ( var i = 0 ; i < tmp.length ; i++ ) {
  375. var tmp2 = tmp[i].match( /([^=,&]+)=([^=,&]+)/i );
  376. params[tmp2[1]] = tmp2[2];
  377. }
  378. return params;
  379. }
  380. function _joinParamString( paramArray ) {
  381. var retString = "";
  382. for ( key in paramArray ) {
  383. retString += key + "=" + paramArray[key] + ",";
  384. }
  385. if (retString.length !== 0) {
  386. retString = retString.substring(0, retString.length - 1);
  387. }
  388. return retString;
  389. }
  390. function getMediaType( url ) {
  391. var ext = url.match( /(?:\.([^\/\.]+))?$/i );
  392. var type = "page";
  393. if (ext[1]) {
  394. switch (ext[1].toLowerCase()) {
  395. case "avi":
  396. case "asf":
  397. case "asx":
  398. case "wmv":
  399. type = "wmv";
  400. break;
  401. case "mp3":
  402. type = "mp3";
  403. break;
  404. case "swf":
  405. type = "swf";
  406. break;
  407. case "flv":
  408. type = "flv";
  409. break;
  410. case "mov":
  411. case "mpeg":
  412. case "mpg":
  413. case "mp4":
  414. type = "quicktime";
  415. break;
  416. case "jpg":
  417. case "jpeg":
  418. case "png":
  419. case "gif":
  420. type = "image";
  421. break;
  422. }
  423. }
  424. return type;
  425. }
  426. var typesProperty = {
  427. "page":{
  428. "toolbar":"yes"
  429. }, "wmv":{
  430. "toolbar":"no"
  431. },
  432. "mp3":{
  433. "toolbar":"no"
  434. },
  435. "swf":{
  436. "toolbar":"no"
  437. },
  438. "quicktime":{
  439. "toolbar":"no"
  440. },
  441. "image":{
  442. "toolbar":"no"
  443. },
  444. "flv":{
  445. "toolbar":"no"
  446. }
  447. };
  448. /**
  449. * メディア用Windowオープン関数
  450. *
  451. * @param string url URL
  452. * @param string paramString パラメータをkey1=value1,key2=value2,...の形式で指定する
  453. */
  454. function WindowOpenRelative( url, paramString ) {
  455. var params = _parseParamString(paramString);
  456. this.currentParams = _parseParamString(paramString);
  457. var type = getMediaType(url);
  458. if (!params.toolbar) {
  459. params.toolbar = typesProperty[type].toolbar;
  460. }
  461. if (opener && !opener.closed && opener.sizeMainWindow) {
  462. var autoScaleX = (opener && opener.sizeMainWindow.width != 0)?getInnerWidth() / opener.sizeMainWindow.width:1.0;
  463. var autoScaleY = (opener && opener.sizeMainWindow.height != 0)?getInnerHeight() / opener.sizeMainWindow.height:1.0;
  464. } else {
  465. var autoScaleX = getInnerWidth() / 1000;
  466. var autoScaleY = getInnerHeight() / 670;
  467. }
  468. // 20120830
  469. var scaleX = (params.scaleX)?Number(params.scaleX) / 100.0:autoScaleX;
  470. var scaleY = (params.scaleY)?Number(params.scaleY) / 100.0:autoScaleY;
  471. var width = Number(params.width) * scaleX;
  472. var height = Number(params.height) * scaleY;
  473. var relleft = Number(params.relleft) * scaleX;
  474. var reltop = Number(params.reltop) * scaleY;
  475. var left = getWindowLeft() + relleft/* + getLeftMargin()*/;
  476. var top = getWindowTop() + reltop - ((params.toolbar == "yes")?getTopToolbarMargin():0);
  477. // FullScreen
  478. if ((is_gecko || is_ie) && params.fullscreen == "yes") {
  479. left = 0;
  480. top = 0;
  481. width = screen.width - (windowFrame.width * 2);
  482. height = screen.height - (windowFrame.height);
  483. params.fullscreen = "no";
  484. }
  485. params.resizable = "yes";
  486. params.screenX = left;
  487. params.screenY = top;
  488. params.left = left;
  489. params.top = top;
  490. params.width = width;
  491. params.height = height;
  492. params.allowscriptaccess = "always";
  493. mediaWindow.width = width;
  494. mediaWindow.height = height;
  495. mediaWindow.top = top;
  496. mediaWindow.left = left;
  497. mediaWindow.type = type;
  498. if(type == "flv"){
  499. mediaWindow.type = "swf";
  500. mediaWindow.url = "FlvPlayer.swf";
  501. mediaWindow.swfpath = url;
  502. }else{
  503. mediaWindow.url = url;
  504. }
  505. var paramString = _joinParamString(params);
  506. mediaWindow.params = paramString;
  507. //var hwnd = window.open( "MediaTemplate.html", "_blank", paramString );
  508. document.getElementById("open").click();
  509. }
  510. function toBookLink(url){
  511. window.location = url;
  512. }
  513. function openMediaWindow(paramString){
  514. window.open('MediaTemplate.html', "_blank", paramString);
  515. }
  516. // 20120809
  517. function actimgrOpenMediaWindow(url,paramString){
  518. window.open(url+'MediaTemplate.html', "_blank", paramString);
  519. }
  520. function onLoadMediaWindow() {
  521. if (is_ie) {
  522. if (opener.currentParams.fullscreen != "yes") {
  523. var moveRelX = -(getWindowLeft() - opener.mediaWindow.left);
  524. var moveRelY = -(getWindowTop() - opener.mediaWindow.top);
  525. //window.moveBy(moveRelX, moveRelY);
  526. }
  527. }
  528. }
  529. function putMediaTag() {
  530. document.write("<script type=\"text/javascript\" src=\"./mediaModules/type_" + opener.mediaWindow.type + ".js\" charset=\"euc-jp\"></script>");
  531. }