
/////////////////////////////////////////CONTENIDO
mostrar_contenido = function(pagina){
		new Request.HTML({
			url: 'Pages/'+pagina+'.php',
			method: 'post', 
			//data: $('formulario'),
			onRequest: function(){
			 $('contenido_raraz').set('html', '<center><img src=\"mootools/loading.gif\" width=\"120px\" height=\"19px\" /><br>Cargando...</center>');
			},
			onComplete: function(){
				//alert('Request Terminado');
			},
			onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
				//alert(pagina);
				
				if (pagina=='acesos'){
					$('contenido_raraz').set('html',responseHTML);
					CargarSlider();}
				else{cargarCont(pagina)}
			},
			onFailure: function(xhr){
				$('contenido_raraz').set('html', 'Sin informacion disponible.');			
			}
		}).send();
}


cargarCont = function(pagina){
		new Request.HTML({
			url: 'Pages/cont.php',
			method: 'post', 
			//data: $('formulario'),
			onRequest: function(){
			 $('contenido_raraz').set('html', '<center><img src=\"mootools/loading.gif\" width=\"120px\" height=\"19px\" /><br>Cargando...</center>');
			},
			onComplete: function(){
				//alert('Request Terminado');
			},
			onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
				//alert(pagina);
				$('contenido_raraz').set('html',responseHTML);
				mostrarAcces2();
				mostrarPage(pagina);
			},
			onFailure: function(xhr){
				$('contenido_raraz').set('html', 'Sin informacion disponible.');			
			}
		}).send();
}

mostrarAcces2 = function(pagina){
		new Request.HTML({
			url: 'Pages/acesos2.php',
			method: 'post', 
			//data: $('formulario'),
			onRequest: function(){
			 $('acceso2_raraz').set('html', '<center><img src=\"mootools/loading.gif\" width=\"120px\" height=\"19px\" /><br>Cargando...</center>');
			},
			onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
				//alert(pagina);
				$('acceso2_raraz').set('html',responseHTML);
			},
		}).send();
}

mostrarPage = function(pagina){
			new Request.HTML({
			url: 'Pages/'+pagina+'.php',
			method: 'post', 
			data: $('form1'),
			onRequest: function(){
			 $('contenido2_raraz').set('html', '<center><img src=\"mootools/loading.gif\" width=\"120px\" height=\"19px\" /><br>Cargando...</center>');
			},
			onComplete: function(){
				//alert('Request Terminado');
			},
			onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
				//alert(pagina);
				$('contenido2_raraz').set('html',responseHTML);
				if (pagina=='destinos'){DestinoVar('01');}
				if (pagina=='agencias'){DestinoVar('06');}
				if (pagina=='cargo'){DestinoVar('09');}
				if (pagina=='turismo'){DestinoVar('12');}
				if (pagina=='tour'){DestinoVar('12');}
			},
			onFailure: function(xhr){
				$('contenido2_raraz').set('html', 'Sin informacion disponible.');			
			}
			}).send();
}



mostrarServicio = function(pagina){
		if	($('form1').primerCombo.value=='' || $('form1').segundoCombo.value=='' || $('form1').dia.value==''){
			alert('Falta datos');
		}else{
			new Request.HTML({
			url: 'Pages/'+pagina+'.php',
			method: 'post', 
			data: $('form1'),
			onRequest: function(){
			 $('contenido2_raraz').set('html', '<center><img src=\"mootools/loading.gif\" width=\"120px\" height=\"19px\" /><br>Cargando...</center>');
			},
			onComplete: function(){
				//alert('Request Terminado');
			},
			onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
				//alert(pagina);
				$('contenido2_raraz').set('html',responseHTML);
			},
			onFailure: function(xhr){
				$('contenido2_raraz').set('html', 'Sin informacion disponible.');			
			}
			}).send();
		}
	 
}



DestinoVar = function(valor){
	//alert(valor);
	new Request.HTML({
			url: 'Pages/Destinosvar.php?accion='+valor,
			method: 'post', 
			//data: $('form1'),
			onRequest: function(){
			 $('destinosVar').set('html', '<center><img src=\"mootools/loading.gif\" width=\"120px\" height=\"19px\" /><br>Cargando...</center>');
			},
			onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
				//alert(responseHTML);
				$('destinosVar').set('html',responseHTML);
			},
			onFailure: function(xhr){
				$('destinosVar').set('html', 'Sin informacion disponible.');			
			}
	}).send();
}

envarmsn = function(tipoAc){
	new Request.HTML({
		url: 'Pages/enviarMSN.php?accion='+tipoAc,
		method: 'post',
		data: $('email'),
		onRequest: function(){
			  $('Rconfir').set('html', '<img src=\"admin/data/loading.gif\" width=\"120px\" height=\"19px\" /><br>Cargando...');
		},
		onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
			$('Rconfir').set('html',responseHTML);			
		},
		onFailure: function(xhr){
			alert('Error de Conexion con el archivo');
		}
	}).send();
}

cambiarnivel = function(tipoAc){
	new Request.HTML({
		url: 'Pages/nivel.php?accion='+tipoAc,
		method: 'post',
		data: $('email'),
		onRequest: function(){
			  $('cambionivel').set('html', '<img  src=\"mootools/loading.gif\" /><br>Cargando...');
		},
		onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
			$('cambionivel').set('html',responseHTML);			
		},
 
	}).send();
}

