	function showBulletinSubscriptionForm(){
		$.ajax({
			   async: true,
			   type: "POST",
			   url: "_ajax.php",
			   data: "opc=showBulletinSubscriptionForm",
			   success: function(data){
				  MySimpleLightBox.loadHTML(data);
			   }
		 });
	}
	
	function sendBulletinSubscriptionForm(){
		if(checkFormFields('bulletin_form',1,0,'#818181','#F7F7F7')){
			$("#bulletin_form").addAjaxLoader();
			$.ajax({
				   async: true,
				   type: "POST",
				   url: "_ajax.php",
				   data: "opc=sendBulletinSubscriptionForm&"+$("#bulletin_form").serializeForm(),
				   success: function(data){
						switch(parseInt(data)){
							case 1:
								$('#newsletter_form').clearForm();
								showAlertMessage(getTranslateEntry('newsletter_registration_successfull'),'info',true,true);
								break;
							case 2:
								showAlertMessage(getTranslateEntry('existent_account'),'error');
								break;
						}
						$("#bulletin_form").removeAjaxLoader();
				   }
			 });
		}
	}
	
	function showRecommendForm(){
		$.ajax({
			   async: true,
			   type: "POST",
			   url: "_ajax.php",
			   data: "opc=showRecommendForm",
			   success: function(data){
				  MySimpleLightBox.loadHTML(data);
			   }
		 });
	}
	
	function sendRecommendForm(){
		if(checkFormFields('recommend_form',1,0,'#818181','#F7F7F7')){
			$("#recommend_form").addAjaxLoader();
			$.ajax({
				   async: true,
				   type: "POST",
				   url: "_ajax.php",
				   data: "opc=sendRecommend&"+$("#recommend_form").serializeForm()+"&href="+document.location.href,
				   success: function(data){
					  MySimpleLightBox.close();
				   }
			 });
		}
		
	}
	
	function sendForm(form_id,color,background,callback){
		callback = callback==undefined?false:callback;
		if(checkFormFields(form_id,1,1,color,background)){
			$("#"+form_id).addAjaxLoader();
			var vars = 'opc=sendForm&'+$("#"+form_id).serializeForm()+'&'+$("#"+form_id).serializeFormDescriptions();
			$.ajax({
			   async: true,
			   type: "POST",
			   url: "_ajax.php",
			   data: vars,
			   success: function(data){
					$.ajax({
					   async: true,
					   type: "POST",
					   url: "_ajax.php",
					   data: "opc=translate&word="+(parseInt(data)==1?"message_sent":"message_not_sent"),
					   success: function(translate){
							showAlertMessage(translate,(data==1?"info":"error"));
							$("#"+form_id).clearForm();
							$("#"+form_id).removeAjaxLoader();
							if(callback){
								callback.apply(this,[]);
							}
					   }
					 });
					
			   }
			 });
		 }
	}
	
	function getMicrotime(){
		var micro = "";
		$.ajax({
		   async: false,
		   type: "POST",
		   url: "_ajax.php",
		   data: "opc=getMicrotime",
		   success: function(data){
		     micro = data;
		   }
		 });
		return micro;
	}
	
	function getCleanFileName(filename){
		filename = filename.replace("&","%26");
		$.ajax({
		   async: false,
		   type: "POST",
		   url: "_ajax.php",
		   data: "opc=getCleanFilename&filename="+filename,
		   success: function(data){
	   			filename=data;
		   }
		 });
		 return filename;
	}
	
	function createBookmarkLink() {
		 title = document.title; 
		 url   = window.location.href;
		 if (window.sidebar) { // Mozilla Firefox Bookmark
			 window.sidebar.addPanel(title, url,"");
		 } 
		 else if( window.external ) { // IE Favorite
				window.external.AddFavorite( url, title); 
		 }
		 else if(window.opera && window.print) { // Opera Hotlist
				return true; 
		 }
	 }
	
	function showRememberPasswordForm() {
		$.ajax({
			   async: true,
			   type: "POST",
			   url: "_ajax.php",
			   data: "opc=showRememberPasswordForm",
			   success: function(data){
				  MySimpleLightBox.loadHTML(data);
			   }
		 });	
	
	}
	
	function sendRememberPasswordForm(){
		if(checkFormFields('remember_password_form',1,0,'#818181','#F7F7F7')){
			$("#remember_password_form").addAjaxLoader();
			$.ajax({
				   async: true,
				   type: "POST",
				   url: "_ajax.php",
				   data: "opc=sendRememberPasswordForm&email="+$('#remember_email').val(),
				   success: function(data){
					  MySimpleLightBox.close();	
					  if(data=='1'){
						  showAlertMessage(txt_password_sended,"info");
					  }
					  else{
						  showAlertMessage(txt_email_not_found,"error");
					  }
						
				   }
			 });
			
	   }
	}
	
	function showUserChangePassword() {
		$.ajax({
			   async: true,
			   type: "POST",
			   url: "_ajax.php",
			   data: "opc=showUserChangePassword",
			   success: function(data){
				  MySimpleLightBox.loadHTML(data);
			   }
		 });	
	
	}
	
	function sendUserChangePassword(){
		if(checkFormFields('change_password_form',1,0,'#818181','#F7F7F7')){
			$("#change_password_form").addAjaxLoader();
			$.ajax({
				   async: true,
				   type: "POST",
				   url: "_ajax.php",
				   data: "opc=sendUserChangePassword&newpass="+$('#new_password').val()+"&repeatnewpass="+$('#repeat_new_password').val(),
				   success: function(data){
					  MySimpleLightBox.close();	
					  if(data=='1'){
						  showAlertMessage(txt_password_sended,"info");
					  }
					  else{
						  showAlertMessage(txt_password_error,"error");
					  }
						
				   }
			 });
	   }
	}
	
	function showSendFriend(link,subsec,cat) {
		$.ajax({
			   async: true,
			   type: "POST",
			   url: "_ajax.php",
			   data: "opc=showSendFriend&link="+link+"&subsec="+subsec+"&cat="+cat,
			   success: function(data){
				  MySimpleLightBox.loadHTML(data);
			   }
		 });	
	}
		
	function sendSendFriend(form_id){
		if(checkFormFields(form_id,1,0,'#000','#fff')){
			$('#'+form_id).addAjaxLoader();
			$.ajax({
				   async: true,
				   type: "POST",
				   url: "_ajax.php",
				   data: "opc=sendSendFriend&your_name="+$('#your_name').val()+"&your_mail="+$('#your_mail').val()+"&friend_name="+$('#friend_name').val()+"&friend_mail="+$('#friend_mail').val()+"&link="+$('#link').val()+"&subsec="+$('#subsec').val()+"&cat="+$('#cat').val(),
				   success: function(data){
					  MySimpleLightBox.close();	
					  if(data=='1'){
						  showAlertMessage(mail_sended,"info");
					  }
					  else{
						  showAlertMessage(mail_error,"error");
					  }
						
				   }
			 });
	   }
	}
	
	function changeFeaturedWhy(section){
		$('#why_external_cnb').addAjaxLoader();
		$.ajax({
			   async: true,
			   type: "POST",
			   url: "_ajax.php",
			   data: "opc=changeFeaturedWhy&sec="+section,
			   success: function(data){
					$('#why_external_cnb').removeAjaxLoader();
					$('#why_external_cnb').html(data);
			   }
		 });
	}
