﻿//$(document).ready(function() {
//    $().ajaxStart(function() {
//        $("#loading").show();
//    });
//    $().ajaxComplete(function() {
//        $("#loading").hide();
//    });
//});

function XML_Reader(path, lib_name) {
    $.ajax({
        url: path,
        type: "GET",
        cache: false,
        error: function() {
            //alert("Error !!" + path);
        },
        datatype: "xml",
        success: function(xml) {
            XML_Library(xml, lib_name);
        }
    });
}

function XML_Library(xml, lib_name) {
    switch (lib_name) {
        case "topmenu":
            topmenu(xml);
            break;
        case "websites":
            websites(xml);
            break;
        case "indexAllProducts":
            indexAllProducts(xml);
            break;
        case "indexSpotlight":
            indexSpotlight(xml);
            break;
        case "indexBanners":
            indexBanners(xml);
            break;
        case "indexHotProducts":
            indexHotProducts(xml);
            break;
        case "indexNews":
            indexNews(xml);
            break;
        case "specification":
            specification(xml);
            break;
        case "overview":
            overview(xml);
            break;
        case "ProductInformation":
            ProductInformation(xml);
            break;
        case "ProductFooter":
            ProductFooter(xml);
            break;
        case "gallery":
            gallery(xml);
            break;
        case "ProductGroupAll":
            ProductGroupAll(xml);
            break;
        case "ProductGroupAward":
            ProductGroupAward(xml);
            break;
        case "ProductGroupBanners":
            ProductGroupBanners(xml);
            break;
        case "ProductGroupHotProduct":
            ProductGroupHotProduct(xml);
            break;
        case "ProductGroupCategory":
            ProductGroupCategory(xml);
            break;
        case "ProductGroupReadXML":
            ProductGroupReadXML(xml);
            break;
        case "ProductGroupInnovation":
            ProductGroupInnovation(xml);
            break;
        case "ProductGroupSpotlight":
            ProductGroupSpotlight(xml);
            break;
        case "ProductGroupStaticWebPage":
            ProductGroupStaticWebPage(xml);
            break;
        case "news_content":
            news_content(xml);
            break;
        case "ContentCategory":
            ContentCategory(xml);
            break;
        case "ContentPageContent":
            ContentPageContent(xml);
            break;
        case "FeatureCategory":
            FeatureCategory(xml);
            break;
        case "FeatureList":
            FeatureList(xml);
            break;
        case "FeatureContent":
            FeatureContent(xml);
            break;
        case "FeatureFeatureDescription":
            FeatureFeatureDescription(xml);
            break;
        case "ASUSBottom":
            ASUSBottom(xml);
            break;
        case "AllProducts":
            AllProducts(xml);
            break;
        case "Localization":
            Localization(xml);
            break;
        case "Accessory":
            Accessory(xml);
            break;
        case "Keyword":
            Keyword(xml);
            break;
        case "MDA":
            MDA(xml);
            break;
        case "HomePopup":
            HomePopup(xml);
            break;
    }
}