//FUNCTION: validateEmail
//Contains a least one character procedding the @
//Contains a "@" following the procedding character(s)
//Contains at least one character following the @, followed by a dot (.), 
//	followed by either a two character or three character string 
//	(a two character country code or the standard three character US code, such as com, edu etc)
function validateEmail(sEmailAddress){
	//create the regexp to test the email address text
	var oEmailRegExp = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	//perform the test and return success as appropriate
	if (oEmailRegExp.test(sEmailAddress)){
		return true;
	}else{
		return false;
	}
}
function _openvoucherwin(name){
	vwin=window.open('voucherwin.php?id='+name, 'voucherwin', 'location=0,scrollbars=yes,toolbar=yes,status=no,menubar=yes,width=450,height=300');
	vwin.window.focus();
}
/* Name		:createCookie
* Purpose	:creates a new cookie
* Returns	:n/a
*/
function createCookie(name, value, expireInDays){
	if(expireInDays){
		var dDate = new Date();
		dDate.setTime(dDate.getTime() + (expireInDays * 24 * 60 * 60 * 1000));
		var sExpires = "; expires=" + dDate.toGMTString();
	}else{
		var sExpires = "";
	}
	document.cookie = name + "=" + value + sExpires + "; path=/";
}
function showProductImage(fileName) {
	container = document.getElementById("detailImageContainer");
	detailImage = container.getElementsByTagName("img");
	detailImage[0].src = "images/products/"+fileName;
}