﻿// JScript File

function HideDiv(id) {
document.getElementById(id).style.visibility='hidden';
}
function ShowDiv(id) {
    document.getElementById(id).style.visibility = '';
}
function ShowDivWithConfirm(id) {
    if (confirm('בכדי לצפות בסרט עליך לעבור מבחן, האם להמשיך?')) {
//        var a = document.getElementById('contVideoBigDiv').style.Top;
//        var b = document.getElementById('contVideoBigDiv').style.Left;
//        alert(a + ',' + b);
        document.getElementById(id).style.visibility = '';
    }
    else {
        
    }
}

function OpenRenewPass() {
    //returnValue = window.showModalDialog('RenewPassword.aspx', 'RenewPass', 'dialogWidth=760px;dialogHeight=500px;resizable=no;help=no;unadorned=yes');

    window.open('RenewPassword.aspx', 'RenewPass', 'Width=760px;dialogHeight=400px;resizable=no;help=no;unadorned=yes');
}

function SetBigImage(strSrc)
{
  document.getElementById('BigImage').src=strSrc;
}

function OpenTest(id) {

    var url = "MovieTest.aspx?date=null&upid=89098890998373uu3783993i383&MovieID=" + id + "&ifopen=1&close=9922k2992k299992&windowid=sadfW##3334434343rvfdew";
    window.open(url, 'MovieTest' + id, 'dialogWidth=800px;dialogHeight=650px;resizable=no;help=no;unadorned=yes');

//    returnValue = window.showModalDialog(url, 'MovieTest'+id, 'dialogWidth=800px;dialogHeight=650px;resizable=no;help=no;unadorned=yes');
}
function PlayMovieInMyRoom(id) {
   
window.location = "MyRoomMagic.aspx?date=null&upid=89098890998373uu3783993i383&MovieID="+id+"&ifopen=1&close=9922k2992k299992&windowid=sadfW##3334434343rvfdew";
}
function PlayMovieInMyCourse(id) {

    window.location = "MyRoomCourse.aspx?date=null&upid=89098890998373uu3783993i383&MovieID=" + id + "&ifopen=1&close=9922k2992k299992&windowid=sadfW##3334434343rvfdew";
}
function createPlayer(theFile,theImage, w, h, IconType) {
    //debugger;
    if (w == null)
        w = "450";
    if (h == null)
        h = "370";

    if (IconType == 1) {
        var flashvars = {
            file: theFile,
            image: theImage,
            autostart: "false",
            playlistsize: "100",
            // playlist:"bottom",
            linktarget: "_self",
            //displayclick:"link",
            //-  skin:"http://www.jeroenwijering.com/upload/overlay.swf",
            lightcolor: "cc9900",
            repeat: "list",
            controlbar: "over"
            // overstretch:"true",
            //logo:"http://www.tudu.co.il/main/img/BackgroundLink.png" ,
            //link:"http://www.tudu.co.il",
            //linkfromdisplay:"true"



            //quality:"false"
           // overstretch:"true",

            //usefullscreen:"true"
            //bufferlength:"5"
            //smoothing:"false"
        }

    }
    else {
        var flashvars = {
            image: /*"images/temp_video_2.jpg"*/theImage,
            file: theFile,
          //  logo: "images/usa.png",
          //  overstretch: "true",
         //   usefullscreen:"true",
            autostart: "false",
            playlistsize: "100",
            linktarget: "_self",
            //- skin:"http://www.jeroenwijering.com/upload/overlay.swf",
            lightcolor: "cc9900",
            repeat: "list",
            controlbar: "over"
            

        }

    }
    var params = {

        allowfullscreen: "true",
        allowscriptaccess: "always",
        WMode: "opaque"
        //WMode:"Transparent"
    }
    var attributes = {
        id: "player1",
        name: "player1"
    }
    swfobject.embedSWF("../site/scripts/player.swf", "container", w, h, "9.0.115", false, flashvars, params, attributes);

}

