﻿function votarcom(idc, idu, cid, p) {
	$.ajax({
		type: "POST",
		url: "/wsarticulo.asmx/VoteComment",
		data: "{id:" + idc + ", uid:" + idu + ", cid:'" + cid + "', p:" + p + "}",
		contentType: "application/json; charset=utf-8",
		dataType: "json",
		success: function(data, textStatus) {
			if (data.d.html != '') {
				$('#' + data.d.controlid).html(data.d.html);
			}
		},
		complete: function(XMLHttpRequest, textStatus) {
			//todo: hacer algo si hay un error			
		}
	});
}

function votarart(idc, cid, p) {
	$.ajax({
		type: "POST",
		url: "/wsarticulo.asmx/VotePost",
		data: "{id:" + idc + ", cid:'" + cid + "', p:" + p + "}",
		contentType: "application/json; charset=utf-8",
		dataType: "json",
		success: function(data, textStatus) {
			if (data.d.html != '') {
				$('#' + data.d.controlid).html(data.d.html);
			}
		},
		complete: function(XMLHttpRequest, textStatus) {
			//todo: hacer algo si hay un error			
		}
	});
}

function sc(hid, tid) {
	$('#' + hid).hide();
	$('#' + tid).show();
}

function gf() {
	var curFont = parseFloat($('body').css('font-size'));
	if (curFont > 100)
		curFont = 12;
	if (curFont < 17) {
		curFont += 1;
		$('body').css('font-size', curFont + 'px');
	}
}

function rf() {
	var curFont = parseFloat($('body').css('font-size'));
	if (curFont > 100)
		curFont = 12;	
	if (curFont > 8) {
		curFont -= 1;
		$('body').css('font-size', curFont + 'px');
	}
}

function sendfriend() {
    tb_show('Enviar a un amigo', '/dlgEnviarAmigo.html?KeepThis=true&TB_iframe=true&height=250&width=400', null);
}




