
//FUNCIONES PARA EL COTIZADOR
	function muestraPrecio(nombre,precio,idElemento){
		/*mensaje= nombre + ' <b>$' + precio + '</b>' ;
		if(document.getElementById)
			document.getElementById(idElemento).innerHTML = mensaje ;*/
		return;
	}
	function ocultaPrecio(idElemento){
		/*if(document.getElementById)
			document.getElementById(idElemento).innerHTML = ' ' ;*/
		return;
	}
	
	function granTotal(total,idElemento){
		if(document.getElementById)
			document.getElementById(idElemento).innerHTML = formatCurrency(total);
			//document.forms['contacto'].elements['precio1'].value =  formatCurrency(total);
		return;
	}
	
	function modelo(modelo,prefijo,idElemento){
		if(document.getElementById){
			//modelo arriba
			document.getElementById(idElemento).innerHTML = modelo;
			//modelo en el formulario
			//document.getElementById(idElemento+'1').innerHTML = modelo;
			//value del formulario
			//document.forms['contacto'].elements[idElemento+'2'].value = prefijo;//+' '+modelo;
		}
		return;
	}
	
	//function listaPress(){
		//var nAccesorios=25;	
		//var textArea=document.forms['contacto'].elements['comentarios'];
		 //si no se encuentra el texto en el textArea lo metemos
		// textArea.value=""; 
		 //for(var i=0; i<=nAccesorios; i++){
		    //if(document.getElementById('C'+i)!=null && document.getElementById('C'+ i+'txt')!=null)
		 	// if(document.getElementById('C'+i).checked){
				//  textArea.value+= document.getElementById('C'+ i + 'txt').innerHTML;
			 	//  textArea.value += ", ";
				//}
		
		// }
		// textArea.value=textArea.value.substr(0, (textArea.value.length)-2);
		 //textArea.value+='.';
		//}

//FORMATO DE NUMERO
function formatCurrency(num) {
	num = num.toString().replace(/\$|\,/g,'');
	if(isNaN(num)) 
		num = "0";
	cents = Math.floor((num*100+0.5)%100);
	num = Math.floor((num*100+0.5)/100).toString();
	if(cents < 10) 
		cents = "0" + cents;
	for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		num = num.substring(0,num.length-(4*i+3))+','+num.substring(num.length-(4*i+3));
	return (num + '.' + cents);
}