// JavaScript Document

function POPIMG(file, ancho, alto) {
	var ventana, txtBody;

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open('','ventana1','toolbar=no,location=no,directories=no,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	txtbody = "<HTML><HEAD><title>ON24</title></HEAD>";
	txtbody += "<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0' onBlur='self.close()'>";
	txtbody += "<a href='javascript:self.close()'><img src='upload/popContent/img/" + file + "' border='0' width='"+ancho+"' height='"+alto+"'></a>";
	txtbody += "</body></html>"

  ventana.document.write(txtbody);
  ventana.document.close();

	if(ventana.focus)
		ventana.focus();
}

function Favoritos () 
{
	if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
      var url="http://www.on24.com.ar/"; 
      var titulo="ON24.com.ar";
      window.external.AddFavorite(url,titulo);
   } else { 
      if(navigator.appName == "Netscape") 
         alert("Presione Crtl+D para agregar este sitio en sus Bookmarks"); 
   }

   /*if (navegador.ie5 || navegador.ie6 || navegador.ie4)  window.external.AddFavorite("http://www.rosario3.com","rosario3.com");
   else alert("Presione Ctrl+D para agregar este sitio en sus Favoritos");*/
} 

function POPSWF(file, ancho, alto) {
	var flash, txtBody;
	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	flash= window.open('','ventana2','toolbar=no,location=no,directories=no,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);
	txtbody= "<HTML><HEAD><title>ON24</title></HEAD>";
	txtbody+= "<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>";
	txtbody+= "<table width='100' border='0' cellspacing='0' cellpadding='0'><tr><td>";
	txtbody+= "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+ancho+"' height='"+alto+"'>";
	txtbody+= "<param name='movie' value='upload/popContent/swf/" + file + "'>";
	txtbody+= "<param name='quality' value='high'>";
	txtbody+= "<embed src='upload/popContent/swf/" + file + "' quality='high' pluginspage='http:\/\/www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ancho+"' height='"+alto+"'></embed></object>";
	txtbody+= "</td></tr></table></body></html>"

  	flash.document.write(txtbody);
  	flash.document.close();

	if(flash.focus)
		flash.focus();
}
function POPHTM(file, ancho, alto) {
	var ventana, txtBody;

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open(file,'ventana3','toolbar=no,location=no,directories=no,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPMP3(id) {
	var ventana, txtBody;
	
	file = "vista_audio.aspx?audio=" + id ;
	ancho = 315;
	alto = 85;
	

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open(file,'ventana4','toolbar=no,location=no,directories=no,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPFLV(id) {
	var ventana, txtBody;
	
	file = "vista_video.aspx?video=" + id ;
	ancho = 320;
	alto = 290;
	

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open(file,'ventana5','toolbar=no,location=no,directories=no,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPHTMSCROLL(file, ancho, alto) {
	var ventana, txtBody;

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open(file,'ventana6','toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPGRILLASCROLL(idfile) {
	var ventana, txtBody;
	
	ancho=500;
	alto=600;

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open('../noticias.aspx?idNot='+idfile,'ventana7','toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}


function POPHTMREPRODUCTOR(id, id2) {
	var ventana, txtBody;
	
	file = "reproductormp3.aspx?idNot=" + id + "&idHom=" + id2;
	ancho = 450;
	alto = 250;
	

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open(file,'ventana8','toolbar=no,location=no,directories=no,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPHTMREPRODUCTORVIDEO(id, id2) {
	var ventana, txtBody;
	
	file = "reproductorflv.aspx?idNot=" + id + "&idHom=" + id2;
	ancho = 450;
	alto = 450;
	

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open(file,'ventana9','toolbar=no,location=no,directories=no,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPGRILLASCROLLARC(idfile) {
	var ventana, txtBody;
	
	ancho=500;
	alto=600;

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open('../noticiasarc.aspx?idNot='+idfile,'ventana10','toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPARCHIVOS(idfile) {
	var ventana, txtBody;
	
	ancho=650;
	alto=600;

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open('archivosasociados.aspx?idNoticia='+idfile,'ventana11','toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPBUSCARARCHIVOS(idfile) {
	var ventana, txtBody;
	
	ancho=670;
	alto=600;

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open('buscararchivos.aspx','ventana12','toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function IRENCUESTA(id) {
	var ventana, txtBody, voto;

	voto=0;
	estado=false;
	ctrl=document.Form1.opcion;
	for(i=0;i<ctrl.length;i++) {
        if(ctrl[i].checked) {
			voto=ctrl[i].value;
			estado=true;			
		}
	}

	if (estado) {

	file = "votar.aspx?idEnc=" + id + "&campooculto=voto&opcion=" + voto;
	location.href = file;

	
	}
	else
	{
	alert("Para votar debe seleccionar una respuesta");	
	}

}

function VERRESULTADOS(id) {
	var ventana, txtBody;
	
	file = "encuestas.aspx?idEnc=" + id;
	location.href = file;

}

function POPMERCADOS(file, ancho, alto) {
	var ventana, txtBody;

	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open("../../archivos_PubON24/xls/"+file,'ventanam1','toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);
	
	
	if(ventana.focus){
		ventana.focus();
		
	}
}

function POPimprimir(id, ruta) {
	var ventana, txtBody;
	
	//file = ruta + "imprimir.aspx?idNot=" + id;
	file = "imprimir.aspx?idNot=" + id;
	ancho = 650;
	alto = 580;
	
	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open(file,'ventana1imprimir','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function POPmail(id, ruta) {
	var ventana, txtBody;
	
	//file = ruta + "mail.aspx?idNot=" + id;
	file = "mail.aspx?idNot=" + id;
	ancho = 350;
	alto = 350;
	
	var leftPos= (screen.width)?parseInt((screen.width-ancho)/2):100;
	var topPos= (screen.height)?parseInt((screen.height-alto)/2):100;

	ventana=window.open(file,'ventana1mail','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width='+ancho+',height='+alto+',top='+topPos+',left='+leftPos);

	if(ventana.focus)
		ventana.focus();
}

function AltoSlide() {
	var divHeight, alto, top;
	var obj = document.getElementById('table_slide');

	if(obj.offsetHeight) {divHeight=obj.offsetHeight;}
	else if(obj.style.pixelHeight){divHeight=obj.style.pixelHeight;}

	document.getElementById('_ctl0_Panel_Slide').style.height = divHeight;
}

function mostrar_play() {
	document.getElementById("play1").style.display='block';
	document.getElementById("play2").style.display='block';
	document.getElementById("play3").style.display='block';
			

	document.getElementById("pause1").style.display='none';
	document.getElementById("pause2").style.display='none';
	document.getElementById("pause3").style.display='none';
	
	
}

function mostrar_pausa() {
	document.getElementById("play1").style.display='none';
	document.getElementById("play2").style.display='none';
	document.getElementById("play3").style.display='none';

	
	document.getElementById("pause1").style.display='block';
	document.getElementById("pause2").style.display='block';
	document.getElementById("pause3").style.display='block';
	
}