// JavaScript Document
	


function removeMarketPlace(marketPlaceId)
	{
		if(marketPlaceId!=0)
		{
			if(confirm("Do you sure to delete this marketPlace"))
			{
				window.location.href=HTTP_PATH_MEMBER+'/marketplace/marketplace_listing_delete_action.php?MarketPlaceID='+marketPlaceId
			}
		}
	}




function unlistMarketPlace(marketPlaceId,action)
	{
		if(marketPlaceId!=0)
		{
			if(confirm("Do you sure to "+action+" this marketPlace"))
			{
				window.location.href=HTTP_PATH_MEMBER+'/marketplace/marketplace_pending_approval_action.php?MarketPlaceID='+marketPlaceId+'&actionKey='+action;
			}
		}
	}


	/////////// FUNCTION USE IN ADD GROUP FOR HIDE AND SHOW REPLAY OPTION ///////////////////////
	function showhide(val)
	{
		if(val==0)
		{
			document.getElementById("ReplayEmail").style.display	=	"none";
		}
		if(val==1)
		{
			document.getElementById("ReplayEmail").style.display	=	"";
		}
	}
	////////////////////////////////////////////////////////////////////////////////////////////////
	function approveDenyMarketPlace(marketPlaceId,action)
	{
		
		
		if(marketPlaceId!=0)
		{
			if(confirm("Do you sure to "+action+" this marketPlace"))
			{
				window.location.href='marketplace_pending_approval_action.php?MarketPlaceID='+marketPlaceId+"&actionKey="+action
			}
		}
	}
///////////////////////////////////////////////////////////	PAGE ORDER //////////////////////////////////////

function changeOrder(order)
{
	if(order==1)
	{
		window.location.href="marketplace.php?orderBy="+order;
	}
	else
	{
		window.location.href="marketplace.php";
	}
}

function changeClass(order)
{
	if(order==1)
	{
		document.getElementById("Recent").className ="whiteTab";
		document.getElementById("Popular").className ="greyTab";	
	}
	else
	{
		document.getElementById("Recent").className ="greyTab";
		document.getElementById("Popular").className ="whiteTab";	
	}

}

function changeCategoryOrder(order,catId)
{
	catCondition	=	'';
	if(catId!='')
	{
		catCondition	=	"&catId="+catId;	
	}
	if(order==1)
	{
		window.location.href="marketplace_category.php?orderBy="+order+catCondition;
	}
	else
	{
		window.location.href="marketplace_category.php?orderBy="+order+catCondition;
	}
}

///////////////////////////////////////////////////////////	PAGE ORDER //////////////////////////////////////


