


/*Funcion para redimensionar imagenes automaticamente*/
function redimensionar(imagen)
{
	X=800;Y=1500;
	if ( imagen.width > X && imagen.height < Y ){
		imagen.height = ( X * imagen.height ) / imagen.width;imagen.width= X};    
		if (imagen.width < X && imagen.height > Y ){imagen.width = ( Y * (imagen.width) ) / imagen.height;imagen.height= Y};    

if ( imagen.width > X && imagen.height > Y ){
		if (imagen.width/imagen.height>=1){{imagen.height = ( X * imagen.height ) / imagen.width;imagen.width= X}}else {imagen.width = ( Y * (imagen.width) ) / imagen.height;imagen.height= Y}
	}
	
	
}


/*Funcion para saltos de página*/
function saltar(topic_id,posts_per_page)
{
	salto=document.getElementById('saltar'+topic_id).value;
	
	if(salto == false){alert("No puede ser vacio");}else{
	ini=(salto*posts_per_page)-posts_per_page;
	window.location="/"+ salto +"-tema"+topic_id+".html?start="+ini;
	
	
	}
	
}


/*Función para multicita*/

function insertar_cita(texto, poster)
{
	
	window.parent.document.forms['post'].message.value = window.parent.document.forms['post'].message.value + '[quote="'+poster+'"]'+texto+'[/quote]\n\n';
	window.parent.document.forms['post'].message.focus();
	
}

