
$(document).ready(function() {
						   
/*	$("#sign_business_owner").click(function (){
											  
		$.get("sign_business_owner_ajax.php?ids=" + $(this).attr('rel'), function(data) {
			alert(data);
		});
		
	});
*/						   
	$("#owner_options").click(function (){
											  
		$("#owner_options_div").toggle();
		
	});
						   
	$("#Hsearchtext").click(function (){
											  
		$(this).val("");
		
	});


});

function showreply(id)
{
	var obj = document.getElementById("areply"+id);
	if(obj.style.display=="none")
		obj.style.display="block";
	else
		obj.style.display="none";
}


function getHTTPObjects() {
  var xmlhttp;
  if(window.XMLHttpRequest){xmlhttp = new XMLHttpRequest();}
  else if (window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    if (!xmlhttp){xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
}
return xmlhttp;
}


function saveareply(id, iid)
{
	var content = document.getElementById("areplycontent"+id).value;
	if(content=="")
	{
		alert("Reply is empty!");
		return false;
	}	
	var http = getHTTPObjects();
	http.open("GET", "func/getreply.php?act=add&id="+id+"&content="+content, true);
	http.onreadystatechange=function(){
		if (http.readyState == 4) {
		    if(http.status==200) {
				alert(http.responseText);
				get(iid,1);
		    }
		}
	}
	http.send(null);
}


function delreply(id, iid)
{
	if(id=="")
		return false;
	var http = getHTTPObjects();
	http.open("GET", "func/getreply.php?act=del&id="+id, true);
	http.onreadystatechange=function(){
		if (http.readyState == 4) {
		    if(http.status==200) {
				alert(http.responseText);
				get(iid,1);
		    }
		}
	}
	http.send(null);
}


function save_item()
{
	ids = "";
	$(".items").each(function(i){
		if($(this).attr("checked"))
		{
			ids += $(this).val()+",";
		}
	});
	ids = ids.replace(/,$/,"");
	return ids;
	$("#items_save").val(ids);
	
}
function select_all_item()
{
	$(".items").each(function(i){
		this.checked = !this.checked;
	});
	
}