// JavaScript Document

var winName="ayuda";
function Abrir_Ventana(theURL,w,h) {

	var windowprops ="top=20%,left=20%,toolbar=no,location=no,status=no, menubar=no,scrollbars=yes, resizable=yes,width=" + w + ",height=" + h;

	window.open(theURL,winName,windowprops);
}

function ayudamovil(idioma) { 
	if (idioma=="es")  {
		Abrir_Ventana('/ipod-movil-ayuda.html','420','480');
		}
		else {
			if (idioma=="en") {
				Abrir_Ventana('/ipod-movil-help.html','420','480');
				}
				else  { 
					Abrir_Ventana('/ipod-movil-ayuda.html','420','480');
				}
		}
}

function comprobaEmail() {
	if (document.getElementById("eros_user_email").value=="" || document.getElementById("eros_user_email").value.length<8) {
		alert ("El email no es correcto.");
		return false;
	}
		else return true;
	return false;
}

function comprobaCodi(lg,textfield) {
	if (document.getElementById(textfield).value=="") {
		if (lg=="es") alert ("DESCARGA ESTA PELICULA\n\n- Clica en el link COMPRAR VIDEO");
			else alert ("DOWNLOAD VIDEO\n\n- A code is necessary to download this video.\n- Click in BuyVideo text link");
		return false;
	}
		else return true;
		
	return false;
}

var buttons = new Array();

function buttonHovers() {
	var elements = document.getElementsByTagName('input');
	var j = 0;
	for (var i5 = 0; i5 < elements.length; i5++) {
		if(elements[i5].type=='submit') {
			buttons[j] = elements[i5];
			++j;
		}
	}
	for (var i5 = 0; i5 < buttons.length; i5++) {
		buttons[i5].onmouseover = function() {this.className += "Hovered";}
		buttons[i5].onmouseout = function() {this.className = this.className.replace(/Hovered/g, "");}
	}
}
window.onload = buttonHovers;
