
function validcatform()
{
	if (document.catform.catname.value == "")
	{
		alert("Name cannot be blank!");
	 	return false;
	}
return true;
}

function validproductform()
{
	if (document.productform.prodname.value == "")
	{
		alert("Name cannot be blank!");
		return false;
	}
	if (document.productform.prodprice.value / document.productform.prodprice.value != 1)
	{
		alert("Price must be a number greater than zero!");
		return false;
	}
return true;
}

function validsitedetails()
{
	if (document.sitedetails.email.value == "")
	{ 
		alert("Email field cannot be blank!");
		return false;
	}
	return true;
}

function validccpage()
{
	if (document.ccpageform.pagetitle.value == "")
	{ 
		alert("Page title cannot be blank!");
		return false;
	}
	return true;
}

function validblog()
{
	if (document.blogform.name.value == "")
	{ 
		alert("Blog name cannot be blank!");
		return false;
	}
	return true;
}

function validblogentry()
{
	if (document.blogentryform.name.value == "")
	{ 
		alert("Entry name cannot be blank!");
		return false;
	}
	return true;
}
function ConfirmRemoveOrder( form )
{
if (form.content.value == "removeorder" )
	{
			var agree=confirm("Are you sure you wish to remove this order? This should only be done if the order is cancelled or completed");
			if (agree)
				return true ;
			else
				return false ;
	}
}

function ToggleImgColor()
{
	if (document.styleform.backimg.style.visibility == "visible")
	{
	document.styleform.backcolor.style.visibility = "visible";
	document.styleform.backimg.style.visibility = "hidden";
	}
	else
	{
	if (document.styleform.backimg.style.visibility == "hidden")
	{
	document.styleform.backimg.style.visibility = "visible";
	document.styleform.backcolor.style.visibility = "hidden";
	}
	}
}


// Nannette Thacker http://www.shiningstar.net
function confirmSubmit()
{
var agree=confirm("Are you sure you wish to continue?");
if (agree)
	return true ;
else
	return false ;
}

function AdvConfirm( form )
{
if (form.content.value == "removeblog")
	{
		var agree=confirm("Are you sure you wish to delete this blog?");
		if (agree)
			return true ;
		else
			return false ;
	}
else {
	if (form.content.value == "removeblogentry")
	{
		var agree=confirm("Are you sure you wish to delete this blog entry?");
		if (agree)
			return true ;
		else
			return false ;
	}
	else {
	if (form.content.value == "deleteproduct")
		{
		var agree=confirm("Are you sure you wish to delete this product?");
		if (agree)
			return true ;
		else
			return false ;
		}
	else
		{
		if (form.content.value == "removeskin")
			{
			var agree=confirm("Are you sure you wish to delete this skin?");
			if (agree)
				return true ;
			else
				return false ;
			}
		else
		{
			if (form.content.value == "setactive")
			{
				var agree=confirm("Are you sure you wish to set this skin as active?");
				if (agree)
					return true ;
				else
					return false ;
			}
		}
		}

	}
}
}

function GenerateComponentValue( form )
{
componentform.component.value = form.component.value;
componentform.uploadfile.value = form.uploadfile.value;
componentform.compvalue.value = "This is cool";
componentform.submit = true;
}

function confirmLogout()
{
return confirm("Are you sure you want to log out?");
}

function BackColour( form )
{
document.topform.backcolour.style.visibility = "visible";
document.topform.backimage.style.visibility = "hidden";
}

function BackImage( form )
{
document.topform.backcolour.style.visibility = "hidden";
document.topform.backimage.style.visibility = "visible";
}

