	function sortList(strCategoryType)
	{

	intSubcategoryId=$('#cmbDemoCategory').val();
	intCategoryId=$('#cmbDemoMainCategory').val();
	strJockName=$('#txtJockName').val();

		
				$.post(strRoot+"voiceDemos/showDemoList",{'intCategoryId':intCategoryId,'intSubcategoryId':intSubcategoryId,'strJockName':''},function(data)
				{
						$('#divDemoContent').html(data);
				
				});
	}
	function sortListByJockName()
	{
	intSubcategoryId=$('#cmbDemoCategory').val();
	intCategoryId=$('#cmbDemoMainCategory').val();


	strJockName=$('#txtJockName').val();

				$.post(strRoot+"voiceDemos/showDemoList",{'intCategoryId':intCategoryId,'intSubcategoryId':intSubcategoryId,'strJockName':strJockName},function(data)
				{
						$('#divDemoContent').html(data);
				
				});
	}


	function sortListEmbed(strCategoryType)
	{

	intSubcategoryId=$('#cmbDemoCategory').val();
	intCategoryId=$('#cmbDemoMainCategory').val();
	strJockName=$('#txtJockName').val();

		
				$.post(strRoot+"voiceDemos/showEmbedDemoList",{'intCategoryId':intCategoryId,'intSubcategoryId':intSubcategoryId,'strJockName':''},function(data)
				{
						$('#divDemoContent').html(data);
				
				});
	}
	function sortListByJockNameEmbed()
	{
	intSubcategoryId=$('#cmbDemoCategory').val();
	intCategoryId=$('#cmbDemoMainCategory').val();


	strJockName=$('#txtJockName').val();

				$.post(strRoot+"voiceDemos/showEmbedDemoList",{'intCategoryId':intCategoryId,'intSubcategoryId':intSubcategoryId,'strJockName':strJockName},function(data)
				{
						$('#divDemoContent').html(data);
				
				});
	}


   
   function showCreditCardDetails()
   {
	   intBillingId=$('#cmbCreditCards').val();
	   
		if(intBillingId!='Select')
	   {
		
		$.post(strRoot+"billingInformations/showCardInfoByUserId",{'intBillingId':intBillingId},function(data)
				{
				
					$('#cardDetails').html(data);
				
				});
		   }
		   else
			   $('#cardDetails').html('');
			//cardDetails
   }

function hideQtip(intUserId)
{

   $('.divPlayer').each(function(i,item){
	$(item).html('');
   });

	$('.detailTooltip').qtip("hide");
}
function logout()
{
           $.post(strRoot+"users/logout",{'test':'123'},function(data)
			{
					window.location.href=strRoot+"users/index";
			
			});
}
function getForgotPasswordForm(objTarget)
{
					$.post(strRoot+"userProfiles/forgotPassword",{'test':'123'},
			        function(data){

											$(objTarget).qtip('api').updateContent(data);
										
					});
}

function getContent(objTarget,intUserId,noOrder)
{

	$.post(strRoot+"userProfiles/showUserDetailFaceBox",{'intUserId':intUserId,'noOrder':noOrder},
			        function(data){

											$(objTarget).qtip('api').updateContent(data);
										
					});


}


function CheckAll(strClassName)
{

$('.'+strClassName+':checkbox').attr('checked', true);

}
function UnCheckAll(strClassName)
{
$('.'+strClassName+':checkbox').attr('checked', false);

}
function setAuthId(intAuthId,strUserRoll)
{
	if(strUserRoll=='JOCK')
		window.location=strRoot+'userProfiles/showUserDetails/NULL/'+intAuthId+'/JOCK';
	else if(strUserRoll=='CLIENT')
		window.location=strRoot+'userProfiles/clientProfile/'+intAuthId+'/CLIENT';
}
function checkEqualSpots()
{
	if($('#cmbEqualSpots').val()=='No')
	{

		if($('#cmbNoOfSpots').val()>1)
		{
		$.post(strRoot+"orderDetails/getTypeOfSpotCombos",{'intNoOfSpot':$('#cmbNoOfSpots').val()},
			        function(data){

										$('#divNoOfSpots').html(data);

										
					});
		}

	}else
	{

		$.post(strRoot+"orderDetails/getTypeOfSpotCombos",{'intNoOfSpot':1},
			        function(data){

										$('#divNoOfSpots').html(data);

										
					});


	}
	
}

function cancelOrder(intOrderId)
{
	var answer = confirm ("Are you sure to cancel the order?")
	if (answer)
	{
			$.post(strRoot+"admins/cancelOrder",{'intOrderId':intOrderId},
			        function(data){

					window.location.href=strRoot+"admins/showOrderStatus/ALL";
					});
	}
	
}
