﻿// Download Variables
var xtimerid;
var DownloadPlatform;
var x2timerid;
// End Download Variables

function ShowFloater(FloaterName) {
    var LockPane = 'DivLock';

    // Change Style to Make Visible/Invisible
    if (document.getElementById(FloaterName).style.display == "none") {
        document.getElementById(FloaterName).style.display = "block";
        document.getElementById(LockPane).style.display = "block";
    }
    else {
        document.getElementById(FloaterName).style.display = "none";
        document.getElementById(LockPane).style.display = "none";
    }

}

// Button Click Event Handler
function ButtonClick(sender, e) {
    __doPostBack(sender, e);
} 

function ShowProduct(Product) {
    var ElementName = Product + 'Div';
    var LockName = 'DivLock';

    // Change Style to Make Visible/Invisible
    if (document.getElementById(ElementName).style.display == "none") {
        document.getElementById(ElementName).style.display = "block";
        document.getElementById(LockName).style.display = "block";
    }
    else {
        document.getElementById(ElementName).style.display = "none";
        document.getElementById(LockName).style.display = "none";
    }
}
function ShowProductDiv(ProductDiv) {
    var ElementName = ProductDiv;
    var LockName = 'DivLock';

    // Change Style to Make Visible/Invisible
    if (document.getElementById(ElementName).style.display == "none") {
        document.getElementById(ElementName).style.display = "block";
        document.getElementById(LockName).style.display = "block";
    }
    else {
        document.getElementById(ElementName).style.display = "none";
        document.getElementById(LockName).style.display = "none";
    }
}
function DownloadHomePage()
{
x2timerid=self.setTimeout('DownloadHome()',10000);
}

function DownloadHome()
{
self.clearInterval(x2timerid);
window.location="../Default.aspx";
}

function StartDownload(Platform) {
    DownloadPlatform = Platform;
    xtimerid = self.setTimeout('Download()', 1500);  
}

function Download() {
    self.clearTimeout(xtimerid);
    window.location = "/store/autodownload.aspx?platform=" + DownloadPlatform.toString().toLowerCase();
}

function openWindow(page, status, scroll, width, height) {
    window.open(page, "Window", "status=" + status + ",scrollbars=" + scroll + ",width=" + width + ",height=" + height);
}

function ResizeBrowser() {
    window.resizeTo(1024, 768);
}

//Homepage flash videos
function openFlash(movie) {
    if (movie == 'teacher')
        window.open("/Media/Teachers_and_Students/teacher.htm", "SmartMusic", "status=none,scrollbars=no,width=540,height=304");
    if (movie == 'content')
        window.open("/Media/Teachers_and_Students/content.htm", "SmartMusic", "status=none,scrollbars=no,width=540,height=304");
    if (movie == 'parent')
        window.open("/Media/Teachers_and_Students/parent.htm", "SmartMusic", "status=none,scrollbars=no,width=540,height=304");
    if (movie == 'admin')
        window.open("/Media/Teachers_and_Students/admin.htm", "SmartMusic", "status=none,scrollbars=no,width=540,height=304");
}

//Wynton Marsalis videos
function stream(file,qlt) {
	var strURLw = 'mms://wm.streamingmediahosting.com/makemusic/'+file+'_'+qlt+'.wmv'; // Stream on Partner Streaming server
	//var strURLm = 'rtsp://qt.partner-streaming.com/makemusic/'+file+'_'+qlt+'.mov';
	var strURLm = 'rtsp://qt.streamingmediahosting.com/makemusic/' + file + '_' + qlt + '.mov'; // Stream on QuickTime server
	if(navigator.platform == "Win32") {
		document.location = strURLw;	
	} else {
		document.location = strURLm;
	}
}								



