﻿// JScript File
function genMusicPlayer(link,photoLink){
    var musicPlayer = "<object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' height=\'135\' width=\'258\'> \n\
    <param name=\'movie\' value=\'swf/symPlayer.swf?link=" + link + "\'>\n\
    <param name=\'quality\' value=\'best\' /> \n\
    <param name=\'play\' value=\'true\' /> \n\
    <embed height=\'135\' FlashVars=\'link=" + link + "\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' src=\'swf/symPlayer.swf\' type=\'application/x-shockwave-flash\' width=\'258\' quality=\'best\' play=\'true\' >\
    </object>";    
    return musicPlayer;
}
function genPhoto(link,description){
    if(link){
        var photoViewer = "<img border='0' alt='" + description + "' title='" + description + "' src=\'getPhoto.php?size=l&id=" + link +  "\'>"
        return photoViewer;
    }
    else{
        return '';
    }
}
function genVideoPlayer(baseURL, file){
    var videoPlayer = "<object border=0 type=\'application/x-shockwave-flash\' data=\'swf/FlowPlayerLP.swf\' width=\'425\' height=\'350\' id=\'FlowPlayer\'>\
	<param name=\'allowScriptAccess\' value=\'sameDomain\' />\
	<param name=\'movie\' value=\'swf/FlowPlayerLP.swf\' />\
	<param name=\'quality\' value=\'high\' />\
	<param name=\'scale\' value=\'noScale\' />\
	<param name=\'wmode\' value=\'transparent\' />\
	<param name=\'flashvars\' value=\'thumbsOnFLV=true&videoFile=" + file + "&loop=false&autoPlay=true\' />\
	<embed width=\'425\' height=\'350\' FlashVars=\'thumbsOnFLV=true&videoFile=" + file + "&loop=false&autoPlay=true\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' src=\'swf/FlowPlayerLP.swf\' type=\'application/x-shockwave-flash\'  quality=\'best\' play=\'true\' >\
    </object>";
    return videoPlayer;
}

function switchMedia(newHTML,location){
    //alert(newHTML);        
    document.getElementById(location).innerHTML = newHTML;
}
function switchPhoto(newHTML){
    document.getElementById('photoCenter').innerHTML = newHTML;    
}

