﻿function onDrop( sender, e )
{
    var container = e.get_container();
    var item = e.get_droppedItem();
    var position = e.get_position();
    
    
    var instanceId =item.getAttribute("ContainerId");// parseInt();
    var columnNo = parseInt(container.getAttribute("columnNo"));
    var row = position;
    //alert( String.format( "Container: {0}, Item: {1}, ColumnNo: {2},RowNo: {3},InstanceId: {4}", container.id, item.id, columnNo,row, instanceId ) );
    //ContainerTracker.MoveTab(columnNo, row,instanceId );
//        saveCookies()
}

//function $hide(id)
//{
//    document.getElementById(id).style.display="none";
//}

//function showHelp()
//{
//    var request = new Sys.Net.WebRequest();
//    request.set_httpVerb("GET");
//    request.set_url('help.aspx');
//    request.add_completed( function( executor )
//    {
//        if (executor.get_responseAvailable()) 
//        {
//            var helpDiv = $get('HelpDiv');
//            var helpLink = $get('HelpLink');
//            
//            var helpLinkBounds = Sys.UI.DomElement.getBounds(helpLink);
//            
//            helpDiv.style.top = (helpLinkBounds.y + helpLinkBounds.height) + "px";
//            
//            var content = executor.get_responseData();
//            helpDiv.innerHTML = content;
//            helpDiv.style.display = "block";                       
//        }
//    });
//    
//    var executor = new Sys.Net.XMLHttpExecutor();
//    request.set_executor(executor); 
//    executor.executeRequest();
//}

//var Utility = 
//{
//    // change to display:none
//    nodisplay : function(e) 
//    { 
//        if( typeof e == "object") e.style.display = "none"; else if( $get(e) != null ) $get(e).style.display = "none"; 
//    },
//    // change to display:block
//    display : function (e,inline) 
//    { 
//        if( typeof e == "object") e.style.display = (inline?"inline":"block"); else if( $get(e) != null ) $get(e).style.display = (inline?"inline":"block"); 
//    },
//    getContentHeight : function()
//        {
//        if( document.body && document.body.offsetHeight ) {
//            return document.body.offsetHeight;
//        }
//    },


//    blockUI : function()
//    {
//        Utility.display('blockUI');
//        var blockUI = $get('blockUI');
//    
//        if( blockUI != null ) // it will be null if called from CompactFramework
//        blockUI.style.height = Math.max( Utility.getContentHeight(), 1000) + "px";    
//    },

//    unblockUI : function()
//    {
//        Utility.nodisplay('blockUI');
//    }
//};

//var DeleteWarning =
//{
//    yesCallback : null,
//    noCallback : null,
//    _initialized : false,
//    init : function()
//    {
//        if( DeleteWarning._initialized ) return;
//        
//        var hiddenHtmlTextArea = $get('DeleteConfirmPopupPlaceholder');
//        var html = hiddenHtmlTextArea.value;
//        var div = document.createElement('div');
//        div.innerHTML = html;
//        document.body.appendChild(div);
//        
//        DeleteWarning._initialized = true;
//    },
//    show : function( yesCallback, noCallback )
//    {
//        DeleteWarning.init();
//        
//        Utility.blockUI();
//        
//        var popup = $get('DeleteConfirmPopup');
//        Utility.display(popup);
//        
//        DeleteWarning.yesCallback = yesCallback;
//        DeleteWarning.noCallback = noCallback;
//        
//        $addHandler( $get("DeleteConfirmPopup_Yes"), 'click', DeleteWarning._yesHandler );
//        $addHandler( $get("DeleteConfirmPopup_No"), 'click', DeleteWarning._noHandler );
//    },
//    hide : function()
//    {
//        DeleteWarning.init();
//        
//        var popup = $get('DeleteConfirmPopup');
//        Utility.nodisplay(popup);
//        
//        $clearHandlers( $get('DeleteConfirmPopup_Yes') );
//        
//        Utility.unblockUI();
//        
//    },
//    _yesHandler : function()
//    {
//        DeleteWarning.hide();
//        DeleteWarning.yesCallback();    
//    },
//    _noHandler : function()
//    {
//        DeleteWarning.hide();
//        DeleteWarning.noCallback();
//    }
//};

