	{
	document.onmousedown=right;
	document.onmouseup=right;
	if (document.layers) window.captureEvents(Event.MOUSEDOWN);
	if (document.layers) window.captureEvents(Event.MOUSEUP);
	window.onmousedown=right;
	window.onmouseup=right;

//	document.onmouseover=makeCool;
//	document.onmouseout=makeNormal;

	onerror = errWindow
	}

	function makeCool() {
		src = event.toElement;
		if (src.tagName == "A" || src.tagName == "a") {
			src.oldcol = src.style.color;
			src.style.color = "#800000";
		}
	}
	function makeNormal() {
		src=event.fromElement;
		if (src.tagName == "A" || src.tagName == "a") {
			src.style.color = src.oldcol;
		}
	}


	function makesureFrame(a) {
			top.main.location.href = a;
//			document.write("<html><head>");
//			document.write("<meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>");
//			document.write("<title>Josie Restaurant : A Fine Dining Establishment<\/title>");
//			document.write("<meta name='TITLE' content='Josie : Fine Dining Establishment (Santa Monica) by Chef Josie Le Balch and Frank Delzio. Progressive American cooking with French and Italian influences.'>");
//			document.write("<meta name='DESCRIPTION' content='Josie : Fine Dining Establishment (Santa Monica) by Chef Josie Le Balch and Frank Delzio. Progressive American cooking with French and Italian influences.'>");
//			document.write("<meta name='keywords' content='Josie : Fine Dining Establishment (Santa Monica) by Chef Josie Le Balch and Frank Delzio. Progressive American cooking with French and Italian influences.'>");
//			document.write("<\/head>");
//			document.write("<frameset framespacing='0' border='0' rows='98%' frameborder='0' cols='250,97%' scrolling='auto'>");
//			document.write("<frame name='contents' target='main' src='LeftFrame_Josie.htm' scrolling='auto'>");
//			document.write("<frame name='main' src='" + a + "' target='_self' scrolling='auto'>");
//			document.write("<body onMouseOver='window.status='" + "Josie Home Page" + "';return true>");
//			document.write("<\/body>")
//			document.write("<\/frameset>");
//			document.write("<\/html>");
	}

	function formatReal(expr, decplaces) {
		var str = "" + Math.round (eval(expr) * Math.pow(10,decplaces))

//                          pad small value strings with zeros to the left of rounded number

		while (str.length <= decplaces) {
			str = "0" + str
		}

//                          establish location of decimal point

		var decpoint = str.length - decplaces
		return str.substring(0,decpoint) + "." + str.substring(decpoint,str.length);	
	}

	function openNewWindow(theURL,winName,specs) { 
		newwindow=window.open(theURL,winName,specs);
	}

	function newWindow(add) {

		storeWindow  = window.open(add, 'storeWin', 'toolbar=no,status=yes,locationbar=no,scrollbars=yes,resizable=yes,width=680,height=400');
		storeWindow.focus()
	}

// turn incoming expression into a dollar value
	function dollarize (expr) {
		return "$" + formatReal(expr,2)
	}


function checkFormKey(evt) {
	evt = (evt) ? evt : event
	var charCode= (evt.which) ? evt.which : evt.KeyCode
	if (charCode == 13) {
		return false;
	}
	return true;
}	

function CalcTotal(s){
	if (document.images) {
		if (document.store.Qty1.value>=0) { document.store.Total1.value = formatReal((parseFloat(document.store.Qty1.value) * parseFloat(document.store.Cost1.value)), 2) }
//		if (document.store.Qty2.value>=0) { document.store.Total2.value = formatReal((parseFloat(document.store.Qty2.value) * parseFloat(document.store.Cost2.value)), 2) }
		if (document.store.Qty3.value>=0) { document.store.Total3.value = formatReal((parseFloat(document.store.Qty3.value) * parseFloat(document.store.Cost3.value)), 2) }
//		if (document.store.Qty4.value>=0) { document.store.Total4.value = formatReal((parseFloat(document.store.Qty4.value) * parseFloat(document.store.Cost4.value)), 2) }
//		document.store.GrandTotal.value= formatReal((parseFloat(document.store.Total1.value) + parseFloat(document.store.Total2.value) + parseFloat(document.store.Total3.value)), 2)
		document.store.GrandTotal.value= formatReal((parseFloat(document.store.Total1.value) + parseFloat(document.store.Total3.value)), 2)
		document.store.Name2.value = document.store.UserName.value
		document.store.NameOnCard.value = document.store.UserName.value
		document.store.Total.value = document.store.GrandTotal.value
	}
}

function validForm() {
	document.store.ErrorDisplay1.value = ""
//	document.store.ErrorDisplay2.value = ""
	document.store.ErrorDisplay3.value = ""
	CalcTotal('1')

	if (document.store.UserName.value == "")  {
		document.store.ErrorDisplay1.value = "please supply Name!"
		document.store.ErrorDisplay1.bgcolor="FF0000"
		document.store.UserName.focus()
		return false
		}
	if (document.store.Email.value == "")  {
		document.store.ErrorDisplay1.value = "please supply Email"
		document.store.Email.focus()
		return false
		}
	if (document.store.CreditCard.value == "")  {
		document.store.ErrorDisplay3.value = "please supply type of credit card"
		document.store.CreditCard.focus()
		return false
		}
	if (document.store.CC.value == "")  {
		document.store.ErrorDisplay3.value = "please supply credit card number"
		document.store.CC.focus()
		return false
		}
	if (document.store.CCAdd1.value == "")  {
		document.store.ErrorDisplay3.value = "please suppply address from CC statement"
		document.store.CCAdd1.focus()
		return false
		}
	if (document.store.CCAdd2.value == "")  {
		document.store.ErrorDisplay3.value = "please supply CC address"
		document.store.CCAdd2.focus()
		return false
		}
	if (document.store.exp.value == "")  {
		document.store.ErrorDisplay3.value = "please supply CC expiration date"
		document.store.exp.focus()
		return false
		}
	if (document.store.CCtel.value == "")  {
		document.store.ErrorDisplay3.value = "please supply telephone number"
		document.store.CCtel.focus()
		return false
		}
	if (document.store.Total.value == "")  {
		document.store.ErrorDisplay2.value = "no items have been selected"
		document.store.Qty1.focus()
		return false
		}

	printPage()
	return true
}

function printPage() {
  if (window.print)
	window.print()
  else
	alert("Sorry, your browser doesn't support this feature.");
}

function errWindow(errMsg, location, linenumber) {
	debugWin=window.open("", "debugWin", "height=200,width=300,resize=yes")
	debugWin.document.write("<H2>There was an error at line " + linenumber)
	debugWin.document.write("<br>The error was : " + errMsg)
	debugWin.document.close()
	return true
}

function PicLeft(pass1)
{
i = i+1
if (i>picImages.length) { i=0 }
document.homepic.src = "images/Gallery/KCRW/" + picImages[i]
if (picSize[i]==0) { 
	document.homepic.width = 193
	document.homepic.height = 254
	}
else	{
	document.homepic.width = 254
	document.homepic.height = 193
	}
}

function PicRight(pass1)
{
i = i-1
if (i<0) { i=picImages.length-1 }
document.homepic.src = "images/Gallery/KCRW/" + picImages[i]
if (picSize[i]==0) { 
	document.homepic.width = 193
	document.homepic.height = 254
	}
else	{
	document.homepic.width = 254
	document.homepic.height = 193
	}
}

function goBack() {
	window.location.href = document.referrer
}

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {

	alert("Oops!");
	window.status = "No Right Click";
	return false;
	}
return true;
}
