﻿// JScript File

// Move an element directly on top of another element (and optionally
// make it the same size)
function Cover(bottom, top, ignoreSize) {
    var location = Sys.UI.DomElement.getLocation(bottom);
    top.style.position = 'absolute';
    top.style.top = location.y - 110 + 'px';
    top.style.left = location.x - 35 + 'px';
   
    if (!ignoreSize) {
        top.style.height = bottom.offsetHeight + 'px';
        top.style.width = bottom.offsetWidth + 'px';
    }
}


function ResetContent(){
   $get('ctl00_CPH1_Tabs_p1_upModel').innerHTML=$get('divModelLoading').innerHTML;
   $get('ctl00_CPH1_Tabs_p2_upModelDownload').innerHTML=$get('divModelLoading').innerHTML;
   $get('ctl00_CPH1_Tabs_p3_upModelLargeImage').innerHTML=$get('divModelLoading').innerHTML; 
}

function SetActiveTab(tabControl, tabNumber)
{
  var ctrl = $find(tabControl);
  ctrl.set_activeTab(ctrl.get_tabs()[tabNumber]);
}

function CheckDownloadFileProcess(displayName, objectID) {

    ret = AdvantechWebServiceLocal.checkProductDownloadFile(displayName, objectID, OnCDFComplete, OnCDFTimeOut, OnCDFError);
    return (true);

}

function OnCDFComplete(args) {
    if (args != '') {
        DisplayObj(args, 'Block');
    }
}

function OnCDFTimeOut(args) {
}

function OnCDFError(args) {
}
