var newWindow;


launchAudio = function(file) {
	var newWindow = window.open(file, 'audio','toolbar=no, resizable=no, location=no, directories=no, status=no, scrollbars=no, menubar=no, width=75, height=35, left=150, top=150');
	self.focus();
	return;
}




launchImage = function(file,winWidth,winHeight) {
	if (typeof newWindow == "object") {
		newWindow.close();
	}
	var fullURL = "visuals.html?imgSrc=" + file;
	var fullWidth = winWidth + 10;
	var fullHeight = winHeight + 10;
	newWindow = window.open(fullURL, 'Image','toolbar=no, resizable=no, location=no, directories=no, status=no, scrollbars=no, menubar=no, width=' + fullWidth + ', height=' + fullHeight + ', left=150, top=150');
	newWindow.focus();
	return;
}





getArgs = function() {
		var args = new Object();
		var query = location.search.substring(1);
		var pairs = query.split("&");
		for (var i=0; i<pairs.length; i++) {
			var pos = pairs[i].indexOf('=');
			if (pos == -1) continue;
			var argname = pairs[i].substring(0,pos);
			var value = pairs[i].substring(pos+1);
			args[argname] = unescape(value);
		}
		this.max = i;
		return args;
}