var currentImportantNews = 0; var NumberOfImportantNews = 0; var ImportantNewsPause = false; var timeOut; var ProgramsJObj = null; var NewsBullitensJObj = null; var ReportsJObj = null; var URLArray = { "NE1": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/4a3a248d-587b-4293-ab96-3ea5bc866b2e/32966911-f793-4143-8692-a7de2885fb7b/5", "NE2": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/4a3a248d-587b-4293-ab96-3ea5bc866b2e/fa48f40c-29de-462c-bdc7-f601d5952cd2/5", "NE3": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/4a3a248d-587b-4293-ab96-3ea5bc866b2e/4610700f-097e-40f1-b367-889266a63b5b/5", "NE4": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/4a3a248d-587b-4293-ab96-3ea5bc866b2e/0db0fdc8-2b3f-4e93-85d0-de1a6afd57ac/5", "NE5": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/4a3a248d-587b-4293-ab96-3ea5bc866b2e/43980a35-9baa-4b49-ac8e-cf979403c1e6/5", "NE6": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/4a3a248d-587b-4293-ab96-3ea5bc866b2e/eaa3a202-1292-49aa-af46-2d435206c171/5", "NE7": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/dbd79977-375a-4b51-9bf9-6abf40a0b808/047f6bc6-beb8-4af1-9090-78ca6e8f48c8/5", "NE8": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/4a3a248d-587b-4293-ab96-3ea5bc866b2e/c8257812-0846-4314-b040-90851f73cd12/5", "EB1": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/b6a41d0b-49cb-46cd-801c-55bbeb7f65ce/300e4af9-2740-4ede-be35-b9c632287f7a/5", "EB2": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/a29e89b3-7ca2-4683-be42-b60c39b252ee/6f084ccb-2a1e-49e0-acf8-7d16a5d7da0c/5", "EB3": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/b6a41d0b-49cb-46cd-801c-55bbeb7f65ce/b3e2c269-31c3-4ede-9cf6-0a863a75bd75/5", "EB4": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/3fd1310e-70b5-441a-a00c-2b7837a90149/cf8ae479-e73d-462d-8e63-4eb320304a70/5", "EB5": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/d7038dfd-4c34-4dc4-a4df-1ff12b2497ef/4a73fdf9-a9ed-4803-aaa3-b05cbe431971/5", "KG1": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/3b9d6c79-0eae-4699-bd5a-f8d7560fe8b3/3f4bc1e7-013c-4b54-be0c-d6be522ef972/5", "KG2": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/62d4edc7-229c-4bbc-ab4f-0bad7729f594/df12aa23-78f6-476b-937e-a4411bea9800/5", "KG3": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/9274b7ef-008e-40a4-a44d-0167e3b8adcb/9aeac3c6-d194-47c3-956a-eb7a933e11f1/5", "KG4": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/6d6c0f86-ca56-4aa8-bf81-156f8072d7df/393fc056-9c0e-42dc-8702-c86423f84da3/5", "KG5": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/93b4131b-c43a-4c46-9695-eff77af76c6f/59629ee3-9d7a-4869-aa17-1a8617fc16e8/5", "HR1": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/2fa531e8-3049-4f05-b4da-b62043dd4d06/d9cf6018-3049-4795-b18d-af96f8b0a702/5", "HR2": "/ks3services/HomeSummaryArticles/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/2fa531e8-3049-4f05-b4da-b62043dd4d06/34c035fc-5354-40e2-8fe2-0bfe1a3a821b/5", "CH1": "/ks3services/GetfromchannelsiteJson/1/8/rp", //Reports "CH2": "/ks3services/HomeSummaryResourcesFullJSON/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/106522ae-6638-4082-9825-c2ab5a57f3e1/9a726b1f-1449-434e-9480-561fcc6325f1/9", //programs "CH3": "/ks3services/GetfromchannelsiteJson/1/9/nb", //news bullitens "Cricature": "/ks3services/HomeSummaryResourcesFullJSON/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/7a777811-84d5-416b-9234-2e212ebe0dfd/9a0c72e2-6986-4cf5-a5cd-ae1df760d606/3", "Analysis": "/ks3services/HomeSummaryknowledgeFullJSON/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/3b9d6c79-0eae-4699-bd5a-f8d7560fe8b3/3f4bc1e7-013c-4b54-be0c-d6be522ef972/-1", "PointOfView": "/ks3services/HomeSummaryknowledgeFullJSON/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/62d4edc7-229c-4bbc-ab4f-0bad7729f594/df12aa23-78f6-476b-937e-a4411bea9800/-1", "Books": "/ks3services/HomeSummaryResourcesFullJSON/3b4f4fec-0a53-4327-a8ed-c8241e8327d2/a55b0587-50e6-411c-886a-b745eb94c280/6d6c0f86-ca56-4aa8-bf81-156f8072d7df/393fc056-9c0e-42dc-8702-c86423f84da3/-1" } function mapURL(value) { switch (value) { case "NE1": return URLArray.NE1; break; case "NE2": return URLArray.NE2; break; case "NE3": return URLArray.NE3; break; case "NE4": return URLArray.NE4; break; case "NE5": return URLArray.NE5; break; case "NE6": return URLArray.NE6; break; case "NE7": return URLArray.NE7; break; case "NE8": return URLArray.NE8; break; case "EB1": return URLArray.EB1; break; case "EB2": return URLArray.EB2; break; case "EB3": return URLArray.EB3; break; case "EB4": return URLArray.EB4; break; case "EB5": return URLArray.EB5; break; case "KG1": return URLArray.KG1; break; case "KG2": return URLArray.KG2; break; case "KG3": return URLArray.KG3; break; case "KG4": return URLArray.KG4; break; case "KG5": return URLArray.KG5; break; case "HR1": return URLArray.HR1; break; case "HR2": return URLArray.HR2; break; } } $(document).ready(function () { NumberOfImportantNews = $("#importantnewsContent ul li").length; if (NumberOfImportantNews > 0) { AnimateImportantNews(); } if ($(".fromSitenewsItem").length > 0) { if ($(".fromSitenewsItem").length % 3 == 0) { AnimateFRomSiteNews((Math.floor(($(".fromSitenewsItem").length - 1) / 2) * 2) + 1); } else { AnimateFRomSiteNews((Math.floor($(".fromSitenewsItem").length / 2) * 2) + 1); } } HTTPServiceRequest("/ks3services/HomeLatestNews/12", "json", "Latestnews", BuildLatestNews); if ($(".SliderTitle").length > 0) { SliderTilteHover(0, 'tab1'); BindNewsSectionScrollers(""); } RenderPortalBottomBoxs(); HTTPServiceRequest(URLArray.Cricature, "json", "related_bodyCricature", BuildCricatureArea); HTTPServiceRequest(URLArray.CH1, "json", "ReportsItems", BuildReportsBox); renderMostReadSentCommentedArticles(); renderKGArticlsBox(); RenderTalkShowsBox(); }); // //This function is used to make ajax calls using the JQuery library //Tested on libraries 1.5.2, 1.6.4 // //The URL you want to load //Define if the returned value is in HTML format or JSON format //where to send the retrived value; element id in case of HTML, callback function in case of JSON // //Call example : //HTTPServiceRequest('Default3s.aspx?id=1', 'html', 'result' ) // function HTTPServiceRequest(loadUrl, type, Distination, successHandler, errorHandler) { var ajax_load = "
loading...
"; if (type == "html") { $("#" + Distination).html(ajax_load).load(loadUrl); } if (type == "json") { $("#" + Distination).html(ajax_load); $.getJSON(loadUrl, null, function (json) { successHandler(Distination, json); }) } if (type == "xml") { $.ajax({ url: loadUrl, dataType: 'xml', success: function (data) { successHandler(Distination, data); } }); } $("#" + Distination).ajaxError(function (e, jqxhr, settings, exception) { // errorHandler(e, jqxhr, settings, exception); }); } var BuildPortalBoxHTML = function (Distination, json) { // debugger; var Jobj = jQuery.parseJSON(json); var index = 0; var ShownCount = 3; if (Distination == "PBSectionListNE1" || Distination == "PBSectionListNE3") { ShownCount = 4; } var SectionHTML = ""; if (Jobj[0] != null) { SectionHTML = SectionHTML + "