function deleteNews(Id)
{
	if (confirm('Delete this item?')) {
		window.location.href = 'news.php?page=news-add&deleteNews&Id=' + Id;
	}
}

function deleteCategory(ctId)
{
	if (confirm('Delete this category?')) {
		window.location.href = 'products.php?page=category-add&deleteCategory&ctId=' + ctId;
	}
}

function deleteDesigner(deId)
{
	if (confirm('Delete this designer?')) {
		window.location.href = 'products.php?page=designers-add&deleteDesigner&deId=' + deId;
	}
}

function deleteProduct(prId)
{
	if (confirm('Delete this product?')) {
		window.location.href = 'products.php?page=products-add&deleteProduct&prId=' + prId;
	}
}

function deleteImage(product, imgId) 
{
	if (confirm('Delete this image?')) {
		window.location.href = 'products.php?page=products-edit&deleteImage&prId=' + product + '&imgId=' + imgId;
	}
}

function viewProjectbyCategory(categoryId) {
	if (categoryId != '') {
		window.location.href = 'products.php?page=products-add&category=' + categoryId;
	} else {
		window.location.href = 'products.php?page=products-add';
	}
}

function viewProjectbyDesigner(designerId) {
	if (designerId != '') {
		window.location.href = 'products.php?page=products-add&designer=' + designerId;
	} else {
		window.location.href = 'products.php?page=products-add';
	}
}

function viewProjectbyLetter(startletter) {
	if (startletter != '') {
		window.location.href = 'products.php?page=products-add&designer=' + startletter;
	} else {
		window.location.href = 'products.php?page=products-add';
	}
}

function viewImage(albumId) {
	if (albumId != '') {
		window.location.href = 'projects.php?page=image-list&album=' + albumId;
	} else {
		window.location.href = 'projects.php?page=image-list';
	}
}

function viewLargeImage(imageName)
{
	imgWindow = window.open('', 'largeImage', "width=" + screen.availWidth + ",height="  + screen.availHeight + ",top=0,left=0,screenY=0,screenX=0,status=yes,scrollbars=yes,resizable=yes,menubar=no");
	imgWindow.focus();
	imgWindow.location.href = '../viewImage.php?type=glimage&name=' + imageName;
}