	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,'#000','#FFF')){
			$("#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,callback){
		callback = callback == undefined || callback==''?false:callback;
		if(checkFormFields(form_id,1,0,'#000','#FFF')){
			$("#"+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 isCaptchaCodeCorrect(code){
		var bool =true;
		$.ajax({
			   async: false,
			   type: "GET",
			   url:  "_ajax.php",
			   data:  "opc=getCaptcha&captcha="+code,
			   success: function(data){
					if(data==0){
						 bool=false;
					}
			   }
			});
		 return bool;
	}
	
	function updateCaptcha(layer){
		
		$.ajax({
		   async: false,
		   type: "GET",
		   url:  "_ajax.php",
		   data:  "opc=updateCaptcha",
		   success: function(data){
				$(layer).replaceWith(data);
		   }
		});
	}
	
	function getMicrotime(){
		var micro = "";
		$.ajax({
		   async: false,
		   type: "GET",
		   url: "_ajax.php",
		   data: "opc=getMicrotime",
		   success: function(data){
		     micro = data;
		   }
		 });
		return micro;
	}
	
	function getCleanFileName(filename){
		$.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 showMap(loc) {
		$.ajax({
			   async: true,
			   type: "GET",
			   url: "_ajax.php",
			   data: "opc=showMap&loc="+loc,
			   success: function(data){
				  MySimpleLightBox.loadHTML(data);
			   }
		 });	
	}
	
	
