﻿function moveToPrevious(listId, prevButtonId, nextButtonId) {
    var e = document.getElementById(listId);
    if(e.offsetLeft==-580)
        new Effect.Move(listId, { x: 580, y: 0, transition: Effect.Transitions.sinoidal });

    e = document.getElementById(prevButtonId);
    if (e != null)
        e.style.display = 'none';

    e = document.getElementById(nextButtonId);
    if (e != null)
        e.style.display = 'block';        
}

function moveToNext(listId, prevButtonId, nextButtonId) {
    var e = document.getElementById(listId);
    if (e.offsetLeft ==0)
        new Effect.Move(listId, { x: -580, y: 0, transition: Effect.Transitions.sinoidal });

    e = document.getElementById(prevButtonId);
    if (e != null)
        e.style.display = 'block';

    e = document.getElementById(nextButtonId);
    if (e != null)
        e.style.display = 'none';  
}

function WaterMarkKeywordsTB(txt, evt) {
    var defaultText = "Enter Keywords to Search";
    if (txt.value.length == 0 && evt.type == "blur") {
        txt.style.color = "gray";
        txt.value = defaultText;
    }

    if (txt.value == defaultText && evt.type == "focus") {
        txt.style.color = "black";
        txt.value = "";
    }
}

function popupVideo(vidUrl) {
    popupVideo(vidUrl, 561, 469);
}
function popupVideo(vidUrl, winWidth, winHeight) {
    popupWin = window.open('popup.aspx?url='+vidUrl+'&width='+ winWidth +'&height='+winHeight,
        'coppopup',
        'height=' +winHeight+
        ',width=' + winWidth +
        ',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
    popupWin.resizeTo(winWidth+2,winHeight+30);
}