function JSObj_show_content()
{
	this.posId = 1;
	this.compId = 1;
	this.inputValorId = null;

	// Exporta la versión a PDF
	this.exportPdfVersion = function(sVerId) {
		var oAjax = new WBE_AjaxClass();
		var oW, sName;
		oAjax.clear();
		oAjax.addPostParameter("ver_id", sVerId);
		xmlObj = oAjax.throwEventXML("cms_pdf_export");
		if (xmlObj) {
			sName = oAjax.getXMLNodeValue(xmlObj, "n");
			if (sName!='') oW = window.open("/config/temp/" + sName, "", "");
		} else {
			alert('Funcionalidad no configurada en este proyecto.');
		}
	}
	
	//Guarda valoración del contenido
	//Sromero and Amangin 17 de marzo de 2008
	this.saveContentValoration = function(sVerId,inputName,intType) {
		this.inputValueName = document.getElementsByName(inputName);				
		var value=this.inputValue();
							
		var oAjax = new WBE_AjaxClass();
		oAjax.clear();	
		oAjax.addPostParameter('pos_id', this.posId);
		oAjax.addPostParameter('cnt_id', sVerId);
		oAjax.addPostParameter('cntval_type', intType);
		oAjax.addPostParameter('cntval_value', value);	
		this.preValoration();
		var xmlObj = oAjax.throwEventXML("cms_content_valoration_add");
		this.postValoration(xmlObj);
		
		//document.location.reload();
	}
	this.preValoration = function() {};
	this.postValoration = function(xmlObj){
		var oAjax = new WBE_AjaxClass();
		var sStatus = oAjax.getXMLNodeValue(xmlObj, "c");
		switch (sStatus) {
			case "OK":
				break;
			case "ERROR":
				alert('Se ha cometido un error inesperado valorando este contenido, por favor intentelo mas tarde.');
				break;
			default:
				alert(sStatus);
				break;
		}
	};
	this.inputValueName = null;
	this.inputValue =function () {
		var value;
		var type= this.inputValueName[0].type;
		switch (type) {
		case "select":
			value = this.inputValueName[0].options[this.inputValueName[0].selectedIndex].value;
			break;
		case "radio":
			for (var i=0;i<this.inputValueName.length;i++) {
				if(this.inputValueName[i].checked) value=this.inputValueName[i].value;
			}
			break;
		default:
			value=this.inputValueName[0].value;
		}
		return value;
	}
	//FIN VALORACION
}