function confirmDelete(url)
{
	var res = window.confirm('Are you sure you wish to delete this item?'); 
	if (res==true)
		window.location = url;
}

function setImage(imgName, type) {
	if (document.images) {
		if (type=="hilite") {
			document.images[imgName].src = imagesHilite[imgName].src;
			return true;
		}
		else 
		if (type=="normal") {
			document.images[imgName].src = imagesNormal[imgName].src;
			return true;
		}
	}
	
	return false;	
}

function showImage(filename, width, height)
{
	width = width + 50;
	height = height + 75;
	window.open("showimage.php?filename=" + filename + "&height=" + height + "&width=" + width, "preview", "width=" + width + "px,height=" + height + "px,toolbar=no,location=no,menubar=no,status=no,scrollbars=no,resizable=yes");
}

function resizeImageWindow(w, h)
{
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			top.outerWidth=w;
			top.outerHeight=h;
		}
		else top.resizeTo(w,h);
	}
}

function showBlindRequest(show)
{
	if (show)
		document.getElementById("blindrequestform").style.visibility = "visible";
	else
		document.getElementById("blindrequestform").style.visibility = "hidden";
}

function showSiteInfo(show)
{
	if (show)
		document.getElementById("siteinfo").style.visibility = "visible";
	else
		document.getElementById("siteinfo").style.visibility = "hidden";
}

function sendOrderRequest()
{
	if (document.getElementById("name").value=="")
		alert("Please enter a contact name.");
	else
	if ((document.getElementById("email").value=="") && (document.getElementById("phone").value==""))
		alert("Please enter your email address or telephone number so that we can contact you.");
	else
	if ((document.getElementById("email").value!="") && (document.getElementById("email").value!=document.getElementById("confirmemail").value))
		alert("The confirmation email does match. Please re-enter your email details.");
	else
	if (document.getElementById("blindwidth").value=="")
		alert("Please enter the width of your blind so that we can give you a quote.");
	else
	if (document.getElementById("blindheight").value=="")
		alert("Please enter the height of your blind so that we can give you a quote.");
	else
		document.all.blindrequest.submit();
}
