﻿
/* Album Picture Script */
function LoadPic(PicTitle ,PicDescription, PicFolder, PicPosition)
{      
  PageMethods.LoadPic(PicTitle,PicDescription, PicFolder, PicPosition, Load);        
}
function Load(result)
{
 $get('ctl00_MainContent_PicContnet').innerHTML = result;
} 
function ClickPic()
{
   document.getElementById("A1").click();
}

/* Scroller Script */

function feedMsg(result)
{
  $get('ticker').innerHTML  = result;
}

        //scroller width
        var swidth=100;
        //scroller height
        var sheight=150;
        //background color
        var sbcolor='#ffcc33';
        //scroller's speed
        var sspeed=2;

        var resumesspeed=sspeed
        function start() 
        {
                if (document.all) 
                    iemarquee(ticker);
                else 
                if (document.getElementById)
                    ns6marquee(document.getElementById('ticker'));
        }
        
        function iemarquee(whichdiv)
        {
                iediv=eval(whichdiv)
                sheight += 50;
                iediv.style.pixelTop=sheight
                PageMethods.GetUpdate(feedMsg);
                sizeup=iediv.offsetHeight
                ieslide()
        }
        
        function ieslide(){
                if (iediv.style.pixelTop>=sizeup*(-1))
                {
                        iediv.style.pixelTop-=sspeed
                        setTimeout("ieslide()",100)
                }
                else{
                        iediv.style.pixelTop=sheight
                        ieslide()
                }
        }
        
        function ns6marquee(whichdiv)
        {
                ns6div=eval(whichdiv)
                sheight += 50;
                ns6div.style.top=sheight + "px";
                PageMethods.GetUpdate(feedMsg);
                sizeup=ns6div.offsetHeight
                ns6slide()
        }
        function ns6slide()
        {
                if (parseInt(ns6div.style.top)>=sizeup*(-1))
                {
                        theTop = parseInt(ns6div.style.top)-sspeed
                        ns6div.style.top = theTop + "px";
                        setTimeout("ns6slide()",100)
                }
                else 
                {
                        ns6div.style.top = sheight + "px";
                        ns6slide()
                }
        }


/* TEMP */



function change_background(state , button)
{
    document.getElementById("right_" + button).style.backgroundImage = "url('images/button_right_" + state + ".jpg')";
    document.getElementById("left_" + button).style.backgroundImage = "url('images/button_left_" + state + ".jpg')";
    document.getElementById("mid_" + button).style.backgroundImage = "url('images/button_mid_" + state + ".jpg')";
}
