
var allPageTags = new Array();

function pageScroll() {
    window.scrollBy(0, 10); // horizontal and vertical scroll increments
    scrolldelay = setTimeout('pageScroll()', 100); // scrolls every 100 milliseconds
}

function jumpScroll() {
    window.scroll(0, 650); // horizontal and vertical scroll targets
}

function ChangeClasses(fromClass, toClass) { 
     //Populate the array with all the page tags 
     var allPageTags=document.getElementsByTagName("*"); 
     //Cycle through the tags using a for loop 
     for (i=0; i<allPageTags.length; i++) { 
         //Pick out the tags with our class name 
         if (allPageTags[i].className==fromClass) { 
             //Manipulate this in whatever way you want 
             allPageTags[i].className=toClass; 
         }
     } 
}

function ImageSelectedState(imgNumber) {

    var thumbnum = 0;
     
     for (i=0; i<document.images.length; i++) { 
         //Pick out the tags with our class name 
         if (document.images[i].className=='thumbs') { 
            if (thumbnum==imgNumber) {
                document.images[i].className='thumbs selected'; 
            }
            thumbnum = thumbnum + 1;
         }
     } 
}

function deletePlayer(theWrapper, thePlaceholder, thePlayerId) { 
        swfobject.removeSWF(thePlayerId);
        var tmp=document.getElementById(theWrapper);
        if (tmp) { tmp.innerHTML = "<div id=" + thePlaceholder + "></div>"; 
        
        }
}


function createPlayer(thePlaceholder, thePlayerId, theFile) {

        var flashvars = {
                file:theFile, 
                autostart:"false",
                image:"/uploadedImages/Video/Keyframes_and_Thumbnails/scottsdale_wrap_up_keyframe.jpg",
                plugins:"viral-1,googlytics-1"
        }
        var params = {
                allowfullscreen:"true", 
                allowscriptaccess:"always",
                allownetworking:"all"
        }
        var attributes = {
                id:thePlayerId,  
                name:thePlayerId
        }
        swfobject.embedSWF("/uploadedImages/Skin_Editor/Video/player.swf", thePlaceholder, "370", "275", "9.0.115", false, flashvars, params, attributes);
}


function initPlayer(theFile) { 
        deletePlayer('vidwrapper', 'vidplayer', 'player1'); 
        createPlayer('vidplayer', 'player1', theFile);
}
