
// JAVASCRIPT PARA EL CONTROL DE OJD DE PANORAMA-ACTUAL.ES


var url = document.location.href;

if (url.indexOf("seccion.pl?seccion=") > 0 ) 
{
	var er=new RegExp(/seccion\.pl\?seccion=(.*)/);
	var resul=url.match(er);

	if (resul != null)
	{
		//alert (resul[1]);
		var dir=resul[1].split('&');
		seccion = "Seccion " + dir[0].toLowerCase();
		descrip = "Seccion de información sobre "+ dir[0].toLowerCase();
	}
	else
	{
		seccion = "Seccion politica";
		descrip = "Seccion de información politica";
	}
}
else 
if (url.indexOf("masseccion.pl") > 0 ) 
{
	var er3=new RegExp(/masseccion\.pl\?codigo=\d\&paginacion=\d+\&seccion=(.*)/);
	var resul3=url.match(er3);

	if (resul3 != null)
	{
		//var dir=resul3[1].split('&');
		seccion = "Seccion " + resul3[1].toLowerCase();
		descrip = "Seccion de información sobre "+ resul3[1].toLowerCase();
	}
	else
	{
		seccion = "Seccion politica";
		descrip = "Seccion de información politica";
	}
}  
else 
if (url.indexOf("noticias/not") > 0 ) 
{
	seccion = "Noticias";
	descrip = "Noticias";
} 
else 
{
	// Expresion regular para desglosar una url
	// posicion 0 del vector -> cadena que hace match
	// posicion 1 del vector -> protocolo
	// posicion 2 del vector -> dominio
	// posicion 3 del vector -> directorio o fichero.

	var er1=new RegExp(/(\w+):\/\/([\w.-]+\/)(.*)\/*/);
	var resul1=url.match(er1);
	if (resul1 != null)
	{
		if (resul1[3] != "" )
		{
			// Por si es homepage pero el dominio acaba en default.pl
			er2=/^default\.pl.*/i;
			if (er2.test(resul1[3]))
			{
				seccion = "home";
				descrip = "homepage";
			}
			else
			{
				var direc=resul1[3].split('/');
				// Expresion regular para captar las secciones que nos interesan que esten remarcadas	
				if ( /(cine).*/i.test(direc[0]) || /(postales).*/i.test(direc[0]) || /(tiempo).*/i.test(direc[0]) || /(agenda).*/i.test(direc[0]) || /(opinion).*/i.test(direc[0]) )
				{			
					seccion = "servicios/" + direc[0].toLowerCase();
					descrip = "servicios/" + direc[0].toLowerCase();
				}
				else
				{			
					seccion = "servicios";
					descrip = "servicios";
				}
			}
		}	 
		else 
		{
			seccion = "home";
			descrip = "homepage";
		}
	}
	else 
	{
		seccion = "home";
		descrip = "homepage";
	}
}

// CODIGO JS PARA CONTROLAR LA VISITA
var IVW="http://panorama.ojdinteractiva.com/cgi-bin/ivw/CP/" + seccion + ";" + descrip;
document.write("<IMG SRC=../../Sociedad  La violencia doméstica es el segundo asunto en solicitudes del turno de oficio_archivos/""+IVW+"?r="+escape(document.referrer)+"\" WIDTH=\"1\" HEIGHT=\"1\">"); 

var fec=Date();
var an=fec.split(" ");
// CODIGO JS PARA COLOCAR EL PIE DE PAGINA EN TODA LA WEB
var contenido="";
contenido=contenido + '<table width="100%" border="0" cellpadding="0" cellspacing="0">'
contenido=contenido + '        <tr align="center"> '
contenido=contenido + '          <td colspan="5"> '
contenido=contenido + '            <div align="center"><font face="Arial, Helvetica, sans-serif" size="1"><font size=2>© '
contenido=contenido + '              Panorama Actual '+ an.pop()+ '. <a href="#" onclick=\'window.open("/pprivacidad.htm","privacidad","width=445,height=445,scrollbars=yes")\'>Política de privacidad</a>. Auditado por <a href="http://ojdinteractiva.ojd.es/home.php" target="_blank">OJDinteractiva</a>.<br>'
contenido=contenido + '              <b>Junio 2006: Más de 2.133.000 páginas vistas, 699.000 visitas y 251.000 usuarios únicos</b> <br>'
contenido=contenido + '            </font> Paseo de las Facultades, 6. VALENCIA (España). Tel: (+34) 902 52 01 02<br>R. M. de Valencia: libro 3122, tomo 5816, folio 218, hoja V-54867 <br>CIF: B-96631619</font></div>'
contenido=contenido + '          </td>'
contenido=contenido + '        </tr>'
contenido=contenido + '      </table>'
// Sec: ' + seccion + ' Des: ' + descrip + '  contenido=contenido + '      <script src="http://www.panorama-actual.es/googletrace.pl"></script>';

document.write(contenido);



