

page = new Array
(
"anecdotario_1.html",
"anecdotario_2.html"
)

pageCount = page.length - 1

thisPage = 0

// set up function to call next page

function nextPage(){
	num_pagina()
	if (thisPage < pageCount) {
		thisPage++
		parent.document.location.href=(page[thisPage])
	}
}

// set up function to call previous page

function previousPage(){
	num_pagina()
	if (thisPage > 0){
		thisPage--
		parent.document.location.href=(page[thisPage])
	}
}

function num_pagina(){
	url = document.location.href ;
	partes = url.split('/');
	
	url = partes[partes.length-1];
	partes = url.split('.');

	
	url = partes[partes.length-2];
	partes = url.split('_');
	thisPage = partes[partes.length-1];
	thisPage--;

	}
	
num_pagina()
thisPage++