
function PopUp(theURL,winName,features) {
	window.open(theURL,winName,features);
}

function ToggleItem(myItem) {
	if (myItem.style.visibility != 'hidden') {
		HideItem(myItem);
	} else {
		ShowItem(myItem);
	}
	return false;
}
function ShowItem(myItem) {
	myItem.style.visibility = 'visible';
	myItem.style.display = '';
}
function HideItem(myItem) {
	myItem.style.visibility = 'hidden';
	myItem.style.display = 'none';
}
function submitform() {
	document.search.submit();
}

function sendAnnotatedMailTo(name, company, domain, subject, body) {
locationstring = 'mai' + 'lto:' + name + '@' + company + '.' + domain + "?subject=" + escape(subject) + "&body=" + escape(body); window.location.replace(locationstring);
}

function checkOptions() {
	with (document.the_form) {
	myOption = -1;
	
	if (OPT_ID3.checked) {
		myOption = 0;
	} else {
		for (i=OPT_ID3.length-1; i > -1; i--) {
			if (OPT_ID3[i].checked) {
				myOption = i; 
				i = -1;
			}
		}
	}
	if (myOption == -1) {
		alert("Please select colour")
		return false;
	}
	
	if (typeof OPT_ID4 != 'undefined') {
		myOption = -1;
		if (OPT_ID4.checked) {	//size
			myOption = 0;
		} else {
			for (i=OPT_ID4.length-1; i > -1; i--) {
				if (OPT_ID4[i].checked) {
					myOption = i; 
					i = -1;
				}
			}
		}
		if (myOption == -1) {
			alert("Please select size")
			return false;
		}
	}

	if (typeof OPT_ID2 != 'undefined') {
		myOption = -1;
		if (OPT_ID2.checked) {	//cup size
			myOption = 0;
		} else {
			for (i=OPT_ID2.length-1; i > -1; i--) {
				if (OPT_ID2[i].checked) {
					myOption = i; 
					i = -1;
				}
			}
		}
		if (myOption == -1 && OPT_ID2.size == 10) {
			if (OPT_ID2.value != '-') {
				myOption = 0;
			}
		}
		if (myOption == -1) {
			alert("Please select cup size")
			return false;
		}
	}
	
	if (typeof OPT_ID1 != 'undefined') {
		var alertMsg = "Please select your";
		if (OPT_ID1.value == " ") alertMsg += " size";	//back
		if (alertMsg != "Please select your") {
		alert(alertMsg);
		return false;
		}
		else {
			return true;
			}
		}
	}
					}