	function validaMC(){
		tipoMC=document.formaMC.nombreCategoria.value;
		//window.alert("ENTRA A VALIDAMC" + tipoMC);
		if (tipoMC=="Medico") //medico

		{
			//window.alert("ES UN MEDICO");			
			return  valida_modificarcliente(document.formaMC.par_nombremedico.value, document.formaMC.par_especialidadesmedico.value, document.formaMC.par_direccionmedico.value, document.formaMC.par_texto1medico.value, document.formaMC.par_hospitalesmedico.value, document.formaMC.par_aseguradorasmedico.value, 'nombre del medico', 'de especialidades de medico', 'de direccion de medico', 'de curriculum de medico', 'de hospitales de medico', 'de aseguradoras de medico');
		}
		else if(tipoMC=="Institucion") //institucion
		{
			return  valida_modificarcliente2(document.formaMC.par_nombreinstitucion.value, document.formaMC.par_direccioninstitucion.value, document.formaMC.par_texto1institucion.value, document.formaMC.par_especialidadesinstitucion.value, document.formaMC.par_aseguradorasinstitucion.value, document.formaMC.par_texto2institucion.value, 'de nombre de institucion', 'de direccion de institucion', 'de descripcin general de institucion', 'de especialidades de institucion', 'de aseguradoras de institucion', 'de equipo medico de institucion');
		}
		else if(tipoMC=="Producto")//producto
		{
			return  valida_modificarcliente3(document.formaMC.par_nombreproducto.value, document.formaMC.par_especialidadesproducto.value, document.formaMC.par_direccionproducto.value, document.formaMC.par_texto1producto.value, document.formaMC.par_texto2producto.value, document.formaMC.par_aseguradorasproducto.value, 'de nombre del producto', 'de especialidades del producto', 'de direccion del producto', 'de descripcion general del producto', 'de promocion del producto', 'de aseguradoras del producto');
		}
		else if(tipoMC=="Servicio")//servicio
		{
			return valida_modificarcliente4(document.formaMC.par_nombreservicio.value, document.formaMC.par_especialidadesservicio.value, document.formaMC.par_texto1servicio.value, document.formaMC.par_texto2servicio.value, document.formaMC.par_texto3servicio.value, document.formaMC.par_direccionservicio.value, document.formaMC.par_aseguradorasservicio.value, 'de nombre del servicio', 'de especialidades del servicio', 'de descripcion general del servicio', 'de certificaciones del servicio', 'de asociaciones del servicio', 'de direccion del servicio', 'de aseguradoras del servicio');
		}
	
	}
	
	function hacerSubmitMC(){
		document.formaMC.submit();
	}
	
	function regresarMC(){
		document.formaMC.action="iniciocliente.php"
		document.formaMC.submit();
	}
	


	function hacerSubmitCPW(){
		
		{
			document.formaPrincipal.submit();
		}
	}
	
	function regresarCPW(){
		document.formaPrincipal.action="iniciocliente.php"
		document.formaPrincipal.submit();
	}


		var objXCAL;
		var opcCAL;
		
		function loadingCAL(){
			try{
				objXCAL=GetXmlHttpObject();
				cargarEstadoCAL();
			}
			catch(err){}
		}
		
		
		function cargarEstadoCAL(mes, anio, dia){
//			try{

				cal=1;
				objXCAL=GetXmlHttpObject();		
				enviar(objXCAL,"calendariomes.php?fecha="+mes+"-"+anio+"-"+dia);
			//}
//			catch(err){
	//			window.alert("ERROR");
		//	}
		}
		



	
	function mostrarPublicacionCAL(id){
						
		myRef = window.open("vistasinactivacion.php?id_publicacion="+id,'mywin','left=20,top=20,width=550,height=500,toolbar=1,resizable=1,scrollbars=1');		
	}


var idsPC=new Array('datosInterno','datosExterno');

function datosEventoPC(){
	if(document.getElementById('par_tipo').options[document.getElementById('par_tipo').selectedIndex].text=="Evento"){
		showdivPC('datosEvento');
	}
	else{
		hidedivPC('datosEvento');
	}
}

function switchidPC(id){	
	hideallidsPC();
	showdivPC(id);
}

function hideallidsPC(){
	for (var i=0;i<idsPC.length;i++){
		hidedivPC(idsPC[i]);
	}		  
}

function hidedivPC(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdivPC(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6

		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}



	function mostrarPublicacionMA(id){
		myRef = window.open("vistasinactivacion.php?id_publicacion="+id,'mywin','left=20,top=20,width=550,height=500,toolbar=1,resizable=1,scrollbars=1');		
	}

	function mostrarMedicinaMEC(id){

		myRef = window.open("vistamedicina.php?id_medicina="+id,'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');		
	}


	function mostrarPublicacionAC(id){
		myRef = window.open("vistasinactivacion.php?id_publicacion="+id,'mywin','left=20,top=20,width=550,height=500,toolbar=1,resizable=1,scrollbars=1');		
	}
	
	function mostrarRecomendacion(id){
		myRef = window.open("recomienda.php?id_cliente="+id,'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');		
	}	

	function mostrarContacto(id){
		myRef = window.open("contactocliente.php?id_cliente="+id,'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');		
	}	