$j(document).ready(function(){

	$j("#viewblogcomment_addcomment").click(function(){
		$j("#panel").slideToggle("slow");
		$j(this).toggleClass("active"); return false;
	});
	
	 
});

$j(document).ready(function(){

	$j("#send_to_friend").click(function(){
		$j("#divsend_to_friend").slideToggle("slow");
		$j(this).toggleClass("active"); return false;
	});
	
	 
});

function PagePost(val)
   {
   		//alert(val1)
   		document.getElementById('Page_Number').value=val;
		//document.getElementById('Sector_Number').value=val1;
		document.frmpaging.submit();
   }
   function showResult(val)
	{	
		//alert(val);
		document.getElementById('hiddenlimit').value = val;
		document.frmpaging.submit();
	}
	

function removesubscribe(subscribeid,subtype)
	{
		var confirm_del= confirm("Do you want to Remove this Subscribe?");
		if(confirm_del==true)
		{
		document.getElementById('sub_type').value = subtype;
		document.getElementById('subscribeid').value = subscribeid;
		document.frmremovesubscribe.submit();		
		}
	}

function addsubscribe(subscribeid,subtype)
	{
		var confirm_del= confirm("Do you want to Notify of follow-up comments posted here?");
		if(confirm_del==true)
		{
		document.getElementById('sub_type').value = subtype;
		document.getElementById('subscribeid').value = subscribeid;
		document.frmaddsubscribe.submit();		
		}
	}
	
	function setvalue(val,val2)
	{
		if(val2==1)
		var confirm_del= confirm("Do you really want to unpublished this link??");
		else
		var confirm_del= confirm("Do you want to published this link??");
		if(confirm_del==true)
		{
			location="<?=$jsiteurl?>mylinks.php";
		}	
	}
	function select_func(val)
	{
		location="<?=$jsiteurl?>mylinks.php";
	}
	function sortit(sortby,order)
	{
		document.getElementById('sortby').value = sortby;
		document.getElementById('sort_order').value = order;
		document.frmvalue.submit();
	}
	
	function startLimit(val)
	{
		//alert(val);
		document.getElementById('hiddenstartlimit').value = val;
		document.frmvalue.submit();
	
	}
	function checkAll (str)
	{
		var total_cnt = document.getElementById('hiddencnt').value;
		var str_id="";
		if(str=='all')
		{
			for(var i=1; i<=total_cnt; i++)
			{
				//alert(name);
				document.getElementById("chkprint_"+i).checked= true;
				
				if(str_id!="")
				str_id = str_id+","+document.getElementById('id_'+i).value;
				else
				str_id = document.getElementById('id_'+i).value;
			}
		}else if(str=='notall')
		{
			for(var i=1; i<=total_cnt; i++)
			{
				document.getElementById("chkprint_"+i).checked= false;
				str_id="";
			}
		}
		else
		{
			for(i=1; i<=total_cnt; i++)
			{
				if(document.getElementById('chkprint_'+i).checked==true)
				{
					if(str_id!="")
					str_id = str_id+","+document.getElementById('id_'+i).value;
					else
					str_id = document.getElementById('id_'+i).value;
				}
			}
		}
		document.getElementById('hidden_linkid').value=str_id;
	}
	
	function select_delete_all(val)
	{
		document.frmapprove.submit();
	}
	
	
	

