var ie = !window.getComputedStyle; var ie6 = ie && navigator.appVersion.indexOf("MSIE 7") == -1; var title_div; var console; var menu_items; var open_item = document.createElement("DIV"); function show_title(e){ if(this.open){ return; } /* menu_items.each(function(item){ if(item.open){ hide_title2.call(item); } }) */ this.open = true; //this.style.backgroundImage = "url(images/" + this.id + "_hover.gif)"; if(!title_div){ return false; } title_div.style.display = "block"; title_div.firstChild.innerHTML = this.span.innerHTML; this.span.style.display = "none"; open_item = this; } function hide_title(e){ var ev = window.event || e; var target = ev.toElement || ev.relatedTarget; if(target == this || _isChild(target, this) || target == title_div || _isChild(target, title_div)){ return false; } hide_title2.call(this); } function hide_title2(){ this.open = false; //this.style.backgroundImage = "url(images/" + this.id + ".gif)"; title_div.style.display = "none"; this.span.style.display = "inline"; } function init_titles(root){ console = $("console") init_title_div(); var items = $T("A", root); items.each(function(item){ item.open = false; item.span = $T("SPAN", item)[0]; item.onmouseover = show_title; item.onmouseout = hide_title; }); menu_items = items; } function init_title_div(){ title_div = $("title-div"); if(!title_div){ return ; } var html = $T("HTML")[0]; document.onmousemove = function(e){ var ev = window.event || e; title_div.style.left = ev.clientX + html.scrollLeft - 113 + "px"; title_div.style.top = ev.clientY + html.scrollTop - 69 + "px"; } title_div.onmouseover = function(){ hide_title2.call(open_item); } } function doit(width, height, ibig, name) { windowVar =window.open("","secondWindow","width="+width+", height="+height+'"'); windowVar.document.write(''+name+'
'); } function init_tables(){ return false; var root = $("main-body"); var tables = $T("TABLE", root); tables.each(function(t){ var tds = $T("TD", t); tds.each(function(td){ var div = $C("td", td, "DIV"); if(!div){ throw $continue; } td.div = div[0]; var pTop = parseInt(Style.getElementStyle(td, "padding-top")); var pBottom = parseInt(Style.getElementStyle(td, "padding-bottom")); var pTop2 = parseInt(Style.getElementStyle(td.div, "padding-top")); var pBottom2 = parseInt(Style.getElementStyle(td.div, "padding-bottom")); var _height = td.offsetHeight - pTop - pTop2 - pBottom - pBottom2; td.div.style.height = _height + "px"; if(ie6){ td.div.style.height = _height + "px"; }else{ td.div.style.minHeight = _height + "px"; } }) }) } function init_inner_table(){ var root = $("inner-table"); if(!root){ return; } var small_tds = $C("small-td", root, "TD"); var max_height = 0; small_tds.each(function(td){ td.height_root = $C("height-root", td, "DIV")[0]; if(td.offsetHeight > max_height){ max_height = td.offsetHeight; } }); small_tds.each(function(td){ td.height_root.style.height = max_height - 10 + "px"; }); var h_root = $("set-height"); var s_height = $C("height-root", h_root, "DIV")[0]; var n_height = $C("native-height", h_root, "DIV")[0]; var current_height = n_height.offsetHeight; var desired_height = root.offsetHeight - 4; var pad_val = (desired_height - current_height) / 2; var plus = 0; if(pad_val != Math.floor(pad_val)){ plus = 1; pad_val = Math.floor(pad_val); } s_height.style.paddingTop = pad_val + "px"; s_height.style.paddingBottom = pad_val + plus + "px"; // s_height.style.height = root.offsetHeight - 4 + "px"; } function init_forum_table(){ var root = $("forums"); if(!root){ return false; } var items = $C("second-page", root, "TABLE"); if(!items){ return false; } items.each(function(item){ var trs = $T("TR", item); trs.each(function(tr){ var heights = $C("height-root", tr, "DIV"); if(!heights){ throw $continue; } var max_height = 0; heights.each(function(h_root){ if(h_root.offsetHeight > max_height){ max_height = h_root.offsetHeight; } }) heights.each(function(h_root){ h_root.style.height = max_height + "px"; }) }) }) } window.onload = function(){ init_titles($("init-js")); var iLoader = new ImageLoader(Loader); iLoader.onload.register("test", function(){ }.bind(iLoader)); iLoader.start(); // init_tables(); init_tbl(); init_inner_table(); init_forum_table(); init_gallery(); // init_new_tables(); init_butterfly_1(); init_butterfly_2(); init_butterfly_3(); init_butterfly_4(); init_butterfly_5(); init_butterfly_7(); init_butterfly_6(); } var colors = ["green", "grey"]; var plus = 0; function init_tbl(){ var tables = $C("tbl", $("main-body"), "TABLE"); if (!tables) return; tables.each(function(table){ if(table.className != "tbl"){ throw $continue; } var rows = $T("TR", table); rows.each(function(row, index){ var cells = $T("TD", row); cells.last().className = cells.last().className ? cells.last().className + " last" : "last"; if(row.className.indexOf("theader") != -1 || $C("theader", row, "TD")){ plus = 1; throw $continue; } var color = colors[(index + plus) % 2]; row.className = "tr-" + color; }) }) } function init_gallery(){ var root = $("main-body"); if(!root){ return false; } var gals = $C("gallery", root, "DIV"); if(!gals || !gals.length){ return false; } gals.each(function(gal){ var i_div = $C("g-images", gal, "DIV")[0]; i_div.images = $T("IMG", i_div); i_div.buttons = $C("g-button", i_div, "DIV"); var i_container = $C("g-images-container", gal, "DIV")[0]; i_container.images = $T("IMG", i_container); i_div.buttons.each(function(but){ if(i_container.images.length <= 3){ but.style.display = "none"; throw $continue; } i_div["button_" + but.className.split(" ")[1].replace("g-", "")] = but; but.onmouseover = function(){ //this.className += " over"; } but.onmouseout = function(){ //this.className = this.className.replace("over", ""); } }); i_container.images.each(function(i, index){ if(typeof i_div.images[index] == "undefined"){ throw $break; } i_div.images[index].width = i.width; i_div.images[index].src = i.src; var d_link = i_div.images[index].parentNode; var c_link = i_container.images[index].parentNode; d_link.onclick = c_link.onclick; }); if(i_container.images.length <= 3){ return false; } i_div.cur_num = 0; i_div.go_left = function(){ if(i_div.images.last().src == i_container.images.last().src){ return false; } i_div.cur_num ++ ; var i = i_div.cur_num; while(typeof i_div.images[i - i_div.cur_num] != "undefined"){ i_div.images[i - i_div.cur_num].src = i_container.images[i].src; i_div.images[i - i_div.cur_num].height = i_container.images[i].height; i_div.images[i - i_div.cur_num].width = i_container.images[i].width; var d_link = i_div.images[i - i_div.cur_num].parentNode; var c_link = i_container.images[i].parentNode; d_link.onclick = c_link.onclick; i++; } recount_width(i_div); } i_div.go_right = function(){ if(i_div.images[0].src == i_container.images[0].src){ return false; } i_div.cur_num --; var i = i_div.cur_num; while(typeof i_div.images[i - i_div.cur_num] != "undefined"){ i_div.images[i - i_div.cur_num].src = i_container.images[i].src; i_div.images[i - i_div.cur_num].height = i_container.images[i].height; i_div.images[i - i_div.cur_num].width = i_container.images[i].width; var d_link = i_div.images[i - i_div.cur_num].parentNode; var c_link = i_container.images[i].parentNode; d_link.onclick = c_link.onclick; i++; } } i_div.button_left.onclick = i_div.go_right; i_div.button_right.onclick = i_div.go_left; recount_width(i_div); }); } function recount_width(root){ var w = 0; root.images.each(function(img){ w += img.width + 4; }) root.style.width = w + "px"; } /* function init_new_tables(){ var root = $("main-body"); if(!root){ return false; } var new_tables = $C("new-table", root, "TABLE"); if(!new_tables || !new_tables.length){ return false; } new_tables.each(function(table){ var type = table.className.split(" ").last(); Types[type](table); }); } var Types = { type1: function(table){ } } */ function init_imags(){ alert("hello"); return false; if(!ie6){ return; }else{ return; } var imags = $T("IMG"); if(!imags || !imags.length){ return; } imags.each(function(img){ if(img.src.match(/\.png$/)){ var src = img.src; var im = src.substring(src.lastIndexOf("\/") + 1); img.style.width = img.width + "px"; img.style.height = img.height + "px"; img.src = src.replace(im, "blank.gif"); img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='crop')"; } }) } function init_butterfly_2(){ var root = $("main-body"); if(!root){ return false; } var tables = $C("butterfly_2", root, "TABLE"); if(!tables || !tables.length){ return false; } tables.each(function(table){ table.className += " tabl2"; table.setAttribute("border", 0); var rows = $T("TR", table); rows.each(function(row, ind){ var cells = $T("TD", row); var num = 1; var m_height = 0; if(ind == 0){ row.className = "t-header"; cells[0].className = "title"; var pl = Plashka.create("blue"); transport_content(pl, cells[1]); cells[1].className = "cont"; cells[1].setAttribute("colSpan", 4); }else if(ind == 1){ row.className = "header2"; num = 0; var nums = [ { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] }, { type: "grey", excluded: [0, 3] } ]; cells.each(function(cell, index){ cell.setAttribute("colSpan", 1); var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 0){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } }) cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) }else{ row.className = "table-line"; var nums = [false, { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] }, { type: "grey", excluded: [0, 3] } ]; cells.each(function(cell, index){ cell.setAttribute("colSpan", 1); if(index == 0){ cell.className = "title"; var div = document.createElement("DIV"); div.content = div; transport_content(div, cell); }else{ var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 1){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) } var spacer = insertSpacer(row, cells, num); if(ind == 2){ row.className += " pseudo-header"; } if(row == rows.last()){ row.className += " last"; } }) }) } function init_butterfly_3(){ var root = $("main-body"); if(!root){ return false; } var tables = $C("butterfly_3", root, "TABLE"); if(!tables || !tables.length){ return false; } tables.each(function(table){ table.className += " tabl2"; var rows = $T("TR", table); rows.each(function(row, ind){ var cells = $T("TD", row); var num = 1; var m_height = 0; if(ind == 0){ row.className = "t-header"; cells[0].className = "title"; var pl = Plashka.create("blue"); transport_content(pl, cells[1]); cells[1].className = "cont"; cells[1].setAttribute("colSpan", 4); }else if(ind == 1){ row.className = "header2"; num = 0; var nums = [ { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] } ]; cells.each(function(cell, index){ cell.setAttribute("colSpan", 1); var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 0){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } }) cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) }else{ row.className = "table-line"; var nums = [false, { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] } ]; cells.each(function(cell, index){ cell.setAttribute("colSpan", 1); if(index == 0){ cell.className = "title"; var div = document.createElement("DIV"); div.content = div; transport_content(div, cell); }else{ var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 1){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) } var spacer = insertSpacer(row, cells, num); if(ind == 2){ row.className += " pseudo-header"; } if(row == rows.last()){ row.className += " last"; } }) }) } function init_butterfly_1(){ var root = $("main-body"); if(!root){ return false; } var tables = $C("butterfly_1", root, "TABLE"); if(!tables || !tables.length){ return false; } tables.each(function(tbl){ tbl.className += " tabl2"; var rows = $T("TR", tbl); var set_height; rows.each(function(row, ind){ var pl; var cells = $T("TD", row); row.tds = cells; var num = 1; var m_height = 0; if($C("theader", row, "TD")){ row.className = "t-header"; cells[0].className = "title"; cells[1].className = "cont"; var pl = Plashka.create("blue"); transport_content(pl, cells[1]) }else if(ind == 1){ num = 0; row.className = "p-top-row"; pl = Plashka.create("blue"); pl.className += " m-left m-right"; transport_content(pl, cells[0]); pl = Plashka.create("grey"); transport_content(pl, cells[1]); set_height = pl.content; }else if(ind == 2){ num = 0; var nums = [{ type: "blue", excluded: [1, 2] }, {type: "grey", excluded: [0, 1, 2, 3]}, {type: "green", excluded: [0, 3]}]; cells.each(function(cell, index){ cell.className = "small-td"; pl = Plashka.create(nums[index].type, nums[index].excluded); pl.className += " m-right"; if(index == 0){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) var height = rows[1].tds[0].offsetHeight + rows[2].tds[0].offsetHeight -18; set_height.style.height = height + "px"; var div = document.createElement("DIV"); div.content = div; transport_content(div, set_height); div.style.paddingTop = Math.floor((height - div.offsetHeight) / 2) + "px"; }else{ row.className = "table-line"; if(ind == 3){ row.className += " pseudo-header"; } var nums = [false, { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] }, { type: "grey", excluded: [0, 3] } ] cells.each(function(cell, index){ if(index == 0){ cell.className = "title"; var div = document.createElement("DIV"); div.content = div; transport_content(div, cell); }else{ var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 1){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) } insertSpacer(row, cells, num); if(row == rows.last()){ row.className = "last"; } }) }) } function init_butterfly_4(){ var root = $("main-body"); if(!root){ return false; } var tables = $C("butterfly_4", root, "TABLE"); if(!tables || !tables.length){ return false; } tables.each(function(tbl){ tbl.className += " tabl2"; var rows = $T("TR", tbl); var set_height; rows.each(function(row, ind){ var pl; var cells = $T("TD", row); row.tds = cells; var num = 1; var m_height = 0; if($C("theader", row, "TD")){ row.className = "t-header"; cells[0].className = "title"; pl = Plashka.create("blue"); if(cells[1]){ cells[1].className = "cont"; transport_content(pl, cells[1]) } }else if(ind == 1){ num = 0; row.className = "p-top-row"; pl = Plashka.create("blue"); // pl.className += " m-left m-right"; transport_content(pl, cells[0]); cells[0].className = "cont"; }else if(ind == 2){ num = 0; var nums = [{ type: "blue", excluded: [1, 2] }, {type: "grey", excluded: [0, 1, 2, 3]}, {type: "green", excluded: [0, 3]}]; cells.each(function(cell, index){ cell.className = "small-td"; pl = Plashka.create(nums[index].type, nums[index].excluded); pl.className += " m-right"; if(index == 0){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }); }else{ row.className = "table-line"; if(ind == 3){ row.className += " pseudo-header"; } var nums = [false, { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] } ] cells.each(function(cell, index){ if(index == 0){ cell.className = "title"; var div = document.createElement("DIV"); div.content = div; transport_content(div, cell); }else{ var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 1){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) } insertSpacer(row, cells, num); if(row == rows.last()){ row.className = "last"; } }) }) } function init_butterfly_5(){ var root = $("main-body"); if(!root){ return false; } var tables = $C("butterfly_5", root, "TABLE"); if(!tables || !tables.length){ return false; } tables.each(function(tbl){ tbl.className += " tabl2"; var rows = $T("TR", tbl); var set_height; rows.each(function(row, ind){ var pl; var cells = $T("TD", row); row.tds = cells; var num = 1; var m_height = 0; if($C("theader", row, "TD")){ row.className = "t-header"; cells[0].className = "title"; pl = Plashka.create("blue"); if(cells[1]){ cells[1].className = "cont"; transport_content(pl, cells[1]) } }else if(ind == 1){ num = 0; row.className = "header2"; var nums = [{ type: "blue", excluded: [1, 2] }, {type: "grey", excluded: [0, 1, 2, 3]}, {type: "green", excluded: [0, 3]}]; cells.each(function(cell, index){ cell.className = "small-td"; pl = Plashka.create(nums[index].type, nums[index].excluded); pl.className += " m-right"; if(index == 0){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }); }else{ row.className = "table-line"; if(ind == 2){ row.className += " pseudo-header"; } var nums = [false, { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] } ] cells.each(function(cell, index){ if(index == 0){ cell.className = "title"; var div = document.createElement("DIV"); div.content = div; transport_content(div, cell); }else{ var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 1){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) } insertSpacer(row, cells, num); if(row == rows.last()){ row.className = "last"; } }) }) } function init_butterfly_6(){ var root = $("main-body"); if(!root){ return false; } var tables = $C("butterfly_6", root, "TABLE"); if(!tables || !tables.length){ return false; } tables.each(function(table){ table.className += " tabl2"; var rows = $T("TR", table); rows.each(function(row, ind){ var cells = $T("TD", row); var num = 1; var m_height = 0; row.className = "t-header"; if(ind == 0){ cells.each(function(cell, index){ if(!index){ cell.className = "title"; }else{ cell.className = "cont"; var pl = Plashka.create("blue"); transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } } }); cells.each(function(cell, index){ if(!index){ throw $continue; } cell.pl.content.style.height = m_height - 10 + "px"; }) }else if(ind == 1){ num = 0; row.className = "p-top-row"; var nums = [ { type: "grey", excluded: [1, 2] }, { type: "green", excluded: [0, 3] } ]; cells.each(function(cell, index){ var n = nums[index]; var pl = Plashka.create(n.type, n.excluded); transport_content(pl, cell); }) }else{ row.className = "table-line"; var nums = [false, { type: "grey", excluded: [1, 2] }, { type: "green", excluded: [0, 3] } ]; cells.each(function(cell, index){ cell.setAttribute("colSpan", 1); if(index == 0){ cell.className = "title"; var div = document.createElement("DIV"); div.content = div; transport_content(div, cell); }else{ var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); /* if(cell != cells.last()){ pl.className += " m-right"; } if(index == 1){ pl.className += " m-left"; } */ transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) } var spacer = insertSpacer(row, cells, num); if(ind == 2){ row.className += " pseudo-header"; } if(row == rows.last()){ row.className += " last"; } cells.each(function(cell, index){ if(index == num){ if(cell.className){ cell.className += " p-right"; }else{ cell.className = "p-right"; } } }); }) }) } function init_butterfly_7(){ var root = $("main-body"); if(!root){ return false; } var tables = $C("butterfly_7", root, "TABLE"); if(!tables || !tables.length){ return false; } tables.each(function(table){ table.className += " tabl2"; var rows = $T("TR", table); rows.each(function(row, ind){ var cells = $T("TD", row); var num = 1; var m_height = 0; if(ind == 0){ row.className = "t-header"; cells[0].className = "title"; var pl = Plashka.create("blue"); transport_content(pl, cells[1]); cells[1].className = "cont"; cells[1].setAttribute("colSpan", 4); }else if(ind == 1){ row.className = "p-top-row"; pl = Plashka.create("blue"); pl.className += " m-left m-right"; transport_content(pl, cells[0]); pl = Plashka.create("blue"); transport_content(pl, cells[1]); set_height = pl.content; }else if(ind == 2){ row.className = "header2"; num = 0; var nums = [ { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] }, { type: "grey", excluded: [0, 3] } ]; cells.each(function(cell, index){ cell.setAttribute("colSpan", 1); var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 0){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } }) cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) }else{ row.className = "table-line"; var nums = [false, { type: "blue", excluded: [1, 2] }, { type: "grey", excluded: [0, 1, 2, 3] }, { type: "green", excluded: [0, 1, 2, 3] }, { type: "grey", excluded: [0, 3] } ]; cells.each(function(cell, index){ cell.setAttribute("colSpan", 1); if(index == 0){ cell.className = "title"; var div = document.createElement("DIV"); div.content = div; transport_content(div, cell); }else{ var n = nums[index]; //print(index); pl = Plashka.create(n.type, n.excluded); if(cell != cells.last()){ pl.className += " m-right"; } if(index == 1){ pl.className += " m-left"; } transport_content(pl, cell); if(pl.content.offsetHeight > m_height){ m_height = pl.content.offsetHeight; } } }); cells.each(function(cell){ cell.pl.content.style.height = m_height - 10 + "px"; }) } if(ind != 1){ var spacer = insertSpacer(row, cells, num); }else{ cells[0].setAttribute("colSpan", 3); cells[0].className = "pad-left-cell"; } if(ind == 3){ row.className += " pseudo-header"; } if(row == rows.last()){ row.className += " last"; } }) }) } function insertSpacer(row, cells, num){ var spacer; if(ie){ spacer = row.insertCell(num); }else{ spacer = document.createElement("TD"); row.insertBefore(spacer, cells[num]); } spacer.className = "spacer"; spacer.appendChild(document.createTextNode(" ")); return spacer; } var Plashka = { create: function(type, excluded){ excluded = excluded || []; var cName = this[type].cName; var div = document.createElement("DIV"); div.className = cName; var par = div; this.cNames.each(function(cN, index){ if(excluded.indexOf(index) != -1){ throw $continue; } var d = document.createElement("DIV"); d.className = cN; par.appendChild(d); par = d; }); div.content = par; div.content.className += " cont-root"; return div; }, cNames: ["left-top", "right-top", "right-bottom", "left-bottom"], blue: { cName: "blue-plashka" }, grey: { cName: "grey-plashka" }, green: { cName: "green-plashka" } } function transport_content(pl, cell){ var children = $A(cell.childNodes); clearElem(cell); cell.appendChild(pl); children.each(function(child){ pl.content.appendChild(child); }); cell.pl = pl; }