function addLoadEvent(func) {
	
	var ol = window.onload;
	if (typeof window.onload != "function") {
		window.onload = func;
	} else {
		window.onload = function() {
			ol();
			func();
		}
	}
}

var windowArgs = "resizable=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no";

function popWindow(url, id, width, height) {
	var newWin = window.open(url, id, "width="+width+",height="+height+","+windowArgs);
	newWin.focus();
}

function popPlayer(path) {
	var playerWin = window.open("/flash/player/?path="+path, "player", "width=324,height=240,"+windowArgs);
	playerWin.focus();
}

function popDemo(prodID, ref, page, skip, file) {
	var path = "http://www.rolandus.com/products/demo.aspx";
	path += "?prodID="+prodID+"&ref="+ref+"&page="+page+"&skip="+skip+"&file="+file;
	var args = "width=620,height=350,resizable=no,toolbar=no,location=no,";
	args += "directories=no,status=no,scrollbars=no,menubar=no";
	var demoWin = window.open(path, prodID, args);
	demoWin.focus();
}

function downloadFile(DownloadId) {
	switch (DownloadId) {
	case "/support/genappstools/bin/SMFPLAYR.ZIP" :
		DownloadId = "398";
		FileName = "SMFPLAYR.ZIP";
		break;
	case "/support/genappstools/bin/QMIDI.sit.hqx" :
		DownloadId = "372";
		FileName = "qmidi161.sit";	
		break;
	case "/support/genappstools/bin/SysExLibrarian.dmg" :
		DownloadId = "1920";
		FileName = "SysExLibrarian.dmg";
	}
	window.location = "/support/downloads_updates/eula.php?DownloadId="+DownloadId+"&FileName="+FileName;
}

function getCurrentYear() {
	var d = new Date();
	return d.getFullYear();
}
