/**
 * Renders button with onclick event into reportFunctionLessVid function.
 * It is simple robot protection.
 * @param string remUrl url for ajax call
 */
function buttonForFunctionLessVid(text, title, remUrl, confirmText, thanksText) {
	document.write("<a title=\"" + title + "\" href=\"#\" onclick=\"reportFunctionLessVid('"+remUrl+"', '" + confirmText + "', '" + thanksText + "'); return false;\">" + text + "</a>");
	return true;
}

/**
 * Calls remote url for a sending email about functionless video
 * @param string remUrl url for ajax call
 */
function reportFunctionLessVid(remUrl, confirmText, thanksText) {
	if (confirm(confirmText)) {
		//add isAjax parameter
		$.get(remUrl+'&isAjax=yes&isRobot=no',
			function(data){
			 alert(thanksText);
			}
		);
	}
}
function showEmailLayer() {
	div = $('#newsletter');
	if (div.css('display') != "block") {
		div.css('display',"block");
	} else {
		div.css('display', "none");
	}
	
}

function showDownloadLayer() {
	displ = $('#downloadVideo');
	if (displ.text() != '') {
		if (displ.css('display') != "block") {
			displ.css('display', 'block');
		} else {
			displ.css('display', 'none');
		}
	}
}