function initFlashSummary()
{
    $("#div_wgWebAttack5").load("Last5Data.jsp?type=1");
    $("#div_wgPhishing5").load("Last5Data.jsp?type=2");
    $("#div_wgSpam5").load("Last5Data.jsp?type=3");
    $("#div_wgMalware5").load("Last5Data.jsp?type=4");
    swfobject.embedSWF("./open-flash-chart.swf", "div_DomainTh", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataDomainTh.jsp?type=1"});
    swfobject.embedSWF("./open-flash-chart.swf", "div_Phishing", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataWeek.jsp?type=2"});
    swfobject.embedSWF("./open-flash-chart.swf", "div_Spam", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataWeek.jsp?type=3"});
    swfobject.embedSWF("./open-flash-chart.swf", "div_Malware", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataWeek.jsp?type=4"});
    swfobject.embedSWF("./open-flash-chart.swf", "div_WebAttack", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataWeek.jsp?type=1"});
    
}

var positionScrollSummary
function initRefreshSummary()
{
    $("#wgFWebAttack .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#td_WebAttack").children().remove();
        $("#td_WebAttack").empty();
        $("#td_WebAttack").append("<DIV id='div_WebAttack' style='width:100%;height:100%;' ></DIV>");
        swfobject.embedSWF("./open-flash-chart.swf", "div_WebAttack", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataWeek.jsp?type=1"});
        setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });
    $("#wgFPhishing .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#td_Phishing").children().remove();
        $("#td_Phishing").empty();
        $("#td_Phishing").append("<DIV id='div_Phishing' style='width:100%;height:100%;' ></DIV>");
       swfobject.embedSWF("./open-flash-chart.swf", "div_Phishing", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataWeek.jsp?type=2"});
       setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });
    $("#wgFMalware .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#td_Malware").children().remove();
        $("#td_Malware").empty();
        $("#td_Malware").append("<DIV id='div_Malware' style='width:100%;height:100%;' ></DIV>");
        swfobject.embedSWF("./open-flash-chart.swf", "div_Malware", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataWeek.jsp?type=4"});
        setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });
    $("#wgFSpam .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#td_Spam").children().remove();
        $("#td_Spam").empty();
        $("#td_Spam").append("<DIV id='div_Spam' style='width:100%;height:100%;' ></DIV>");
        swfobject.embedSWF("./open-flash-chart.swf", "div_Spam", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataWeek.jsp?type=3"});
        setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });
    
    $("#wgFDomainTh .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#td_DomainTh").children().remove();
        $("#td_DomainTh").empty();
        $("#td_DomainTh").append("<DIV id='div_DomainTh' style='width:100%;height:100%;' ></DIV>");
        swfobject.embedSWF("./open-flash-chart.swf", "div_DomainTh", "100%", "160", "9.0.0","expressInstall.swf",{"data-file":"./json-chart/graphDataDomainTh.jsp?type=1"});
        setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });

  $("#wgWebAttack5 .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#div_wgWebAttack5").empty();
        $("#div_wgWebAttack5").children().remove();
        $("#div_wgWebAttack5").load("Last5Data.jsp?type=1");
        setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });
    $("#wgPhishing5 .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#div_wgPhishing5").empty();
        $("#div_wgPhishing5").children().remove();
        $("#div_wgPhishing5").load("Last5Data.jsp?type=2");
        setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });
    $("#wgSpam5 .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#div_wgSpam5").empty();
        $("#div_wgSpam5").children().remove();
        $("#div_wgSpam5").load("Last5Data.jsp?type=3");
        setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });
    $("#wgMalware5 .refresh").click(function(){
        positionScrollSummary = document.documentElement.scrollTop;
        $("#div_wgMalware5").empty();
        $("#div_wgMalware5").children().remove();
        $("#div_wgMalware5").load("Last5Data.jsp?type=4");
        setTimeout('document.documentElement.scrollTop=positionScrollSummary;',10);
    });
    
}
