﻿ function login(prodID, loginpageID, classID, techID, videoID, eventID, jobID) {

        if (loginpageID == "1") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '')
        }
        if (loginpageID == "2") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '&classID=' + classID + '&techID=' + techID + '')
        }
        if (loginpageID == "3") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '&classID=' + classID + '&techID=' + techID + '')
        }
        if (loginpageID == "4") {
            return GB_showCenter('Login', '/checklogemail.aspx?productID=' + prodID + '&loginpageID=' + loginpageID + '')
        }
        if (loginpageID == "5") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '')
        }
        if (loginpageID == "6") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '&classID=' + classID + '&techID=' + techID + '')
        }
        if (loginpageID == "7") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '')
        }
        if (loginpageID == "8") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '&classID=' + classID + '&techID=' + techID + '')
        }
        if (loginpageID == "9") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '')
        }
        if (loginpageID == "10") {
            return GB_showCenter('Login', '/checklogemail.aspx?videoID=' + videoID + '&loginpageID=' + loginpageID + '')
        }
        if (loginpageID == "11") {
            return GB_showCenter('Login', '/checklogemail.aspx?loginpageID=' + loginpageID + '&classID=' + classID + '&techID=' + techID + '')
        }
        if (loginpageID == "12") {
            return GB_showCenter('Login', '/checklogemail.aspx?eventID=' + eventID + '&loginpageID=' + loginpageID + '')
        }
        if (loginpageID == "13") {
            return GB_showCenter('Login', '/checklogemail.aspx?jobID=' + jobID + '&loginpageID=' + loginpageID + '')
        }

    }

    function roll_over(img_name, img_src) {
        document[img_name].src = img_src;
    }
    function showmenu(elmnt) {
        document.getElementById(elmnt).style.visibility = "visible";
    }
    function hidemenu(elmnt) {
        document.getElementById(elmnt).style.visibility = "hidden";
    }
    function changealpha() {
        document.getElementById(elmnt).style.opacity = 1;
        this.filters.alpha.opacity = 100
    }

    var time = null
    function move() {
        //window.location = 'index.aspx'
    }

    function change1(video_ID, classIDD, video_type, showID, videotitle) {
        //var url="playnow.aspx?videoID="+video_ID+"&classI="+classIDD
        var url2 = "/SelectScience-TV/Videos/" + videotitle + "/&showID=" + showID + "&video_type=" + video_type + "&videoID=" + video_ID + "&classI=" + classIDD + "#video"
        //parent.play.location=url;
        //parent.parent.play.location=url;
        parent.parent.parent.location = url2;
    }


    var set = false;
    var v = 0;
    var a;
    function loadStars() {
        star1 = new Image();
        star1.src = "star1.gif";
        star2 = new Image();
        star2.src = "star2.gif";
    }

    function highlight(x) {
        if (set == false) {
            y = x * 1 + 1
            switch (x) {
                case "1": document.getElementById(x).src = star2.src;
                    document.getElementById('vote').innerHTML = "one star";
                    break;
                case "2": for (i = 1; i < y; i++) {
                        document.getElementById(i).src = star2.src;
                    }
                    document.getElementById('vote').innerHTML = "two stars"
                    break;
                case "3": for (i = 1; i < y; i++) {
                        document.getElementById(i).src = star2.src;
                    }
                    document.getElementById('vote').innerHTML = "three stars"
                    break;
                case "4": for (i = 1; i < y; i++) {
                        document.getElementById(i).src = star2.src;
                    }
                    document.getElementById('vote').innerHTML = "four stars"
                    break;
                case "5": for (i = 1; i < y; i++) {
                        document.getElementById(i).src = star2.src;
                    }
                    document.getElementById('vote').innerHTML = "five stars"
                    break;
            }
        }
    }
    function losehighlight(x) {
        if (set == false) {
            for (i = 1; i < 6; i++) {
                document.getElementById(i).src = star1.src;
                document.getElementById('vote').innerHTML = ""
            }
        }
    }
    function setStar(x) {
        y = x * 1 + 1
        if (set == false) {
            switch (x) {
                case "1": a = "1"
                    flash(a);
                    break;
                case "2": a = "2"
                    flash(a);
                    break;
                case "3": a = "3"
                    flash(a);
                    break;
                case "4": a = "4"
                    flash(a);
                    break;
                case "5": a = "5"
                    flash(a);
                    break;
            }
            set = true;
            document.getElementById('vote').innerHTML = "Thank you for your vote!";

        }
    }
    function flash() {
        y = a * 1 + 1
        switch (v) {
            case 0:
                for (i = 1; i < y; i++) {
                    document.getElementById(i).src = star1.src;
                }
                v = 1
                setTimeout(flash, 200)
                break;
            case 1:
                for (i = 1; i < y; i++) {
                    document.getElementById(i).src = star2.src;
                }
                v = 2
                setTimeout(flash, 200)
                break;
            case 2:
                for (i = 1; i < y; i++) {
                    document.getElementById(i).src = star1.src;
                }
                v = 3
                setTimeout(flash, 200)
                break;
            case 3:
                for (i = 1; i < y; i++) {
                    document.getElementById(i).src = star2.src;
                }
                v = 4
                setTimeout(flash, 200)
                break;
            case 4:
                for (i = 1; i < y; i++) {
                    document.getElementById(i).src = star1.src;
                }
                v = 5
                setTimeout(flash, 200)
                break;
            case 5:
                for (i = 1; i < y; i++) {
                    document.getElementById(i).src = star2.src;
                }
                v = 6
                setTimeout(flash, 200)
                break;
        }
    }


 $(document).ready(function () {


        //Get all the LI from the #tabMenu UL
        $('#tabMenu > li').click(function () {

            //remove the selected class from all LI    
            $('#tabMenu > li').removeClass('selected');

            //Reassign the LI
            $(this).addClass('selected');

            //Hide all the DIV in .boxBody
            $('.boxBody1 div').slideUp('1500');

            //Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
            $('.boxBody1 div:eq(' + $('#tabMenu > li').index(this) + ')').slideDown('1500');

        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $(this).addClass('mouseover');
            $(this).removeClass('mouseout');

        }).mouseout(function () {

            //Add and remove class
            $(this).addClass('mouseout');
            $(this).removeClass('mouseover');

        });

        $('.posts').mouseover(function () {

        }).click(function () {
            $('.boxTop').addClass('selected');
            $('.boxTop5').removeClass('selected');
            $('.boxTopmouseout').removeClass('selected');
            $('.boxTopf').removeClass('selected');
            $('.boxTop2').removeClass('selected');
            $('.boxTop3').removeClass('selected');
            $('.commentstext').addClass('show');
        }).mouseout(function () {




        });



        $('.comments').mouseover(function () {

        }).click(function () {
            $('.boxTopf').removeClass('selected');
            $('.boxTop5').removeClass('selected');
            $('.boxTopmouseout').removeClass('selected');
            $('.boxTop').removeClass('selected');
            $('.boxTop3').removeClass('selected');
            $('.boxTop2').addClass('selected');

        }).mouseout(function () {



        });


        $('.category').mouseover(function () {

        }).click(function () {
            $('.div category').css('', '');
            $('.boxTop').removeClass('selected');
            $('.boxTop5').removeClass('selected');
            $('.boxTopmouseout').removeClass('selected');
            $('.boxTopf').removeClass('selected');
            $('.boxTop2').removeClass('selected');
            $('.boxTop3').addClass('selected');

        }).mouseout(function () {



        });


        $('.famous').mouseover(function () {

        }).click(function () {
            $('.boxTop').removeClass('selected');
            $('.boxTop2').removeClass('selected');
            $('.boxTop3').removeClass('selected');
            $('.boxTop5').removeClass('selected');
            $('.boxTopf').addClass('selected');
            $('.boxTopmouseout').removeClass('selected');

        }).mouseout(function () {



        });


        $('.random').mouseover(function () {

        }).click(function () {
            $('.boxTop').removeClass('selected');
            $('.boxTop2').removeClass('selected');
            $('.boxTop3').removeClass('selected');
            $('.boxTopf').removeClass('selected');
            $('.boxTopmouseout').removeClass('selected');
            $('.boxTop5').addClass('selected');
        }).mouseout(function () {



        });

        //Mouseover with animate Effect for Category menu list
        $('.boxBody #category li').mouseover(function () {

            //Change background color and animate the padding
            $(this).css('backgroundColor', '#888');
            $(this).children().animate({ paddingLeft: "20px" }, { queue: false, duration: 300 });
        }).mouseout(function () {

            //Change background color and animate the padding
            $(this).css('backgroundColor', '');
            $(this).children().animate({ paddingLeft: "0" }, { queue: false, duration: 300 });
        });

        //Mouseover effect for Posts, Comments, Famous Posts and Random Posts menu list.
        $('.boxBody li').click(function () {
            window.location = $(this).find("a").attr("href");
        }).mouseover(function () {
            $(this).css('backgroundColor', '#408172');
        }).mouseout(function () {
            $(this).css('backgroundColor', '');
        });


        $('.comm1').click(function () {
            $('.comm1').css('font-weight', 'bold');
            $('.comm1').css('color', 'black');
            $('.comm1video').addClass('selected');

            $('.comm5').css('font-weight', 'normal');
            $('.comm5').css('color', 'black');
            $('.comm2').css('font-weight', 'normal');
            $('.comm2').css('color', 'black');
            $('.comm3').css('font-weight', 'normal');
            $('.comm3').css('color', 'black');
            $('.comm4').css('font-weight', 'normal');
            $('.comm4').css('color', 'black');
            $('.comm6').css('font-weight', 'normal');
            $('.comm6').css('color', 'black');
            $('.comm7').css('font-weight', 'normal');
            $('.comm7').css('color', 'black');
            $('.comm8').css('font-weight', 'normal');
            $('.comm8').css('color', 'black');


            $('.commallvideos').removeClass('selected');
            $('.comm5video').removeClass('selected');
            $('.comm2video').removeClass('selected');
            $('.comm3video').removeClass('selected');
            $('.comm4video').removeClass('selected');
            $('.comm6video').removeClass('selected');
            $('.comm8video').removeClass('selected');
            $('.comm7video').removeClass('selected');
        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.comm1').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.comm1').css('text-decoration', 'none');
        });





        $('.comm2').click(function () {
            $('.comm2').css('font-weight', 'bold');
            $('.comm2').css('color', 'black');
            $('.comm2video').addClass('selected');

            $('.comm1').css('font-weight', 'normal');
            $('.comm1').css('color', 'black');
            $('.comm5').css('font-weight', 'normal');
            $('.comm5').css('color', 'black');
            $('.comm3').css('font-weight', 'normal');
            $('.comm3').css('color', 'black');
            $('.comm4').css('font-weight', 'normal');
            $('.comm4').css('color', 'black');
            $('.comm6').css('font-weight', 'normal');
            $('.comm6').css('color', 'black');
            $('.comm7').css('font-weight', 'normal');
            $('.comm7').css('color', 'black');
            $('.comm8').css('font-weight', 'normal');
            $('.comm8').css('color', 'black');

            $('.commallvideos').removeClass('selected');
            $('.comm5video').removeClass('selected');
            $('.comm1video').removeClass('selected');
            $('.comm3video').removeClass('selected');
            $('.comm4video').removeClass('selected');
            $('.comm6video').removeClass('selected');
            $('.comm8video').removeClass('selected');
            $('.comm7video').removeClass('selected');
        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.comm2').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.comm2').css('text-decoration', 'none');
        });





        $('.comm3').click(function () {
            $('.comm3').css('font-weight', 'bold');
            $('.comm3').css('color', 'black');
            $('.comm3video').addClass('selected');

            $('.comm1').css('font-weight', 'normal');
            $('.comm1').css('color', 'black');
            $('.comm2').css('font-weight', 'normal');
            $('.comm2').css('color', 'black');
            $('.comm5').css('font-weight', 'normal');
            $('.comm5').css('color', 'black');
            $('.comm4').css('font-weight', 'normal');
            $('.comm4').css('color', 'black');
            $('.comm6').css('font-weight', 'normal');
            $('.comm6').css('color', 'black');
            $('.comm7').css('font-weight', 'normal');
            $('.comm7').css('color', 'black');
            $('.comm8').css('font-weight', 'normal');
            $('.comm8').css('color', 'black');

            $('.commallvideos').removeClass('selected');
            $('.comm5video').removeClass('selected');
            $('.comm2video').removeClass('selected');
            $('.comm1video').removeClass('selected');
            $('.comm4video').removeClass('selected');
            $('.comm6video').removeClass('selected');
            $('.comm8video').removeClass('selected');
            $('.comm7video').removeClass('selected');
        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.comm3').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.comm3').css('text-decoration', 'none');
        });




        $('.comm4').click(function () {
            $('.comm4').css('font-weight', 'bold');
            $('.comm4').css('color', 'black');
            $('.comm4video').addClass('selected');

            $('.comm1').css('font-weight', 'normal');
            $('.comm1').css('color', 'black');
            $('.comm2').css('font-weight', 'normal');
            $('.comm2').css('color', 'black');
            $('.comm3').css('font-weight', 'normal');
            $('.comm3').css('color', 'black');
            $('.comm5').css('font-weight', 'normal');
            $('.comm5').css('color', 'black');
            $('.comm6').css('font-weight', 'normal');
            $('.comm6').css('color', 'black');
            $('.comm7').css('font-weight', 'normal');
            $('.comm7').css('color', 'black');
            $('.comm8').css('font-weight', 'normal');
            $('.comm8').css('color', 'black');


            $('.comm5video').removeClass('selected');
            $('.comm2video').removeClass('selected');
            $('.comm3video').removeClass('selected');
            $('.comm1video').removeClass('selected');
            $('.comm6video').removeClass('selected');
            $('.comm8video').removeClass('selected');
            $('.comm7video').removeClass('selected');
            $('.commallvideos').removeClass('selected');

        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.comm4').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.comm4').css('text-decoration', 'none');
        });


        $('.comm5').click(function () {
            $('.comm5').css('font-weight', 'bold');
            $('.comm5').css('color', 'black');
            $('.comm5video').addClass('selected');

            $('.comm1').css('font-weight', 'normal');
            $('.comm1').css('color', 'black');
            $('.comm2').css('font-weight', 'normal');
            $('.comm2').css('color', 'black');
            $('.comm3').css('font-weight', 'normal');
            $('.comm3').css('color', 'black');
            $('.comm4').css('font-weight', 'normal');
            $('.comm4').css('color', 'black');
            $('.comm6').css('font-weight', 'normal');
            $('.comm6').css('color', 'black');
            $('.comm7').css('font-weight', 'normal');
            $('.comm7').css('color', 'black');
            $('.comm8').css('font-weight', 'normal');
            $('.comm8').css('color', 'black');

            $('.comm1video').removeClass('selected');
            $('.comm2video').removeClass('selected');
            $('.comm3video').removeClass('selected');
            $('.comm4video').removeClass('selected');
            $('.comm6video').removeClass('selected');
            $('.comm8video').removeClass('selected');
            $('.comm7video').removeClass('selected');
            $('.commallvideos').removeClass('selected');
        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.comm5').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.comm5').css('text-decoration', 'none');
        });


        $('.comm6').click(function () {
            $('.comm6').css('font-weight', 'bold');
            $('.comm6').css('color', 'black');
            $('.comm6video').addClass('selected');


            $('.comm1').css('font-weight', 'normal');
            $('.comm1').css('color', 'black');
            $('.comm2').css('font-weight', 'normal');
            $('.comm2').css('color', 'black');
            $('.comm3').css('font-weight', 'normal');
            $('.comm3').css('color', 'black');
            $('.comm4').css('font-weight', 'normal');
            $('.comm4').css('color', 'black');
            $('.comm5').css('font-weight', 'normal');
            $('.comm5').css('color', 'black');
            $('.comm8').css('font-weight', 'normal');
            $('.comm8').css('color', 'black');
            $('.comm7').css('font-weight', 'normal');
            $('.comm7').css('color', 'black');

            $('.comm5video').removeClass('selected');
            $('.comm2video').removeClass('selected');
            $('.comm3video').removeClass('selected');
            $('.comm4video').removeClass('selected');
            $('.comm1video').removeClass('selected');
            $('.comm8video').removeClass('selected');
            $('.comm7video').removeClass('selected');
            $('.commallvideos').removeClass('selected');
        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.comm6').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.comm6').css('text-decoration', 'none');
        });

        $('.comm7').click(function () {
            $('.comm1').css('font-weight', 'normal');
            $('.comm1').css('color', 'black');
            $('.comm2').css('font-weight', 'normal');
            $('.comm2').css('color', 'black');
            $('.comm3').css('font-weight', 'normal');
            $('.comm3').css('color', 'black');
            $('.comm4').css('font-weight', 'normal');
            $('.comm4').css('color', 'black');
            $('.comm5').css('font-weight', 'normal');
            $('.comm5').css('color', 'black');
            $('.comm6').css('font-weight', 'normal');
            $('.comm6').css('color', 'black');
            $('.comm8').css('font-weight', 'normal');
            $('.comm8').css('color', 'black');
            $('.comm7').css('font-weight', 'bold');
            $('.comm7').css('color', '#980d8c');

            $('.comm5video').removeClass('selected');
            $('.comm2video').removeClass('selected');
            $('.comm3video').removeClass('selected');
            $('.comm4video').removeClass('selected');
            $('.comm6video').removeClass('selected');
            $('.comm8video').removeClass('selected');
            $('.comm1video').removeClass('selected');
            $('.commallvideos').removeClass('selected');

            $('.comm7').css('font-weight', 'bold');
            $('.comm7').css('color', 'black');
            $('.comm7video').addClass('selected');
        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.comm7').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.comm7').css('text-decoration', 'none');
        });

        //////////////////
        $('.comm8').click(function () {
            $('.comm1').css('font-weight', 'normal');
            $('.comm1').css('color', 'black');
            $('.comm2').css('font-weight', 'normal');
            $('.comm2').css('color', 'black');
            $('.comm3').css('font-weight', 'normal');
            $('.comm3').css('color', 'black');
            $('.comm4').css('font-weight', 'normal');
            $('.comm4').css('color', 'black');
            $('.comm5').css('font-weight', 'normal');
            $('.comm5').css('color', 'black');
            $('.comm6').css('font-weight', 'normal');
            $('.comm6').css('color', 'black');
            $('.comm7').css('font-weight', 'normal');
            $('.comm7').css('color', 'black');
            $('.comm8').css('font-weight', 'bold');
            $('.comm8').css('color', 'black');
            $('.comm5video').removeClass('selected');
            $('.comm2video').removeClass('selected');
            $('.comm3video').removeClass('selected');
            $('.comm4video').removeClass('selected');
            $('.comm6video').removeClass('selected');
            $('.comm1video').removeClass('selected');
            $('.comm7video').removeClass('selected');
            $('.commallvideos').removeClass('selected');
            $('.comm8video').addClass('selected');
        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.comm8').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.comm8').css('text-decoration', 'none');
        });

        ////// all comm

        $('.remove').click(function () {
            $('.comm1').css('font-weight', 'normal');
            $('.comm1').css('color', 'black');
            $('.comm2').css('font-weight', 'normal');
            $('.comm2').css('color', 'black');
            $('.comm3').css('font-weight', 'normal');
            $('.comm3').css('color', 'black');
            $('.comm4').css('font-weight', 'normal');
            $('.comm4').css('color', 'black');
            $('.comm5').css('font-weight', 'normal');
            $('.comm5').css('color', 'black');
            $('.comm6').css('font-weight', 'normal');
            $('.comm6').css('color', 'black');
            $('.comm7').css('font-weight', 'normal');
            $('.comm7').css('color', 'black');
            $('.comm8').css('font-weight', 'normal');
            $('.comm8').css('color', 'black');
            $('.comm5video').removeClass('selected');
            $('.comm2video').removeClass('selected');
            $('.comm1video').removeClass('selected');
            $('.comm3video').removeClass('selected');
            $('.comm4video').removeClass('selected');
            $('.comm6video').removeClass('selected');
            $('.comm8video').removeClass('selected');
            $('.comm7video').removeClass('selected');
            $('.commallvideos').addClass('selected');
        }).mouseover(function () {

            //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
            $('.remove').css('text-decoration', 'underline');


        }).mouseout(function () {

            //Add and remove class
            $('.remove').css('text-decoration', 'none');
        });



    });

