$(document).ready(function() {
    DoItNow();

    $(window).resize(function() {
        DoItNow();
    });



});


function SelectAll(id) {
    document.getElementById(id).focus();
    document.getElementById(id).select();
}


function OpenWindow(url) {
    window.open(url);
}

function DoItNow() {
    if ($(window).width() > 1355) {
        $("#sq").slideDown(1000);
        //$("#sq").css({ bottom: ($(document).height()) + "px" });
    }
    else
        $("#sq").slideUp(1000);
}

function goTo(url) {
    window.location.href = url;
}

function pop(url) {
    window.open(url);
}


function CancelSubmit() {
    if (event.keyCode == 13) {
        return false;
    }
}

//function Reorder(tblName, tblID, SortedColumn) {
//    var mySortable = new glow.widgets.Sortable('#item_' + tblID, {
//        axis: 'y',
//        dropIndicatorClass: 'DropTarget',
//        constrainDragTo: '#DragDropArea_' + tblID,

//        onSort: function() {
//            var order = [];
//            glow.dom.get('#item_' + tblID + ' > *').sort().each(function() {
//                order.push(this.id);
//            });

//            var options = {
//                method: 'post',
//                parameters: order.join(', ')
//            };

//            new Ajax.Request('http://localhost:1111/Pages/SaveOrder.aspx?Table=' + tblName + '&UpdateColumn=' + SortedColumn, options);
//        }
//    }
//    );
//}
