国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

527 linhas
21KB

  1. <!--
  2. var cal;
  3. var isFocus=false; //是否为焦点
  4. //以上为 寒羽枫 2006-06-25 添加的变量
  5. //Download:http://www.codefans.net
  6. //选择日期 → 由 寒羽枫 2006-06-25 添加
  7. function SelectDate(obj,strFormat)
  8. {
  9. var date = new Date();
  10. var by = date.getFullYear()-50; //最小值 → 50 年前
  11. var ey = date.getFullYear()+50; //最大值 → 50 年后
  12. //cal = new Calendar(by, ey,1,strFormat); //初始化英文版,0 为中文版
  13. cal = (cal==null) ? new Calendar(by, ey, 0) : cal; //不用每次都初始化 2006-12-03 修正
  14. cal.dateFormatStyle = strFormat;
  15. cal.show(obj);
  16. }
  17. /**//**//**//**
  18. * 返回日期
  19. * @param d the delimiter
  20. * @param p the pattern of your date
  21. 2006-06-25 由 寒羽枫 修改为根据用户指定的 style 来确定;
  22. */
  23. //String.prototype.toDate = function(x, p) {
  24. String.prototype.toDate = function(style) {
  25. /**//**//**//*
  26. if(x == null) x = "-";
  27. if(p == null) p = "ymd";
  28. var a = this.split(x);
  29. var y = parseInt(a[p.indexOf("y")]);
  30. //remember to change this next century ;)
  31. if(y.toString().length <= 2) y += 2000;
  32. if(isNaN(y)) y = new Date().getFullYear();
  33. var m = parseInt(a[p.indexOf("m")]) - 1;
  34. var d = parseInt(a[p.indexOf("d")]);
  35. if(isNaN(d)) d = 1;
  36. return new Date(y, m, d);
  37. */
  38. var y = this.substring(style.indexOf('y'),style.lastIndexOf('y')+1);//年
  39. var m = this.substring(style.indexOf('M'),style.lastIndexOf('M')+1);//月
  40. var d = this.substring(style.indexOf('d'),style.lastIndexOf('d')+1);//日
  41. if(isNaN(y)) y = new Date().getFullYear();
  42. if(isNaN(m)) m = new Date().getMonth();
  43. if(isNaN(d)) d = new Date().getDate();
  44. var dt ;
  45. eval ("dt = new Date('"+ y+"', '"+(m-1)+"','"+ d +"')");
  46. return dt;
  47. }
  48. /**//**//**//**
  49. * 格式化日期
  50. * @param d the delimiter
  51. * @param p the pattern of your date
  52. * @author meizz
  53. */
  54. Date.prototype.format = function(style) {
  55. var o = {
  56. "M+" : this.getMonth() + 1, //month
  57. "d+" : this.getDate(), //day
  58. "h+" : this.getHours(), //hour
  59. "m+" : this.getMinutes(), //minute
  60. "s+" : this.getSeconds(), //second
  61. "w+" : "日一二三四五六".charAt(this.getDay()), //week
  62. "q+" : Math.floor((this.getMonth() + 3) / 3), //quarter
  63. "S" : this.getMilliseconds() //millisecond
  64. }
  65. if(/(y+)/.test(style)) {
  66. style = style.replace(RegExp.$1,
  67. (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  68. }
  69. for(var k in o){
  70. if(new RegExp("("+ k +")").test(style)){
  71. style = style.replace(RegExp.$1,
  72. RegExp.$1.length == 1 ? o[k] :
  73. ("00" + o[k]).substr(("" + o[k]).length));
  74. }
  75. }
  76. return style;
  77. };
  78. /**//**//**//**
  79. * 日历类
  80. * @param beginYear 1990
  81. * @param endYear 2010
  82. * @param lang 0(中文)|1(英语) 可自由扩充
  83. * @param dateFormatStyle "yyyy-MM-dd";
  84. * @version 2006-04-01
  85. * @author KimSoft (jinqinghua [at] gmail.com)
  86. * @update
  87. */
  88. function Calendar(beginYear, endYear, lang, dateFormatStyle) {
  89. this.beginYear = 1990;
  90. this.endYear = 2010;
  91. this.lang = 0; //0(中文) | 1(英文)
  92. this.dateFormatStyle = "yyyy-MM-dd";
  93. if (beginYear != null && endYear != null){
  94. this.beginYear = beginYear;
  95. this.endYear = endYear;
  96. }
  97. if (lang != null){
  98. this.lang = lang
  99. }
  100. if (dateFormatStyle != null){
  101. this.dateFormatStyle = dateFormatStyle
  102. }
  103. this.dateControl = null;
  104. this.panel = this.getElementById("calendarPanel");
  105. this.container = this.getElementById("ContainerPanel");
  106. this.form = null;
  107. this.date = new Date();
  108. this.year = this.date.getFullYear();
  109. this.month = this.date.getMonth();
  110. this.colors = {
  111. "cur_word" : "#FFFFFF", //当日日期文字颜色
  112. "cur_bg" : "#00FF00", //当日日期单元格背影色
  113. "sel_bg" : "#FFCCCC", //已被选择的日期单元格背影色 2006-12-03 寒羽枫添加
  114. "sun_word" : "#FF0000", //星期天文字颜色
  115. "sat_word" : "#0000FF", //星期六文字颜色
  116. "td_word_light" : "#333333", //单元格文字颜色
  117. "td_word_dark" : "#CCCCCC", //单元格文字暗色
  118. "td_bg_out" : "#EFEFEF", //单元格背影色
  119. "td_bg_over" : "#FFCC00", //单元格背影色
  120. "tr_word" : "#FFFFFF", //日历头文字颜色
  121. "tr_bg" : "#666666", //日历头背影色
  122. "input_border" : "#CCCCCC", //input控件的边框颜色
  123. "input_bg" : "#EFEFEF" //input控件的背影色
  124. }
  125. this.draw();
  126. this.bindYear();
  127. this.bindMonth();
  128. this.changeSelect();
  129. this.bindData();
  130. }
  131. /**//**//**//**
  132. * 日历类属性(语言包,可自由扩展)
  133. */
  134. Calendar.language = {
  135. "year" : [[""], [""]],
  136. "months" : [["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
  137. ["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]
  138. ],
  139. "weeks" : [["日","一","二","三","四","五","六"],
  140. ["SUN","MON","TUR","WED","THU","FRI","SAT"]
  141. ],
  142. "clear" : [["清空"], ["CLS"]],
  143. "today" : [["今天"], ["TODAY"]],
  144. "close" : [["关闭"], ["CLOSE"]]
  145. }
  146. Calendar.prototype.draw = function() {
  147. calendar = this;
  148. var mvAry = [];
  149. //mvAry[mvAry.length] = ' <form name="calendarForm" style="margin: 0px;">'; //因 <form> 不能嵌套, 2006-12-01 由寒羽枫改用 Div
  150. mvAry[mvAry.length] = ' <div name="calendarForm" style="margin: 0px;">';
  151. mvAry[mvAry.length] = ' <table width="100%" border="0" cellpadding="0" cellspacing="1">';
  152. mvAry[mvAry.length] = ' <tr>';
  153. mvAry[mvAry.length] = ' <th align="left" width="1%"><input style="border: 1px solid ' + calendar.colors["input_border"] + ';background-color:' + calendar.colors["input_bg"] + ';width:16px;height:20px;" name="prevMonth" type="button" id="prevMonth" value="&lt;" /></th>';
  154. mvAry[mvAry.length] = ' <th align="center" width="98%" nowrap="nowrap"><select name="calendarYear" id="calendarYear" style="font-size:12px;"></select><select name="calendarMonth" id="calendarMonth" style="font-size:12px;"></select></th>';
  155. mvAry[mvAry.length] = ' <th align="right" width="1%"><input style="border: 1px solid ' + calendar.colors["input_border"] + ';background-color:' + calendar.colors["input_bg"] + ';width:16px;height:20px;" name="nextMonth" type="button" id="nextMonth" value="&gt;" /></th>';
  156. mvAry[mvAry.length] = ' </tr>';
  157. mvAry[mvAry.length] = ' </table>';
  158. mvAry[mvAry.length] = ' <table id="calendarTable" width="100%" style="border:0px solid #CCCCCC;background-color:#FFFFFF" border="0" cellpadding="3" cellspacing="1">';
  159. mvAry[mvAry.length] = ' <tr>';
  160. for(var i = 0; i < 7; i++) {
  161. mvAry[mvAry.length] = ' <th style="font-weight:normal;background-color:' + calendar.colors["tr_bg"] + ';color:' + calendar.colors["tr_word"] + ';">' + Calendar.language["weeks"][this.lang][i] + '</th>';
  162. }
  163. mvAry[mvAry.length] = ' </tr>';
  164. for(var i = 0; i < 6;i++){
  165. mvAry[mvAry.length] = ' <tr align="center">';
  166. for(var j = 0; j < 7; j++) {
  167. if (j == 0){
  168. mvAry[mvAry.length] = ' <td style="cursor:default;color:' + calendar.colors["sun_word"] + ';"></td>';
  169. } else if(j == 6) {
  170. mvAry[mvAry.length] = ' <td style="cursor:default;color:' + calendar.colors["sat_word"] + ';"></td>';
  171. } else {
  172. mvAry[mvAry.length] = ' <td style="cursor:default;"></td>';
  173. }
  174. }
  175. mvAry[mvAry.length] = ' </tr>';
  176. }
  177. mvAry[mvAry.length] = ' <tr style="background-color:' + calendar.colors["input_bg"] + ';">';
  178. mvAry[mvAry.length] = ' <th colspan="2"><input name="calendarClear" type="button" id="calendarClear" value="' + Calendar.language["clear"][this.lang] + '" style="border: 1px solid ' + calendar.colors["input_border"] + ';background-color:' + calendar.colors["input_bg"] + ';width:100%;height:20px;font-size:12px;"/></th>';
  179. mvAry[mvAry.length] = ' <th colspan="3"><input name="calendarToday" type="button" id="calendarToday" value="' + Calendar.language["today"][this.lang] + '" style="border: 1px solid ' + calendar.colors["input_border"] + ';background-color:' + calendar.colors["input_bg"] + ';width:100%;height:20px;font-size:12px;"/></th>';
  180. mvAry[mvAry.length] = ' <th colspan="2"><input name="calendarClose" type="button" id="calendarClose" value="' + Calendar.language["close"][this.lang] + '" style="border: 1px solid ' + calendar.colors["input_border"] + ';background-color:' + calendar.colors["input_bg"] + ';width:100%;height:20px;font-size:12px;"/></th>';
  181. mvAry[mvAry.length] = ' </tr>';
  182. mvAry[mvAry.length] = ' </table>';
  183. //mvAry[mvAry.length] = ' </from>';
  184. mvAry[mvAry.length] = ' </div>';
  185. this.panel.innerHTML = mvAry.join("");
  186. /**//******** 以下代码由寒羽枫 2006-12-01 添加 **********/
  187. var obj = this.getElementById("prevMonth");
  188. obj.onclick = function () {calendar.goPrevMonth(calendar);}
  189. obj.onblur = function () {calendar.onblur();}
  190. this.prevMonth= obj;
  191. obj = this.getElementById("nextMonth");
  192. obj.onclick = function () {calendar.goNextMonth(calendar);}
  193. obj.onblur = function () {calendar.onblur();}
  194. this.nextMonth= obj;
  195. obj = this.getElementById("calendarClear");
  196. obj.onclick = function () {calendar.dateControl.value = "";calendar.hide();}
  197. this.calendarClear = obj;
  198. obj = this.getElementById("calendarClose");
  199. obj.onclick = function () {calendar.hide();}
  200. this.calendarClose = obj;
  201. obj = this.getElementById("calendarYear");
  202. obj.onchange = function () {calendar.update(calendar);}
  203. obj.onblur = function () {calendar.onblur();}
  204. this.calendarYear = obj;
  205. obj = this.getElementById("calendarMonth");
  206. with(obj)
  207. {
  208. onchange = function () {calendar.update(calendar);}
  209. onblur = function () {calendar.onblur();}
  210. }this.calendarMonth = obj;
  211. obj = this.getElementById("calendarToday");
  212. obj.onclick = function () {
  213. var today = new Date();
  214. calendar.date = today;
  215. calendar.year = today.getFullYear();
  216. calendar.month = today.getMonth();
  217. calendar.changeSelect();
  218. calendar.bindData();
  219. calendar.dateControl.value = today.format(calendar.dateFormatStyle);
  220. calendar.hide();
  221. }
  222. this.calendarToday = obj;
  223. /**//******** 以上代码由寒羽枫 2006-12-01 添加 **********/
  224. /**//*
  225. //this.form = document.forms["calendarForm"];
  226. this.form.prevMonth.onclick = function () {calendar.goPrevMonth(this);}
  227. this.form.nextMonth.onclick = function () {calendar.goNextMonth(this);}
  228. this.form.prevMonth.onblur = function () {calendar.onblur();}
  229. this.form.nextMonth.onblur = function () {calendar.onblur();}
  230. this.form.calendarClear.onclick = function () {calendar.dateControl.value = "";calendar.hide();}
  231. this.form.calendarClose.onclick = function () {calendar.hide();}
  232. this.form.calendarYear.onchange = function () {calendar.update(this);}
  233. this.form.calendarMonth.onchange = function () {calendar.update(this);}
  234. this.form.calendarYear.onblur = function () {calendar.onblur();}
  235. this.form.calendarMonth.onblur = function () {calendar.onblur();}
  236. this.form.calendarToday.onclick = function () {
  237. var today = new Date();
  238. calendar.date = today;
  239. calendar.year = today.getFullYear();
  240. calendar.month = today.getMonth();
  241. calendar.changeSelect();
  242. calendar.bindData();
  243. calendar.dateControl.value = today.format(calendar.dateFormatStyle);
  244. calendar.hide();
  245. }
  246. */
  247. }
  248. //年份下拉框绑定数据
  249. Calendar.prototype.bindYear = function() {
  250. //var cy = this.form.calendarYear;
  251. var cy = this.calendarYear;//2006-12-01 由寒羽枫修改
  252. cy.length = 0;
  253. for (var i = this.beginYear; i <= this.endYear; i++){
  254. cy.options[cy.length] = new Option(i + Calendar.language["year"][this.lang], i);
  255. }
  256. }
  257. //月份下拉框绑定数据
  258. Calendar.prototype.bindMonth = function() {
  259. //var cm = this.form.calendarMonth;
  260. var cm = this.calendarMonth;//2006-12-01 由寒羽枫修改
  261. cm.length = 0;
  262. for (var i = 0; i < 12; i++){
  263. cm.options[cm.length] = new Option(Calendar.language["months"][this.lang][i], i);
  264. }
  265. }
  266. //向前一月
  267. Calendar.prototype.goPrevMonth = function(e){
  268. if (this.year == this.beginYear && this.month == 0){return;}
  269. this.month--;
  270. if (this.month == -1) {
  271. this.year--;
  272. this.month = 11;
  273. }
  274. this.date = new Date(this.year, this.month, 1);
  275. this.changeSelect();
  276. this.bindData();
  277. }
  278. //向后一月
  279. Calendar.prototype.goNextMonth = function(e){
  280. if (this.year == this.endYear && this.month == 11){return;}
  281. this.month++;
  282. if (this.month == 12) {
  283. this.year++;
  284. this.month = 0;
  285. }
  286. this.date = new Date(this.year, this.month, 1);
  287. this.changeSelect();
  288. this.bindData();
  289. }
  290. //改变SELECT选中状态
  291. Calendar.prototype.changeSelect = function() {
  292. //var cy = this.form.calendarYear;
  293. //var cm = this.form.calendarMonth;
  294. var cy = this.calendarYear;//2006-12-01 由寒羽枫修改
  295. var cm = this.calendarMonth;
  296. for (var i= 0; i < cy.length; i++){
  297. if (cy.options[i].value == this.date.getFullYear()){
  298. cy[i].selected = true;
  299. break;
  300. }
  301. }
  302. for (var i= 0; i < cm.length; i++){
  303. if (cm.options[i].value == this.date.getMonth()){
  304. cm[i].selected = true;
  305. break;
  306. }
  307. }
  308. }
  309. //更新年、月
  310. Calendar.prototype.update = function (e){
  311. //this.year = e.form.calendarYear.options[e.form.calendarYear.selectedIndex].value;
  312. //this.month = e.form.calendarMonth.options[e.form.calendarMonth.selectedIndex].value;
  313. this.year = e.calendarYear.options[e.calendarYear.selectedIndex].value;//2006-12-01 由寒羽枫修改
  314. this.month = e.calendarMonth.options[e.calendarMonth.selectedIndex].value;
  315. this.date = new Date(this.year, this.month, 1);
  316. this.changeSelect();
  317. this.bindData();
  318. }
  319. //绑定数据到月视图
  320. Calendar.prototype.bindData = function () {
  321. var calendar = this;
  322. var dateArray = this.getMonthViewArray(this.date.getYear(), this.date.getMonth());
  323. var tds = this.getElementById("calendarTable").getElementsByTagName("td");
  324. for(var i = 0; i < tds.length; i++) {
  325. //tds[i].style.color = calendar.colors["td_word_light"];
  326. tds[i].style.backgroundColor = calendar.colors["td_bg_out"];
  327. tds[i].onclick = function () {return;}
  328. tds[i].onmouseover = function () {return;}
  329. tds[i].onmouseout = function () {return;}
  330. if (i > dateArray.length - 1) break;
  331. tds[i].innerHTML = dateArray[i];
  332. if (dateArray[i] != "&nbsp;"){
  333. tds[i].onclick = function () {
  334. if (calendar.dateControl != null){
  335. calendar.dateControl.value = new Date(calendar.date.getFullYear(),
  336. calendar.date.getMonth(),
  337. this.innerHTML).format(calendar.dateFormatStyle);
  338. }
  339. calendar.hide();
  340. }
  341. tds[i].onmouseover = function () {
  342. this.style.backgroundColor = calendar.colors["td_bg_over"];
  343. }
  344. tds[i].onmouseout = function () {
  345. this.style.backgroundColor = calendar.colors["td_bg_out"];
  346. }
  347. if (new Date().format(calendar.dateFormatStyle) ==
  348. new Date(calendar.date.getFullYear(),
  349. calendar.date.getMonth(),
  350. dateArray[i]).format(calendar.dateFormatStyle)) {
  351. //tds[i].style.color = calendar.colors["cur_word"];
  352. tds[i].style.backgroundColor = calendar.colors["cur_bg"];
  353. tds[i].onmouseover = function () {
  354. this.style.backgroundColor = calendar.colors["td_bg_over"];
  355. }
  356. tds[i].onmouseout = function () {
  357. this.style.backgroundColor = calendar.colors["cur_bg"];
  358. }
  359. //continue; //若不想当天单元格的背景被下面的覆盖,请取消注释 → 2006-12-03 寒羽枫添加
  360. }//end if
  361. //设置已被选择的日期单元格背影色 2006-12-03 寒羽枫添加
  362. if (calendar.dateControl != null && calendar.dateControl.value == new Date(calendar.date.getFullYear(),
  363. calendar.date.getMonth(),
  364. dateArray[i]).format(calendar.dateFormatStyle)) {
  365. tds[i].style.backgroundColor = calendar.colors["sel_bg"];
  366. tds[i].onmouseover = function () {
  367. this.style.backgroundColor = calendar.colors["td_bg_over"];
  368. }
  369. tds[i].onmouseout = function () {
  370. this.style.backgroundColor = calendar.colors["sel_bg"];
  371. }
  372. }
  373. }
  374. }
  375. }
  376. //根据年、月得到月视图数据(数组形式)
  377. Calendar.prototype.getMonthViewArray = function (y, m) {
  378. var mvArray = [];
  379. var dayOfFirstDay = new Date(y, m, 1).getDay();
  380. var daysOfMonth = new Date(y, m + 1, 0).getDate();
  381. for (var i = 0; i < 42; i++) {
  382. mvArray[i] = "&nbsp;";
  383. }
  384. for (var i = 0; i < daysOfMonth; i++){
  385. mvArray[i + dayOfFirstDay] = i + 1;
  386. }
  387. return mvArray;
  388. }
  389. //扩展 document.getElementById(id) 多浏览器兼容性 from meizz tree source
  390. Calendar.prototype.getElementById = function(id){
  391. if (typeof(id) != "string" || id == "") return null;
  392. if (document.getElementById) return document.getElementById(id);
  393. if (document.all) return document.all(id);
  394. try {return eval(id);} catch(e){ return null;}
  395. }
  396. //扩展 object.getElementsByTagName(tagName)
  397. Calendar.prototype.getElementsByTagName = function(object, tagName){
  398. if (document.getElementsByTagName) return document.getElementsByTagName(tagName);
  399. if (document.all) return document.all.tags(tagName);
  400. }
  401. //取得HTML控件绝对位置
  402. Calendar.prototype.getAbsPoint = function (e){
  403. var x = e.offsetLeft;
  404. var y = e.offsetTop;
  405. while(e = e.offsetParent){
  406. x += e.offsetLeft;
  407. y += e.offsetTop;
  408. }
  409. return {"x": x, "y": y};
  410. }
  411. //显示日历
  412. Calendar.prototype.show = function (dateObj, popControl) {
  413. if (dateObj == null){
  414. throw new Error("arguments[0] is necessary")
  415. }
  416. this.dateControl = dateObj;
  417. //if (dateObj.value.length > 0){
  418. //this.date = new Date(dateObj.value.toDate());
  419. //this.date = new Date(dateObj.value.toDate(this.dateFormatStyle));//由寒羽枫修改,带入用户指定的 style
  420. this.date = (dateObj.value.length > 0) ? new Date(dateObj.value.toDate(this.dateFormatStyle)) : new Date() ;//2006-12-03 寒羽枫添加 → 若为空则显示当前月份
  421. this.year = this.date.getFullYear();
  422. this.month = this.date.getMonth();
  423. this.changeSelect();
  424. this.bindData();
  425. //}
  426. if (popControl == null){
  427. popControl = dateObj;
  428. }
  429. var xy = this.getAbsPoint(popControl);
  430. this.panel.style.left = xy.x -25 + "px";
  431. this.panel.style.top = (xy.y + dateObj.offsetHeight) + "px";
  432. //由寒羽枫 2006-06-25 修改 → 把 visibility 变为 display,并添加失去焦点的事件
  433. //this.setDisplayStyle("select", "hidden");
  434. //this.panel.style.visibility = "visible";
  435. //this.container.style.visibility = "visible";
  436. this.panel.style.display = "";
  437. this.container.style.display = "";
  438. dateObj.onblur = function(){calendar.onblur();}
  439. this.container.onmouseover = function(){isFocus=true;}
  440. this.container.onmouseout = function(){isFocus=false;}
  441. }
  442. //隐藏日历
  443. Calendar.prototype.hide = function() {
  444. //this.setDisplayStyle("select", "visible");
  445. //this.panel.style.visibility = "hidden";
  446. //this.container.style.visibility = "hidden";
  447. this.panel.style.display = "none";
  448. this.container.style.display = "none";
  449. isFocus=false;
  450. }
  451. //焦点转移时隐藏日历 → 由寒羽枫 2006-06-25 添加
  452. Calendar.prototype.onblur = function() {
  453. if(!isFocus){this.hide();}
  454. }
  455. //以下由寒羽枫 2006-06-25 修改 → 用<iframe> 遮住 IE 的下拉框
  456. /**//**//**//*
  457. //设置控件显示或隐藏
  458. Calendar.prototype.setDisplayStyle = function(tagName, style) {
  459. var tags = this.getElementsByTagName(null, tagName)
  460. for(var i = 0; i < tags.length; i++) {
  461. if (tagName.toLowerCase() == "select" &&
  462. (tags[i].name == "calendarYear" ||
  463. tags[i].name == "calendarMonth")){
  464. continue;
  465. }
  466. //tags[i].style.visibility = style;
  467. tags[i].style.display = style;
  468. }
  469. }
  470. */
  471. //document.write('<div id="ContainerPanel" style="visibility:hidden"><div id="calendarPanel" style="position: absolute;visibility: hidden;z-index: 9999;');
  472. document.write('<div id="ContainerPanel" style="display:none"><div id="calendarPanel" style="position: absolute;display: none;z-index: 9999;');
  473. document.write('background-color: #FFFFFF;border: 1px solid #CCCCCC;width:175px;font-size:12px;"></div>');
  474. if(document.all)
  475. {
  476. document.write('<iframe style="position:absolute;z-index:2000;width:expression(this.previousSibling.offsetWidth);');
  477. document.write('height:expression(this.previousSibling.offsetHeight);');
  478. document.write('left:expression(this.previousSibling.offsetLeft);top:expression(this.previousSibling.offsetTop);');
  479. document.write('display:expression(this.previousSibling.style.display);" scrolling="no" frameborder="no"></iframe>');
  480. }
  481. document.write('</div>');
  482. //-->