// JavaScript Document//Funcion ejecutada al cargar el documento
function vj_onCarga() {
	try{
		document.forms.flogin.origen.value = window.location;
	} catch(e) {
		/*Aqui no paso nada
		Tu crees que aqui paso algo?
		Retipelo y quedarás muerto
		Capichi???*/
	}
}
//Estrellas
vjstT = Array(6);
vjstV = "";
vjstB = true;
function vj_starsOut() {
	for(i=1;i<6;i++) document.getElementById("vjst"+i).src = vjstT[i];
	document.getElementById("htvjstarstext").innerHTML = vjstV;
}
function vj_starsOver(vjxx) {
	if(vjstB) {
		for(i=1;i<6;i++) vjstT[i] = document.getElementById("vjst"+i).src;
		vjstV = document.getElementById("htvjstarstext").innerHTML;
		vjstB = false;
	}
	vjcc = 1;
	for(i=1;i<=vjxx;i++,vjcc++) document.getElementById("vjst"+vjcc).src = "http://cecytej13.com/img/star.png";
	for(i=1;i<=(5-vjxx);i++,vjcc++) document.getElementById("vjst"+vjcc).src = "http://cecytej13.com/img/star2.png";
	voto = Array("X","Chafota","Aburrido","Tienen que verlo","Esta chido","Wow, excelente");
	document.getElementById("htvjstarstext").innerHTML = voto[vjxx];
}
//Abrir un popup
function vj_popup(vjurl,vjan,vjal) {
	vjventana = window.open(vjurl,"vjpop","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width="+vjan+", height="+vjal+", top=150, left=200");
}
//Letras disponibles
function vj_charDispon(vjvalor,vjmax) {
	temp = "temporal";
	if(vjvalor.length<=vjmax) temp = "("+(vjmax-vjvalor.length)+" car&aacute;cteres disponibles)";
	else temp = "(Elimina "+(vjvalor.length-vjmax)+" car&aacute;cteres o muere)";
	document.getElementById('disponibles').innerHTML = temp;
}
//Ocultar/Mostrar
function vj_mosOcu(iden1,iden2) {
	div = document.getElementById(iden1);
	span = document.getElementById(iden2);
	if(div.style.display=='none') {
		div.style.display = '';
		span.innerHTML = "▼";
	} else {
		div.style.display ='none';
		span.innerHTML = "►";
	}
}
//Enfocar inicio sesion
function vj_focusLogin() {
	document.forms.flogin.bob.focus();
}
document.body.onLoad = vj_onCarga();