////============================================
//// expo06a.js, 05/12/09, by ralph abraham
//// draw two lines, same color
//// from, expo06.js, add cw and ch 

//// GLOBAL VARS

	var cw;  // canvas width, set later in base00
	var ch;  // canvas height, set later in base00

//// SETUP

	// wait for the browser to load
	window.onload = function() {
	// set up background basic template
		base00(); // draw entire canvas, set global vars
	};
	
    // setup single white canvas
	function base00()  {
		var canvas = document.getElementById("canvas"); // only one canvas
		var ctx = canvas.getContext("2d");
		cw = canvas.width;
		ch = canvas.height;
		// setup whole rectangle (x0, y0, width, height)
		// ctx.clearRect(0, 0, cw, ch);
 		ctx.fillStyle = "white"; //  white
 		ctx.fillRect (0, 0, cw, ch);
	};
	
	// action for tap event
	document.onclick = function(ev) { // may need mouseup
		var xnow = ev.clientX; // may need ev.X or ev.layerX, etc
  		var ynow = ev.clientY;
  		alert ("doc coords: (" + xnow + ", " + ynow + ")");
	};
    
////////// END ///////////