function showDiv(param)
{
	var id = param;
	var y = parseInt(id)+1;
	var z = parseInt(id)-1;

	if (parseInt(id)%2 == 0)
	{
		document.getElementById(z).style.display = '';
		document.getElementById(id).style.display = 'none';
	}
	else
	{
		document.getElementById(id).style.display = 'none';
		document.getElementById(y).style.display = '';
	}
}

function setSellerActiveTag(tab, isHide)
{
	if (isHide == 1)
	{
		var arrDiv1 = new Array('divSuccess', 'divError', 'buyerSuccess');
		hideDiv(arrDiv1);
	}

	var iHaveBidOn = document.getElementById('iHaveBidOn');
	var finalizingTerm = document.getElementById('finalizingTerm');
	var projectsAwarded = document.getElementById('projectsAwarded');
	var watchList = document.getElementById('watchList');

	if (tab == 'iHaveBidOn')
	{
		iHaveBidOn.className = 'tabOn';
		finalizingTerm.className = projectsAwarded.className = watchList.className = 'tabOff';
	}
	else if (tab == 'finalizingTerm')
	{
		finalizingTerm.className = 'tabOn';
		iHaveBidOn.className = projectsAwarded.className = watchList.className = 'tabOff';
	}
	else if (tab == 'projectsAwarded')
	{
		projectsAwarded.className = 'tabOn';
		iHaveBidOn.className = finalizingTerm.className = watchList.className = 'tabOff';
	}
	else if (tab == 'watchList')
	{
		watchList.className = 'tabOn';
		iHaveBidOn.className = finalizingTerm.className = projectsAwarded.className = 'tabOff';
	}
}

function setBuyerActiveTag(tab, isHide)
{
	if (isHide == 1)
	{
		var arrDiv1 = new Array('divSuccess', 'divError','buyerSuccess');
		hideDiv(arrDiv1);
	}

	var projectsIPosted = document.getElementById('projectsIPosted');
	var workingProjects = document.getElementById('workingProjects');
	var savedProjects = document.getElementById('savedProjects');

	if (tab == 'projectsIPosted')
	{
		projectsIPosted.className = 'tabOn';
		workingProjects.className = savedProjects.className = 'tabOff';
	}
	else if (tab == 'workingProjects')
	{
		workingProjects.className = 'tabOn';
		projectsIPosted.className = savedProjects.className = 'tabOff';
	}
	else if (tab == 'savedProjects')
	{
		savedProjects.className = 'tabOn';
		projectsIPosted.className = workingProjects.className = 'tabOff';
	}
}

function popupAcceptProject(prId, bidId)
{
	document.getElementById('homeBidId').value = bidId;
	document.getElementById('homePrId').value = prId;
	ShowDv('DvMsgBx');
}

function acceptProject(url)
{
	var bidId = document.getElementById('homeBidId').value;
	var prId = document.getElementById('homePrId').value;
	location.href = url+'seller/acceptProjectInv?prId='+prId+'&bidId='+bidId;
}

function reviewTerms(url)
{
	var bidId = document.getElementById('homeBidId').value;
	var prId = document.getElementById('homePrId').value;
	location.href = url+'project/acceptSellerBusTerm?prId='+prId+'&bidId='+bidId;
}

function buyMoreCredits(url)
{
	var bidId = document.getElementById('homeBidId').value;
	var prId = document.getElementById('homePrId').value;
	location.href = url+'myaccount/credits?fp=home';
}

function menuModule(id)
{
	var item = document.getElementById(id);

	if (item.style.display)
	{
		new Effect.BlindDown(id, {});
	}
	else
	{
		new Effect.BlindUp(id, {});
	}
}