// JavaScript Document

function deshabilitaLinks(eldiv, destino, mensaje){
		p = document.getElementById(eldiv);
		links = p.getElementsByTagName( 'a' );
		for(x=0; x < links.length; x++ ){
			c = links[x];
			//c.href="javascript:alert('"+mensaje+"');location.href='"+destino+"'";
			c.href="javascript:goLink()";
			c.target = "_self";
		}
}

function goLink(){
	alert('No estás logueado a VIRTUALPRO, por favor Ingresa con tu usuario o suscribete Gratis!!');
	location.href='../main/registro';
}

function restore(e){
	if (!e) var e = window.event;
	imags = this.getElementsByTagName('img');
	for(i=0;i<imags.length;i++){
		if(origen = imags[i].getAttribute("origen")){
		imgs[i].src= origen;
		}else{}
	}
}

function cambiadesc(obj,numspan){
  var caja = obj.parentNode.parentNode;
  var divs = caja.getElementsByTagName('div');
  var div2 = divs[1];
  var labels = div2.getElementsByTagName('span');
  for(i=0;i<labels.length;i++){
	labels[i].style.display='none';
	if(i==numspan){labels[i].style.display='block';}
  }

	imgs = obj.getElementsByTagName('img');
	for(i=0;i<imgs.length;i++){
		imagen = imgs[i];
		if(origen = imgs[i].getAttribute("origen")){}else{
			obj.onmouseout = restore;
			imagen.setAttribute('origen',imagen.src);
		}
		imagen.src = imagen.src.replace(".gif","_r.gif");
	}
}

function emisora(){
  window.open('http://revistavirtualpro.com/emisora/index.php','emisora','width=730,height=800,status=no,directories=no,left=50,top=50,menubar=no,scrollbars=no,toolbar=no,resizable=no,location=no','true');
}