coss.parseYoutubeUrl = function (aUrl) {
	var matches;
	var parts = {
		videoId : null
	};
	
	matches = (aUrl+'').match(/youtube\.com.+v=([^&]+)/);
	
	if (matches == null || matches.length != 2) {
		throw "Invalid Youtube URL: '" + aUrl + "'";
	}
	
	parts.videoId = matches[1];
	
	return parts;
};

coss.createYoutubeIframeEmbedUrl = function (aOptions) {
	var url;
	
	url =
		'http://www.youtube.com/embed/' 
		+ aOptions.videoId
		+ '?autoplay=1&wmode=transparent'
	;
	
	return url;
};
