// JavaScript Document
esjs = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
bVer = parseInt(navigator.appVersion);

function popup(loc, name, width, height) {
	var _params = "width="+width+",height="+height+",resizable=no,status=yes,scrollbars=no";

	// CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
	if (bVer >= 4) {
		 _left = ( (screen.width-width) >>1 );
		 _top = ( (screen.height-height) >>1 );
	} else {
		 _left = ( (800-width) >>1 );
		 _top = ( (600-height) >>1 );
	}

	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

	newWin = window.open(loc, name, _params);
	if ( newWin!=null && !(IE && bVer<5) )
		newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

function popupsc(loc, name, width, height) {
	var _params = "width="+width+",height="+height+",resizable=no,status=yes,scrollbars=yes";

	// CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
	if (bVer >= 4) {
		 _left = ( (screen.width-width) >>1 );
		 _top = ( (screen.height-height) >>1 );
	} else {
		 _left = ( (800-width) >>1 );
		 _top = ( (600-height) >>1 );
	}

	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

	newWin = window.open(loc, name, _params);
	if ( newWin!=null && !(IE && bVer<5) )
		newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

var newWin=null;

function buscar()
{
	document.forms[0].action='/archivo/index.php';
	document.forms[0].submit();
}
function muestra_historico(pag)
{
	document.forms[0].actual_page.value=pag;
	document.forms[0].action='/archivo/historicop.php';
	document.forms[0].submit();
}

function muestra_detalle(url)
{
	document.forms[0].action=url;
	document.forms[0].submit();
}

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter, isOpen)
{ //v3.0
	if(window.screen)if(isCenter)if(isCenter=="true"){
		var myLeft = (screen.width-myWidth)/2;
	    	var myTop = (screen.height-myHeight)/2;
    		features+=(features!='')?',':'';
	    	features+=',left='+myLeft+',top='+myTop;
	}
	window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
	//fuciones del clima
	function change_city()
	{
		if(document.forms[0].slc_ciudad.value=="-1")
		{
			document.forms[0].slc_ciudad.value=document.forms[0].slc_ciudad2.value;
		}
		document.forms[0].action='/clima/';
		document.forms[0].submit();
	}
	function ciudad()
	{
		document.forms[0].ciudad_escogida.value=document.forms[0].select_pron.options[document.forms[0].select_pron.selectedIndex].text;
	}
	function change(valor,puerto)
	{
		document.forms[0].action='tiempo.php';
		if ((puerto!='') && (document.forms[0].select_marea.type=='hidden'))
		{
			document.forms[0].select_marea.value=puerto;
		}
		document.forms[0].task.value=valor;
		document.forms[0].submit();
	}
	function open_window()
	{
		repsol=window.open('http://www.informaccion.com/infoclima/rpp/prueba/prueba_layer.php','myrepsol','menubar=no,resizable=no,status=no,toolbar=no,height=410,width=750,left=10,top=10');
	}

	//funciones de audios
	function change_audio()
	{
		document.forms[0].action=document.forms[0].select_audio.value + '.php';
		document.forms[0].submit();
	}

	//funciones encuesta

	function open_popup_encuesta(c_encuesta)
	{
		if (verf_ie()==1)
		{
			encuesta = window.showModalDialog('/encuesta/encuesta.php?c_encuesta='+c_encuesta,'null', 'dialogHeight:250px; dialogWidth:466px; resizable:no; status:no');
		}else{
			encuesta = window.open('/encuesta/encuesta.php?c_encuesta='+c_encuesta,'null','scrollbars=1,menubar=no,resizable=no,status=no,toolbar=no,height=250,width=475,left=10,top=10');
		}
	}


	function registro()
	{
		if (verf_ie()==1)
		{
			encuesta = window.showModalDialog('/registro/wp_registro.php','null', 'dialogHeight:600px; dialogWidth:500px; resizable:no; status:no;');
		}else{
			encuesta = window.open('/registro/wp_registro.php','null','scrollbars=0,menubar=no,resizable=no,status=no,toolbar=no,height=450,width=500 left=100,top=20');
		}
	}


	function votar(c_encuesta,valor,b_abierto)
	{
		if (b_abierto==1)
		{
			if (c_encuesta!='')
			{
				if (verf_ie()==1)
				{
					encuesta = window.showModalDialog('/encuesta/encuesta.php?c_encuesta='+c_encuesta+'&task=actualiza_encuesta&c_opciones='+valor,'null', 'dialogHeight:350px; dialogWidth:466px; resizable:no; status:no;');
				}else{
					encuesta = window.open('/encuesta/encuesta.php?c_encuesta='+c_encuesta+'&task=actualiza_encuesta&c_opciones='+valor,'null','scrollbars=1,menubar=no,resizable=no,status=no,toolbar=no,height=250,width=475,left=10,top=10');
				}
			}else{
				document.forms[0].task.value='actualiza_encuesta';
				document.forms[0].submit();
			}
		}else{
			valor_cookie=getCookie("Lc_usuario_online");
	//		alert(valor_cookie);
			if(valor_cookie==null || valor_cookie=='')
			{
				document.forms[0].action="/registro/login.php";
				document.forms[0].b_abierto.value=b_abierto;
				document.forms[0].tipo_llegada.value='encuesta';
				document.forms[0].submit();
			}else{
				if (c_encuesta!='')
				{
					if (verf_ie()==1)
					{
						encuesta = window.showModalDialog('/encuesta/encuesta.php?c_encuesta='+c_encuesta+'&task=actualiza_encuesta&c_opciones='+valor,'null', 'dialogHeight:350px; dialogWidth:466px; resizable:no; status:no;');
					}else{
						encuesta = window.open('/encuesta/encuesta.php?c_encuesta='+c_encuesta+'&task=actualiza_encuesta&c_opciones='+valor,'null','scrollbars=1,menubar=no,resizable=no,status=no,toolbar=no,height=250,width=475,left=10,top=10');
					}
				}else{
					document.forms[0].task.value='actualiza_encuesta';
					document.forms[0].submit();
				}
			}
		}
	}

	function ver_resultados(c_encuesta)
	{
		if (c_encuesta!='')
		{
			if (verf_ie()==1)
			{
				encuesta = window.showModalDialog('/encuesta/encuesta.php?c_encuesta='+c_encuesta+'&task=resultados','null', 'dialogHeight:350px; dialogWidth:466px; resizable:no; status:no');
			}else{
				encuesta = window.open('/encuesta/encuesta.php?c_encuesta='+c_encuesta+'&task=resultados','null','scrollbars=1,menubar=no,resizable=no,status=no,toolbar=no,height=250,width=475,left=10,top=10');
			}
		}else{
			document.forms[0].task.value='resultados';
			document.forms[0].submit();
		}
	}

	function cerrar()
	{
		window.returnValue='2';
		window.close();
	}

	function resizeDialogToContent()
	{
		// resize window so there are no scrollbars visible
		var dw = window.dialogWidth;
		while (isNaN(dw))
		{
		  dw = dw.substr(0,dw.length-1);
		}
		difw = dw - this.document.body.clientWidth;
		window.dialogWidth = this.document.body.scrollWidth+difw+'px';

		var dh = window.dialogHeight;
		while (isNaN(dh))
		{
		  dh = dh.substr(0,dh.length-1);
		}
		difh = dh - this.document.body.clientHeight;
		window.dialogHeight = this.document.body.scrollHeight+difh+'px';
	}

	function verf_ie()
	{
		this.ver=navigator.appVersion;
		this.agent=navigator.userAgent;
		this.dom=document.getElementById?1:0;
		this.opera=window.opera?1:0;
		this.ie55=(this.ver.indexOf("MSIE 5.5")>-1&&this.dom&&!this.opera)?1:0;
		this.ie5=(this.ver.indexOf("MSIE 5")>-1&&this.dom&&!this.ie55&&!this.opera)?1:0;
		this.ie6=(this.ver.indexOf("MSIE 6")>-1&&this.dom&&!this.opera)?1:0;
		this.ie7=(this.ver.indexOf("MSIE 7")>-1&&this.dom&&!this.opera)?1:0;
		this.ie4=(document.all&&!this.dom&&!this.opera)?1:0;
		this.ie=this.ie4||this.ie5||this.ie6||this.ie7;
		return this.ie;

	}
	function refresca_padre(url)
	{
		window.opener.location.href=url;
	}


	///contactenos
	function contactenos_envia()
	{
		ok=0;
		if (document.forms[0].d_nombre.value=='')
		{
			ok=1;
		}
		if (document.forms[0].d_apellido.value=='')
		{
			ok=1;
		}
		if (document.forms[0].d_telefono.value=='')
		{
			ok=1;
		}
		if (document.forms[0].d_dni.value=='')
		{
			ok=1;
		}
		if (document.forms[0].d_email.value=='')
		{
			ok=1;
		}else{
			if (verf_mail('d_email')==false)
			{
				ok=1;
			}
		}
		if (document.forms[0].t_contactenos.value=='')
		{
			ok=1;
		}
		if (trim(document.forms[0].r_PAIS.value)=='ESCOGER')
		{
			ok=1;
		}else{
			if (trim(document.forms[0].r_PAIS.value) != "PE")
			 {
				  // VALIDACI&Oacute;N DEL CAMPO CIUDAD
				  if (trim(document.forms[0].r_CIUDAD.value) == "")
				   {
					ok=1;
					document.forms[0].r_CIUDAD.focus();
				   }

				  // VALIDACI&Oacute;N DEL CAMPO ESTADO
				  if (trim(document.forms[0].r_ESTADO.value) == "")
				   {
					ok=1;
					document.forms[0].r_ESTADO.focus();
				   }

				  // VALIDACI&Oacute;N DEL CAMPO ESTADO
				  if (trim(document.forms[0].r_CODPOSTAL.value) == "")
				   {
					ok=1;
					document.forms[0].r_CODPOSTAL.focus();
				   }
			} else {
				if(document.forms[0].sastate.selectedIndex == 0)
				{
						ok=1;
				}
				if(document.forms[0].sacity.selectedIndex == 0)
				{
						ok=1;
				}
				if(document.forms[0].sazipc.selectedIndex == 0)
				{
						ok=1;
				}
			}
		}
		if (ok==0)
		{
			if (trim(document.forms[0].r_PAIS.value) == "PE")
			{
				document.forms[0].r_UBIGEO.value = document.forms[0].sazipc.value;
				document.forms[0].r_CIUDAD.value = "";
				document.forms[0].r_ESTADO.value = "";
				document.forms[0].r_CODPOSTAL.value = "";
				document.forms[0].pais_long.value = document.forms[0].r_PAIS.options[document.forms[0].r_PAIS.selectedIndex].text;
				document.forms[0].dep.value = document.forms[0].sastate.options[document.forms[0].sastate.selectedIndex].text;
				document.forms[0].prov.value = document.forms[0].sacity.options[document.forms[0].sacity.selectedIndex].text;
				document.forms[0].dist.value = document.forms[0].sazipc.options[document.forms[0].sazipc.selectedIndex].text;
			}
			else
			{
				document.forms[0].r_UBIGEO.value = "";
			}
			document.forms[0].target="_self";
			document.forms[0].task.value='grabar';
			document.forms[0].submit();
		}else{
			alert("Ingrese todos los campos porfavor");
		}
	}
function only_num(nombre)
{
	regexp=/^[0-9]+$/
	elemento=document.getElementById(nombre);
	if (elemento.value.match(regexp)==null)
	{
		elemento.value=elemento.value.substr(0,elemento.value.length-1);
	}
}
function verf_mail(nombre)
{
	var regEmail = /^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$/;
	Email=document.getElementById(nombre).value;
	return regEmail.test (Email);
}
function contactenos()
{
	document.forms[0].target="_self";
	document.forms[0].url_viaje.value=document.location;
	document.forms[0].action="/contactenos/";
	document.forms[0].submit();
}
function verf_nick()
{
	document.forms[0].register.value='1';
	document.forms[0].submit();
}

function getCookie(name){
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length > 0) {
    begin = dc.indexOf(cname);
    if (begin != -1) {
      begin += cname.length;
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    }
  }
  return null;
}
function go_foro(site)
{
		if(document.forms[0].en_linea_alt.value==1)
		{
			document.forms[0].target="_blank";
			document.forms[0].action="/foros/foro.php";
			document.forms[0].site.value=site;
			/*document.forms[0].bn.value=bn;
			document.forms[0].b_abierto.value=b_abierto;*/
		}
		else
		{
			document.forms[0].url_viaje.value='/foros/foro.php';
			document.forms[0].site.value=site;
			document.forms[0].action="/registro/cluboyentes.php";
		}
		document.forms[0].submit();
}


function valida_login()
{
	document.forms[0].action = 'login.php';
	document.forms[0].task.value = 'verf_datos_usuario';
	document.forms[0].submit();
}

function continuar()
{
	if(document.forms[0].tipo_llegada.value=='foro')
	{
		document.forms[0].action = '/';
		document.forms[0].target='_blank';
	}
	if(document.forms[0].tipo_llegada.value=='encuesta')
	{
		document.forms[0].action = document.forms[0].ruta_seccion_llegada.value;
		document.forms[0].target='_self';
	}
	document.forms[0].submit();
}

function regresar()
{
	document.forms[0].status_login.value='IDU';
	document.forms[0].task.value='';
	document.forms[0].submit();
}

function iframe_rezize_auto(iframe)
{
	iframeobj=document.getElementById(iframe);
	iframeobj.height=iframeobj.contentWindow.document.body.scrollHeight;
}
function envia_mail()
{
	if (verf_mail('d_correo_to')==true)
	{
		if (document.forms[0].d_nombre.value!='')
		{
			if (document.forms[0].d_msg.value!='')
			{
				if (document.forms[0].copia.checked==true && verf_mail('d_correo_from')==false)
				{
					alert('Si desea recibir una copia porfavor ingrese su correo');
				}else{
					document.forms[0].do_send.value=1;
					document.forms[0].target='_self';
					document.forms[0].submit();
				}
			}else{
				alert('Ingrese un mensaje');
			}
		}else{
			alert('Ingrese su nombre porfavor')
		}
	}else{
		alert('Uno de los correos no es valido porfavor verifique');
	}
}
//funcion de reloj basada en la hora del usuario - se escribe en una caja de texto llamada time
function clock() {
	var t = new Date();
	var h = t.getHours();
	var m = t.getMinutes();
	var s = t.getSeconds();
	var hours = t.getHours();
	var min = t.getMinutes();
	var sec = t.getSeconds();
	var status = "AM";
	if (hours > 11)
	status = "PM";
	if (hours > 12)
	hours -= 12;
	if (hours == 0)
	hours = 12;
	if (min < 10)
	min = "0" + min;
	if (sec < 10)
	sec = "0" + sec;
	document.forms[0].time.value = hours + ":" + min + ":" + sec + " " + status;
	window.setTimeout("clock()", 900);
}
function ltrim(str)
{
 while(""+str.charAt(0)==" ")
  {  str=str.substring(1,str.length); }
 return str;
}
function reverse(str)
{ var reversedstr = "";
 var strArray;
 strArray = str.split("");
 for(var i = str.length -1 ; i >= 0 ; i--)
  {  reversedstr += strArray[i];  }
 return reversedstr;
}
function trim(str)
{
 str = ltrim(str);
 str = reverse(str);
 str = ltrim(str);
 str = reverse(str);
 return str;
}
function _Chatear()
{
	/*var loc;
	loc = "/chat/test.php?nickname="+
	//popupsc(loc, 'chat', 640, 400);
	alert(loc);*/
	nick=document.forms[0].nickname.value;
	OpenBrWindow('/chat/test.php?nickname='+nick,'chat','', 660, 420, '', '');
}

function keep_alive_results(c_encuesta)
{
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
		}
	}
   	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
   		xmlhttp = new XMLHttpRequest();
   	}
	try
	{
    	xmlhttp.open("GET", "/encuesta/votos.php?c_encuesta="+c_encuesta,true);
    	xmlhttp.onreadystatechange=function() {
     		if (xmlhttp.readyState==4) {
				if(xmlhttp.responseText.length<10)
				{
	     			resultado_encuesta=document.getElementById("result_votos_enc");
    	 			if(verf_ie()==1)
					{
						resultado_encuesta.innerText=xmlhttp.responseText;
					}else{
						resultado_encuesta.innerHTML=xmlhttp.responseText;
					}
				}
//      			alert(xmlhttp.responseText)
     		}
    	}
    	xmlhttp.send(null);
	}
	catch(ee)
	{
//	    alert(ee);
	}
}
//--------------------------------------------------------------------------------------------------
var myform;
var fileWnd = '';
var myDom;
function carga1(t_path,t_file)
{
	myform=document.createElement('form');
	myform.name="formfile";
	myform.id="formfile";
	myform.method="POST";
	myform.target="_top";
	myform.action="descargas.php";
	myinput=document.createElement('input');
	myinput.name='t_path';
	myinput.value=t_path;
	myinput_file=document.createElement('input');
	myinput_file.name='t_file';
	myinput_file.value=t_file;
	myform.appendChild(myinput);
	myform.appendChild(myinput_file);
	return true;
}

function carga2()
{
	fileWnd =window.open('/test.htm','File Download');
	return true;
}

function carga3 ()
{
	myDom=fileWnd.document;
	myDom.body.appendChild(myform);
	myDom.forms[0].submit();
	return true;
}

function get_file(t_path,t_file)
{
//	carga1(t_path,t_file);
//	carga2();
//	carga3();
	myform=document.createElement('form');
	myform.name="formfile";
	myform.id="formfile";
	myform.method="POST";
	myform.target="_top";
	myform.action="/descargas.php";
	myinput=document.createElement('input');
	myinput.name='t_path';
	myinput.value=t_path;
	myinput_file=document.createElement('input');
	myinput_file.name='t_file';
	myinput_file.value=t_file;
	myform.appendChild(myinput);
	myform.appendChild(myinput_file);
	mydiv=document.createElement("div");
	mydiv.id="tempDiv";
	mydiv.style.visibility='hidden';
	mydiv.appendChild(myform);
	document.body.appendChild(mydiv);
	mydiv2 = document.getElementById("tempDiv");
	//alert(mydiv2.id);
	myform2 = document.getElementById("formfile");
	myform2.submit();
	document.body.removeChild(mydiv2);
	return true;
}

function load_cat(c_categoria_valor)
{
	document.forms[0].taskm.value='detalle_categoria';
	document.forms[0].c_categoria.value=c_categoria_valor;
	document.forms[0].submit();
}

function load_subcat(c_subcategoria_valor,c_categoria_valor)
{
	document.forms[0].taskm.value='detalle_subcategoria';
	document.forms[0].c_categoria.value=c_categoria_valor;
	document.forms[0].c_subcategoria.value=c_subcategoria_valor;
	document.forms[0].submit();
}
function load_album(c_album_valor,c_subcategoria_valor,c_categoria_valor)
{
	document.forms[0].taskm.value='detalle_album';
	document.forms[0].c_categoria.value=c_categoria_valor;
	document.forms[0].c_subcategoria.value=c_subcategoria_valor;
	document.forms[0].c_album.value=c_album_valor;
	document.forms[0].submit();
}
function load_catalogo(i_objeto_valor,c_album_valor,c_subcategoria_valor,c_categoria_valor)
{
	document.forms[0].taskm.value='detalle_catalogo';
	document.forms[0].c_categoria.value=c_categoria_valor;
	document.forms[0].c_subcategoria.value=c_subcategoria_valor;
	document.forms[0].c_album.value=c_album_valor;
	document.forms[0].i_objeto.value=i_objeto_valor;
	document.forms[0].submit();
}
function load_elemento(c_elemento_valor,i_objeto_valor,c_album_valor,c_subcategoria_valor,c_categoria_valor)
{
	document.forms[0].taskm.value='detalle_elemento';
	document.forms[0].c_categoria.value=c_categoria_valor;
	document.forms[0].c_subcategoria.value=c_subcategoria_valor;
	document.forms[0].c_album.value=c_album_valor;
	document.forms[0].i_objeto.value=i_objeto_valor;
	document.forms[0].c_elemento.value=c_elemento_valor;
	document.forms[0].submit();
}
function descarga_archivo(c_elemento_valor)
{
	document.forms[0].taskm.value='descarga_elemento';
	document.forms[0].c_elemento.value=c_elemento_valor;
	document.forms[0].submit();
}
function go_pag_mult(pagina_valor)
{
	document.forms[0].pagina.value=pagina_valor;
	document.forms[0].submit();
}
//----************************************Funciones Players General***********************************----//
function makeActive(pDiv)
{
	makeInactive('Noticias');
	makeInactive('Vistos');
	makeInactive('Recomendados');
	vDiv = document.getElementById(pDiv);
	vDiv.style.visibility = "visible";
	vDiv.style.width = "390";
	vDiv.style.height = "300";
	vTD = document.getElementById('hover'+pDiv);
	//vTD.className = "player";
	vImg = vTD.firstChild;
	vImg.src = "../../imagenes/audioteca/bot_"+pDiv+"on.gif"
	return true;
}

function makeInactive(pDiv)
{
	vDiv = document.getElementById(pDiv);
	vDiv.style.visibility = "hidden";
	vDiv.style.width = "1";
	vDiv.style.height = "1";
	vTD = document.getElementById('hover'+pDiv);
	//vTD.className = "player_inactivo";
	vImg = vTD.firstChild;
	vImg.src = "../../imagenes/audioteca/bot_"+pDiv+"off.gif"
	return true;
}
function CallMute()
{
	vMediaPlayer = document.getElementById("MediaPlayer");
	vMuteImg = document.getElementById("Mute");
	if (vMediaPlayer.Mute == true)
	{
		vMediaPlayer.Mute = false;
		vMuteImg.src="/imagenes/audioteca/bot_07_off.gif";
	}
	else
	{
		vMediaPlayer.Mute = true;
		vMuteImg.src="/imagenes/audioteca/bot_07_on.gif";
	}
}
function volumen(numero)
{
	vMediaPlayer = document.getElementById("MediaPlayer");
	vMediaPlayer.volume =  numero*200 - 1200;
	for (i=2; i<8; i++)
	{
		vVolControl = document.getElementById("Vol"+i);
		if (numero+1<i)
		{
			vVolControl.src = "/imagenes/audioteca/vol_0"+i+"_off.gif";
		}
		else
		{
			vVolControl.src = "/imagenes/audioteca/vol_0"+i+"_on.gif";
		}
	}
}
//----************************************Funciones Audios***********************************----//
function playAudio()
{
	wmplayer = document.getElementById('MediaPlayer');
	wmplayer.play();
}

function stopAudio()
{
	wmplayer = document.getElementById('MediaPlayer');
	wmplayer.stop();
}
//----************************************Funciones Audiotecas***********************************----//
function lista_audioteca(pAudioteca,pPagina)
{
	vForm = document.forms[0];
	vInput = document.createElement('INPUT');
	vInput.type = 'hidden';
	vInput.name = 'c_seccion';
	vInput.value = pAudioteca;
	vForm.appendChild(vInput);

	vInput = document.createElement('INPUT');
	vInput.type = 'hidden';
	vInput.name = 'currPag';
	vInput.value = pPagina-1;
	vForm.appendChild(vInput);

	vForm.action = 'audioteca_todos.php';
	vForm.method = 'post';
	vForm.target = '_self';
	vForm.submit();
}

function playAudioAudioteca(pAudioteca)
{
	vForm = document.forms[0];
	vInput = document.createElement('INPUT');
	vInput.type = 'hidden';
	vInput.name = 'c_audio';
	vInput.value = pAudioteca;
	vForm.appendChild(vInput);

	vForm.method = 'post';
	vForm.target = '_self';
	vForm.submit();
}

function playAudioteca()
{
	wmplayer = document.getElementById('MediaPlayer');
	wmplayer.play();
}

function stopAudioteca()
{
	wmplayer = document.getElementById('MediaPlayer');
	wmplayer.stop();
}
/***************************************Funciones Envio**********************************/
function send_element()
{
	document.forms[0].action="genera_envio.php";
	document.forms[0].submit();
}