/*------------------------

  Default Functions
 
------------------------*/

//needed for the contact links funtion to work properly
function getDisplayFriendID() { return MySpace.ClientContext.DisplayFriendId; }


/*------------------------

  Custom Functions
 
------------------------*/

/* wallpaper scroll */

var photos=new Array()
var photoslink=new Array()
var which=0

//define images. You can have as many as you want:
photos[0]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/Images/thm_wp1.jpg"
photos[1]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/Images/thm_wp2.jpg"
photos[2]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/Images/thm_wp3.jpg"
photos[3]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/Images/thm_wp4.jpg"
photos[4]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/Images/thm_wp5.jpg"

//Specify whether images should be linked or not (1=linked)
var linkornot=1

//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/downloads/wallpapers/wp1.html"
photoslink[1]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/downloads/wallpapers/wp2.html"
photoslink[2]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/downloads/wallpapers/wp3.html"
photoslink[3]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/downloads/wallpapers/wp4.html"
photoslink[4]="http://creative.myspace.com/Client/SummitEntertainment/SexDrive/downloads/wallpapers/wp5.html"

//do NOT edit pass this line

var preloadedimages=new Array()
    for (i=0;i<photos.length;i++){
    preloadedimages[i]=new Image()
    preloadedimages[i].src=photos[i]
}


function applyeffect(){
    if (document.all && photoslider.filters){
    photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*5)
    photoslider.filters.revealTrans.stop()
    photoslider.filters.revealTrans.apply()
    }
}



function playeffect(){
    if (document.all && photoslider.filters)
    photoslider.filters.revealTrans.play()
}

function keeptrack(){
    window.status="Image "+(which+1)+" of "+photos.length
}


function backward(){
    if (which>0){
    which--
    applyeffect()
    document.images.photoslider.src=photos[which]
    playeffect()
    keeptrack()
    }
}

function forward(){
    if (which<photos.length-1){
    which++
    applyeffect()
    document.images.photoslider.src=photos[which]
    playeffect()
    keeptrack()
    }
}

function transport(){
    //window.location=photoslink[which]
    window.open(photoslink[which], 'newWin', 'width=438, height=550, toolbar=0, scrollbars=0, location=0, menubar=0, resizable=no, statusbar-0, top=200, left=260');
    //window.open(photoslink[which], '', '');
}



/* video swap */
function showHD(videoID) {
   
    document.getElementById('videoContent').innerHTML = '<iframe src="http://creative-origin.myspacecdn.com/Client/SummitEntertainment/SexDrive/hd-' + videoID + '.html" width="852" height="650" frameborder="0" " class="trailerContent"></iframe>';
    
}


function showVideo(videoID) {
    document.getElementById('videoContent').innerHTML = '<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m=' + videoID + ',t=1,mt=video,sr=0" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash" width="500" height="317" wmode="transparent"></embed>'
}
