
        $(document).ready(function() {

            $('#btnSearchDetail').click(function() {
            $('#pnlExtendedSearch').slideToggle('slow');
        });
        
        });

        $(document).ready(function() {
            $(function() {
                $('#ctl00_txtDate').daterangepicker({ arrows: false });
                $('.login').colorbox({ width: "37%", height: "34%", iframe: true, scrolling: false });
                $('.subscribe').colorbox({ width: "577px", height: "870px", iframe: true, scrolling: false });
            });


        })

        function ModalOn() {
            $(document).ready(function() {
                $.fn.colorbox({ width: "40%", height: "40%", iframe: true, href: "http://www.action.com.mt/logArea/userloginmain.aspx", open: true });
            });

        }

        function ModalOnSubscribe() {
            $(document).ready(function() {
            $.fn.colorbox({ width: "577px", height: "600px", iframe: true, href: "http://www.action.com.mt/logArea/subscribe.aspx", open: true });
            });

        }
	
        window.onload = function() {
            var strCook = document.cookie;
            if (strCook.indexOf("!~") != 0) {
                var intS = strCook.indexOf("!~");
                var intE = strCook.indexOf("~!");
                var strPos = strCook.substring(intS + 2, intE);
                document.body.scrollTop = strPos;
            }
        }
        /// Function to set Scroll position of page before postback. 

        function SetScrollPosition() {
            var intY = document.body.scrollTop;
            document.cookie = "yPos=!~" + intY + "~!";
        }
        /// Attaching   SetScrollPosition() function to window.onscroll event.

        window.onscroll = SetScrollPosition;

        function wantsome() {
	     
	      var control = document.getElementById('ctl00_btnSearch');
            if (control.style.display == "") {
                control.style.display = "none";
             document.getElementById("btnSearchDetail").value = "Basic Search";   
            }
            else {
                control.style.display = "";
		document.getElementById("btnSearchDetail").value = "Advanced Search";
            }
        }

        function drawbanner(ContainerDiv, Width, Height, FileNumber) {
            var so = new SWFObject("multimedia/flash/banner.swf", "mymovie", Width, Height, "8");
            so.addVariable("xmlPath", "multimedia/flash/data" + FileNumber + ".xml?=" + new Date().getTime());
            so.addParam("menu", "false");
            so.addParam("wmode", "opaque");
            so.write(ContainerDiv);

        }
        
 


        function tabChanged(sender, args) {


            switch (sender.get_activeTab().get_tabIndex()) {
                case 0: sender.get_activeTab()._header.style.backgroundColor = "Yellow";
                    sender.get_activeTab()._header.style.color = "Black";
                    sender._tabs[1]._header.style.backgroundColor = "#727B8E";
                    sender._tabs[2]._header.style.backgroundColor = "#727B8E";
                    sender._tabs[3]._header.style.backgroundColor = "#727B8E";
                    sender._tabs[4]._header.style.backgroundColor = "#727B8E";
                    sender._tabs[5]._header.style.backgroundColor = "#727B8E";
                    scrollTo(0, 500);
                    break;
                        case 1: sender.get_activeTab()._header.style.backgroundColor = "#FC7206";
                            sender.get_activeTab()._header.style.color = "White";
                                    sender._tabs[0]._header.style.backgroundColor = "#727B8E";
                                    sender._tabs[2]._header.style.backgroundColor = "#727B8E";
                                    sender._tabs[3]._header.style.backgroundColor = "#727B8E";
                                    sender._tabs[4]._header.style.backgroundColor = "#727B8E";
                                    sender._tabs[5]._header.style.backgroundColor = "#727B8E";
                                    scrollTo(0, 500);
                            break;
                        case 2: sender.get_activeTab()._header.style.backgroundColor = "#1D7A67";
                            sender.get_activeTab()._header.style.color = "White";
                            sender._tabs[1]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[0]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[3]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[4]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[5]._header.style.backgroundColor = "#727B8E";
                            scrollTo(0, 500);
                            break;
                        case 3: sender.get_activeTab()._header.style.backgroundColor = "#B50D45";
                            sender.get_activeTab()._header.style.color = "White";
                            sender._tabs[1]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[2]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[0]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[4]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[5]._header.style.backgroundColor = "#727B8E";
                            scrollTo(0, 500);
                            break;
                        case 4: sender.get_activeTab()._header.style.backgroundColor = "#08E033";
                            sender.get_activeTab()._header.style.color = "White";
                            sender._tabs[1]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[2]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[3]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[0]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[5]._header.style.backgroundColor = "#727B8E";
                            scrollTo(0, 500);
                            break;
                        case 5: sender.get_activeTab()._header.style.backgroundColor = "#5A0061";
                            sender.get_activeTab()._header.style.color = "White";
                            sender._tabs[0]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[1]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[2]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[3]._header.style.backgroundColor = "#727B8E";
                            sender._tabs[4]._header.style.backgroundColor = "#727B8E";
                            scrollTo(0, 500);
                            break;
                        
            }
            
   

        }

       
