Вход Регистрация
Файл: gamele.ru/js/basic.js
Строк: 40
<?php
var document;

function 
ClearSelect(oListBox,Protect)
{
    var 
leng oListBox.options.length 1;
    for(
i=lengi>=0i--) if(!= ProtectoListBox.remove(i);
}

function 
AddOption(oListBox,name,value,selected)
{
    var 
oOption d.createElement("option");
    
oOption.appendChild(d.createTextNode(name));
    
oOption.setAttribute("value",value);
    if(
selected 0oOption.setAttribute("selected","true"); 
    
oListBox.appendChild(oOption);
}

function 
AddTD(Obj)
{
    var 
i,j,oTD;
    for(
i=1i<Obj.lengthi++)
    {
        
oTD Obj[0].insertCell(1);
        for(
j=0j<Obj[i].lengthj++) 
        {
            switch(
Obj[i][j][0])
            {
                case 
0oTD.innerHTML Obj[i][j][1]; break;
                case 
1oTD.bgColor Obj[i][j][1]; break;
                case 
2oTD.align Obj[i][j][1]; break;
                case 
3oTD.width Obj[i][j][1]; break;
                case 
4oTD.height Obj[i][j][1]; break;
                case 
5oTD.className Obj[i][j][1]; break;
                case 
6oTD.colSpan Obj[i][j][1]; break;
            }
        }
    }
}

function 
AddButton(Obj)
{
    var 
Butt '<input type=button class="'+Obj[0][0]+'" onclick="location='';
    for(var i=0; i<Obj[1].length; i++) Butt += (i ? '
&' : '?')+Obj[1][i][0]+'='+Obj[1][i][1]; 
    Butt += ''" value="'
+Obj[0][1]+'"'+(Obj[0][2] ? '' ' DISABLED')+'>';
    return 
Butt;    
}
?>
Онлайн: 2
Реклама