	function addFavorite(id) {
    	
		var loader = document.getElementById('loadBar_favorites');
		loader.style.display = "inline";
		sentTimer = setTimeout("hideContactTimer2("+id+")",2000);
	}
	
	function hideContactTimer2 (id) {
		ajaxFunction(id);		
		var loader = document.getElementById('loadBar_favorites');
		loader.style.display = "none";
	}
	function ajaxFunction(id)
	{
		var xmlHttp;
		//var str_vars = "ic_id="+document.getElementById("id_icon").value+"&ar_id="+document.getElementById("id_article").value+"&arr1="+document.getElementById("arr_1").value+"&arr2="+document.getElementById("arr_2").value+"&comm="+document.getElementById("comment").value+"&uname="+document.getElementById("usrname").value;
		if (window.XMLHttpRequest) {
	    	//alert('Entra a XMLHttpRequest');
	        xmlHttp = new XMLHttpRequest();
	        
	    // branch for IE/Windows ActiveX version
	    } else if (window.ActiveXObject) {
	    	//alert('Entra a activeX');
	        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	        
	    }
		xmlHttp.onreadystatechange=function(){
			if (xmlHttp.readyState == 4) {
				if (xmlHttp.status != 200) {
					alert('Error : Status '+xmlHttp.status+' returned.');
				} 
			}			
		}
		
		xmlHttp.open("POST","professional-logos/scripts/fvt_response.php?id="+id,false);
		xmlHttp.setRequestHeader("Content-Type", "text/plain");
		xmlHttp.send(""); 
		document.getElementById("fav_box").innerHTML=xmlHttp.responseText;	
		/*if(document.getElementById("msg_res")!=undefined){
						alert('hay');
			if(document.getElementById("msg_res").value == 1){
				document.getElementById("msg_trnsctn").innerHTML="<font color=\"green\">Comment successfully posted</font>";
			}else{
				document.getElementById("msg_trnsctn").innerHTML="<font color=\"red\">Comment already exists for this item</font>";
			}
		}else{
			alert('no hay');
		}*/
		
	}

	function validar_comment(thisform){
		with (thisform){
			var submit_ok = false;
			campos = document.getElementsByTagName('input');
			areas = document.getElementsByTagName('textarea');	
			var captcha=campos['cpt'].value;			
			if(campos['usrname']!=undefined && campos['usrname'].value == ''){
				alert('Enter your name');
				campos['usrname'].focus();
			}else if(areas['comment'].value == ''){
				alert("Enter your opinion");
				areas['comment'].focus();			
			}else if(captcha != campos['valcomm'].value){
				alert('Enter validation code');
				campos['valcomm'].focus();
			}else{				
				showContactTimer2();	
			}
			return false;
		}
	}