﻿
function ResetDdnWidth(object) {
    if (object.originalWidth != "") {
        object.style.position = "";
        object.style.width = object.originalWidth;
        object.originalWidth = "";
    }
}

function RearrangeDdnWidth(object) {
    var objectPosition = fGetXY(object);
    if (object.originalWidth == "") {
        object.style.position = "absolute";
        object.style.top = objectPosition[1];
        object.style.left = objectPosition[0];
        object.originalWidth = object.style.width;
        object.style.width = "";
        object.focus();
    }
}

function fGetXY(aTag) {
    var p = [0, 0];
    while (aTag != null) {
        p[0] += aTag.offsetLeft;
        p[1] += aTag.offsetTop;
        aTag = aTag.offsetParent;
    }
    return p;
}


