var isEmpty = "";
var rbEmpty = "images/rbEmpty.png";
var rbFull = "images/rbFull.png";

window.onload = function()
{
	binCount = System.Shell.RecycleBin.fileCount + System.Shell.RecycleBin.folderCount;
	if (binCount == 0)
	{
		binIcon.src = rbEmpty;
		binContents.innerText = "It's Empty";
	}
	else
	{
		binIcon.src = rbFull;
		binContents.innerText = binCount + " items";
	}
}

function emptyIT()
{
	isEmpty = (System.Shell.RecycleBin.fileCount + System.Shell.RecycleBin.folderCount == 0);
	if (!isEmpty)
	{
		System.Shell.RecycleBin.emptyAll();
	}
}

function openRB()
{
	System.Shell.execute("Explorer", "/N,::{645FF040-5081-101B-9F08-00AA002F954E}");
}

function openProp()
{
	System.Shell.RecycleBin.showRecycleSettings();
}

