
// DD
var smooth_timer;

function smoothHeight(id, curH, targetH, stepH, mode) {
    diff = targetH - curH;
    if (diff != 0) {
        newH = (diff > 0) ? curH + stepH : curH - stepH;
        ((document.getElementById) ? document.getElementById(id) : eval("document.all['" + id + "']")).style.height = newH + "px";
        if (smooth_timer) window.clearTimeout(smooth_timer);
        smooth_timer = window.setTimeout("smoothHeight('" + id + "'," + newH + "," + targetH + "," + stepH + ",'" + mode + "')", 16);
    }
    else if (mode != "o") ((document.getElementById) ? document.getElementById(mode) : eval("document.all['" + mode + "']")).style.display = "none";
}

function rowOver(i, nColor) {
    if (!nColor) nColor = "#000000";
    var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
    if (nameObj != null) nameObj.style.background = nColor;
}

function rowOut(i, nColor) {
    var trObj = (document.getElementById) ? document.getElementById('ihtr' + i) : eval("document.all['ihtr" + i + "']");
    var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
    if (trObj == null || trObj.style.display == "none") nameObj.style.background = nColor;
}

function servOC(i, href, nColor) {
    var trObj = (document.getElementById) ? document.getElementById('ihtr' + i) : eval("document.all['ihtr" + i + "']");
    var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
    var ifObj = (document.getElementById) ? document.getElementById('ihif' + i) : eval("document.all['ihif" + i + "']");
    if (trObj != null) {
        if (trObj.style.display == "none") {
            ifObj.style.height = "0px";
            trObj.style.display = "";

            if (!ifObj.src) ifObj.src = href;
            smoothHeight('ihif' + i, 0, 420, 42, 'o');
        }
        else {

            smoothHeight('ihif' + i, 420, 0, 42, 'ihtr' + i);
        }
    }
}

function addPlugin() {
    window.external.AddSearchProvider("http://scrapetorrent.com/opensearch_desc.xml");
}

