- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
function changeAlign() {
try {
for(var i = 0; i < document.getElementById("tariff_content").getElementsByTagName("table").length; i++) {
if(document.getElementById("tariff_content").getElementsByTagName("table")[i].className == "common") {
document.getElementById("tariff_content").getElementsByTagName("table")[i].removeAttribute("cellPadding");
document.getElementById("tariff_content").getElementsByTagName("table")[i].removeAttribute("cellSpacing");
if(document.getElementById("tariff_content").getElementsByTagName("table")[i].tBodies[0].rows[0].cells[0].className != "header"){
var firstTDCount = 0;
for(var z = 0; z < document.getElementById("tariff_content").getElementsByTagName("table")[i].tBodies[0].rows[0].cells.length; z++) {
firstTDCount = firstTDCount + (document.getElementById("tariff_content").getElementsByTagName("table")[i].tBodies[0].rows[0].cells[z].colSpan);
}
document.getElementById("tariff_content").getElementsByTagName("table")[i].tBodies[0].insertRow(0);
for(var j = 0; j < firstTDCount; j++) {
document.getElementById("tariff_content").getElementsByTagName("table")[i].tBodies[0].rows[0].insertCell(j);
document.getElementById("tariff_content").getElementsByTagName("table")[i].tBodies[0].rows[0].cells[j].className = "header";
document.getElementById("tariff_content").getElementsByTagName("table")[i].tBodies[0].rows[0].cells[j].innerText = " ";
}
}
for(var j = 0; j < document.getElementById("tariff_content").getElementsByTagName("table")[i].rows.length; j++) {
for(var k = 0; k < document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells.length; k++) {
if(
(document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells.length > 1) && (k != 0)
&& (document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells[k].className != "header")
)
{
if(document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells[k - 1].rowSpan == 1) {
document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells[k].style.textAlign = "right";
//document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells[k].style.backgroundColor = "red";
}
if(document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells[k].colSpan == 2) {
document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells[k].style.textAlign = "center";
}
if(document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells[k].style.width == "60px") {
//document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].style.backgroundColor = "red";
document.getElementById("tariff_content").getElementsByTagName("table")[i].deleteRow(j);
break;
//document.getElementById("tariff_content").getElementsByTagName("table")[i].rows[j].cells[k].style.width = "";
}
}
}
}
}
}
} catch(e) {}
return false;
}
sectus 12.08.2010 11:56 # +3
Этот сайт, наверное, пятьсот тысяч человек разрабатывали... Каждый внёс частичку себя.
Lure Of Chaos 12.08.2010 11:57 # 0
kainwinterheart 12.08.2010 13:45 # 0
Мистер Хэнки 12.08.2010 17:15 # 0