//
//	JavaScript Lib
//
function nuEstiUser(sms)
{
	alert('EROARE:\n\n'+sms);
	return;
}
//
function aYahoo(titlu, linku)
{
	document.location.href='ymsgr:im?+&msg='+titlu+' - '+linku+' (MASS)';
	return;
}
//
function MENIU_Index_Schimba(valoare)
{
//	alert(valoare)
	if (valoare == 'filme') {
		document.getElementById('index_meniu_filme').style.display=''
		document.getElementById('index_meniu_actori').style.display='none'
	} else {
		document.getElementById('index_meniu_filme').style.display='none'
		document.getElementById('index_meniu_actori').style.display=''
	}
	return
}
//
function ACTOR_ScrieNumele(zaname)
{
	if (zaname == '')
	{
		document.getElementById('liofoactt').innerHTML='<span>alege un actor pentru detalii</span>';
	} else {
		document.getElementById('liofoactt').innerHTML=zaname;
	}
	return;
}
//
function fa_print()
{
	if (!window.print)
	{
		alert("EROARE:\n\nBrowser-ul tau nu suporta aceasta functie!")
		return
	}
	window.print()
}
//
function playTrailerIDX(zaid, zah5)
{
	htmleu = '<h5>';
	htmleu += zah5;
	htmleu += '</h5>';
	htmleu += '<object width="320" height="201">';
	htmleu += '<param name="movie" value="http://www.youtube.com/v/';
	htmleu += zaid;
	htmleu += '&hl=en&fs=1&rel=0&color1=0xA8B7C3&color2=0xA8B7C3&border=0"></param>';
	htmleu += '<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>';
	htmleu += '<embed src="http://www.youtube.com/v/';
	htmleu += zaid;
	htmleu += '&hl=en&fs=1&rel=0&color1=0xA8B7C3&color2=0xA8B7C3&border=0" type="application/x-shockwave-flash"';
	htmleu += ' allowscriptaccess="always" allowfullscreen="true" width="320" height="201"></embed>';
	htmleu += '	</object>';
	document.getElementById('traind_play').innerHTML=htmleu;
	return false;
}
//
function playTrailerFLV(zah5, video_ts, video_id, video_rsa)
{
	htmleu = '<h5>';
	htmleu += zah5;
	htmleu += '</h5>';
	htmleu += '<div style="overflow: visible; padding-left: 320px; display: block; position: relative; width: 0px; height: 0px; left: 0px; top: 0px; z-index: 65535; opacity: 0.5;">';
	htmleu += '</div>';
	htmleu += '<embed type="application/x-shockwave-flash" src="/flv/player.swf" style="" id="player" name="player" bgcolor="#FFFFFF" quality="high" allowscriptaccess="always" allowfullscreen="true" ';
	htmleu += 'flashvars="file=/storage/trailer/'+video_ts+'/'+video_id+'-'+video_rsa+'.flv&amp;image=/storage/trailer/'+video_ts+'/'+video_id+'-'+video_rsa+'.jpg&amp;skin=/flv/modieus.swf&amp;logo=http://www.cinemabox.ro/images/flvlogo.png&amp;repeat=none&amp;shuffle=false&amp;shownavigation=true&amp;autostart=false&amp;stretching=uniform" ';
	htmleu += 'width="320" height="201">';
	document.getElementById('traind_play').innerHTML=htmleu;
	//
	return false;
}
//
function afiseaza_commboxform()
{
	document.getElementById('comm_form_run').style.display='none'
	document.getElementById('comm_form').style.display=''
	return
}
//
function inchide_commboxform()
{
	document.getElementById('comm_form_run').style.display=''
	document.getElementById('comm_form').style.display='none'
	return
}
//
function btg_openclose(div_id, diva_id) {
	document.getElementById(div_id).style.display='none'
	document.getElementById(diva_id).style.display=''	
	return
}
//
function btg_allopcl(ce) {
	if (ce == 'filme') {
		try {
			document.getElementById('srk_fa_o').style.display='none'
		} catch (e) {}
		try {
			document.getElementById('srk_rpp_o').style.display='none'
		} catch (e) {}
		try {
			document.getElementById('srk_fa_c').style.display=''
		} catch (e) {}
		try {
			document.getElementById('srk_rpp_c').style.display=''
		} catch (e) {}
		//
		try {
			document.getElementById('srk_ff_o').style.display=''
		} catch (e) {}
		try {
			document.getElementById('srk_rp_o').style.display=''
		} catch (e) {}
		try {
			document.getElementById('srk_ff_c').style.display='none'
		} catch (e) {}
		try {
			document.getElementById('srk_rp_c').style.display='none'
		} catch (e) {}
	} else if (ce == 'actori') {
		try {
			document.getElementById('srk_ff_o').style.display='none'
		} catch (e) {}
		try {
			document.getElementById('srk_rp_o').style.display='none'
		} catch (e) {}
		try {
			document.getElementById('srk_ff_c').style.display=''
		} catch (e) {}
		try {
			document.getElementById('srk_rp_c').style.display=''
		} catch (e) {}
		//
		try {
			document.getElementById('srk_fa_o').style.display=''
		} catch (e) {}
		try {
			document.getElementById('srk_rpp_o').style.display=''
		} catch (e) {}
		try {
			document.getElementById('srk_fa_c').style.display='none'
		} catch (e) {}
		try {
			document.getElementById('srk_rpp_c').style.display='none'
		} catch (e) {}
	} else {}
	
	return
}
//
function ADS_Arata_Top728() {
	return;
}
//
function verifica_inregistrare(formular)
{
//	alert("Verific formularul?");
	
	function isValidEmail(str) {
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	}
	
	if (typeof formular.nume!=='undefined') {
		if (formular.nume.value == "") {
			alert("EROARE:\n\nNu ai scris numele tau.");
			formular.nume.focus();
			return false;
		}
	}
	
	if (typeof formular.a_luna!=='undefined') {
		if (formular.a_luna.value == "0") {
			alert("EROARE:\n\nNu ai ales luna pentru data nasterii.");
			formular.a_luna.focus();
			return false;
		}
	}
	
	if (typeof formular.oras!=='undefined') {
		if (formular.oras.value == "") {
			alert("EROARE:\n\nNu ai scris localitatea ta.");
			formular.oras.focus();
			return false;
		}
	}
	
	if (typeof formular.email!=='undefined') {
		if (formular.email.value == "") {
			alert("EROARE:\n\nNu ai scris adresa de email.");
			formular.email.focus();
			return false;
		}
	}
	
	if (typeof formular.email!=='undefined') {
		if ((formular.email.value != "") && (isValidEmail(formular.email.value) != true)) {
			if (confirm("EROARE:\n\nEsti sigur ca adresa de email este valida?")) {
				//ok
			} else {
				formular.email.focus();
				return false;
			}
		}
	}

	if (typeof formular.passa!=='undefined') {
		if (formular.passa.value == "") {
			alert("EROARE:\n\nNu ai scris parola.");
			formular.passa.focus();
			return false;
		}
	}
	
	if (typeof formular.passb!=='undefined') {
		if (formular.passa.value != formular.passb.value) {
			alert("EROARE:\n\nCele doua parole nu coincid.");
			formular.passb.focus();
			return false;
		}
	}
	
	if (typeof formular.aiurea!=='undefined') {
		if (formular.aiurea.value == "") {
			alert("EROARE:\n\nNu ai scris codul de siguranta.");
			formular.aiurea.focus();
			return false;
		}
	}

	return true;
}
//
function verifica_trimite(formular)
{
//	alert("Verific formularul?");
	
	function isValidEmail(str) {
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	}
	
	if (typeof formular.email!=='undefined') {
		if (formular.email.value == "") {
			alert("EROARE:\n\nNu ai scris adresa de email.");
			formular.email.focus();
			return false;
		}
	}
	
	if (typeof formular.email!=='undefined') {
		if ((formular.email.value != "") && (isValidEmail(formular.email.value) != true)) {
			if (confirm("EROARE:\n\nEsti sigur ca adresa de email este valida?")) {
				//ok
			} else {
				formular.email.focus();
				return false;
			}
		}
	}
	
	if (typeof formular.aiurea!=='undefined') {
		if (formular.aiurea.value == "") {
			alert("EROARE:\n\nNu ai scris codul de siguranta.");
			formular.aiurea.focus();
			return false;
		}
	}
	
	return true;
}

function verifica_recomanda(formular)
{
//	alert("Verific formularul?");
	
	function isValidEmail(str) {
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	}
	
	if (typeof formular.email_1!=='undefined') {
		if (formular.email_1.value == "") {
			alert("EROARE:\n\nNu ai scris nicio adresa de email.");
			formular.email_1.focus();
			return false;
		}
	}
	
	if (typeof formular.email_1!=='undefined') {
		if ((formular.email_1.value != "") && (isValidEmail(formular.email_1.value) != true)) {
			if (confirm("EROARE:\n\nEsti sigur ca adresa de email este valida?")) {
				//ok
			} else {
				formular.email_1.focus();
				return false;
			}
		}
	}
	
	if (typeof formular.nume!=='undefined') {
		if (formular.nume.value == "") {
			alert("EROARE:\n\nNu ai scris numele tau.");
			formular.nume.focus();
			return false;
		}
	}
	
	if (typeof formular.mesaj!=='undefined') {
		if (formular.mesaj.value == "") {
			alert("EROARE:\n\nNu ai scris mesajul tau.");
			formular.mesaj.focus();
			return false;
		}
	}
	
	if (typeof formular.aiurea!=='undefined') {
		if (formular.aiurea.value == "") {
			alert("EROARE:\n\nNu ai scris codul de siguranta.");
			formular.aiurea.focus();
			return false;
		}
	}
	
	return true;
}
//
function verifica_trimite_sub(formular)
{
//	alert("Verific formularul?");
	
	if (typeof formular.aiurea!=='undefined') {
		if (formular.aiurea.value == "") {
			alert("EROARE:\n\nNu ai scris codul de siguranta.");
			formular.aiurea.focus();
			return false;
		}
	}
	
	return true;
}