function category(cat_id)
{
	
	 var url = 'function_catagory.php?cat_id='+cat_id;
	 
	//alert(url);
	
     new Ajax.Request(url,{
     method: 'get',
     onLoading: function(transport)
     {
     // $(dv).show(wait).update('<img src="images/ajax-loader.gif" border="0" />');
     },
     onSuccess: function(transport)
     {
         var dr = transport.responseText;
	//alert(dr);
		document.getElementById('subcategoryname').innerHTML =dr;
	//	window.location.href="preview-image.php";
		
		
		
	},
     onFailure: function(transport)
     {
         // when the request fails
         alert('The request failed..');
     },
     onException: function(err)
     {
         // When an exception is encountered while executing the callbacks
       //  alert('Exception');
     }
     });
}

