	
	
	function addAnEvent(el,type,listener,useCapture) {												//usage addAnEvent($('signin'),"click",sign_in,false);
		
		if(typeof el == 'string') {el = document.getElementById(el);}
		
		if(!el){return false;}
		
		if(document.addEventListener) {																// W3C DOM Level 2 Events - used by Mozilla, Opera and Safari
			
			if(!useCapture) {useCapture = false;} else {useCapture = true;}
			el.addEventListener(type,listener,useCapture);
		} else {																					// MS implementation - used by Internet Explorer
			el.attachEvent("on"+type, listener);
		}
	}
	
	
	function removeAnEvent(el,type,listener,useCapture) {
	 
		if(typeof el == 'string') {el = document.getElementById(el);}
		
		if(!el){return false;}
		
		if(document.removeEventListener) {															// W3C DOM Level 2 Events - used by Mozilla, Opera and Safari
			
			if(!useCapture) {useCapture = false;} else {useCapture = true;}
			el.removeEventListener(type,listener,useCapture);
		} else {																					// MS implementation - used by Internet Explorer
			el.detachEvent("on"+type, listener);
		}
	}

	
	function stopIt(ev) {
	
		if (ev.stopPropagation) {
			ev.stopPropagation();
		} else {
			ev.cancelBubble = true;
		}
		
		if (ev.preventDefault) {
			ev.preventDefault();
		} else {
			ev.returnValue = false;
		}
	}		
	
	
	function jVoid(e) {
	
		if (e.target) { 
			thetarget = e.target;
		} else {
			thetarget = e.srcElement;
		}																							//alert("we just clicked on a link with ID " + thetarget.id + ", href of *" + thetarget.href + " and onclick of " + thetarget.onclick);
		stopIt(e);
		return false;
	}

	
	window.addEvent('domready',start_up);															//this uses the addEvent() function from mootools - maybe we should try using *our* addAnEvent() ???
	

	function start_up() {																			///// >>> NOTE: we need to create a clock image (animated gif?) to put in the site as a default which will be removed with javascript at page load										
	
		var timeit	= setTimeout(init_clock,"100");
		pause_clock(3000);
		
		var most_t	= setTimeout(get_panes,"300");													///// just do this on the pages where there ARE	fly-in elements...							
		fbksetup();																					
		var rndbox	= setTimeout(roundem,"10");														
		var dimit	= setTimeout(un_shade,"100");													

//		addAnEvent($('signin_lnk'),"click",sign_in,false);											//alert("after signin");// WAS onclick="sign_in(); return false;" >>> NOTE: this event handler is added BEFORE the jVoid event handler <<<
		addAnEvent($('join_lnk'),"click",join_sp,false);											//alert("after signin");// WAS onclick="sign_in(); return false;" >>> NOTE: this event handler is added BEFORE the jVoid event handler <<<

		the_links	= document.getElementsByTagName("a");											// this prevents the default action (i.e. location = href) for any links with rel="j-void", *IF* javascript is working...	
		
		for (i=0; i<the_links.length; i++) {
			var linkObj	= the_links[i];
		
			if (linkObj.rel.indexOf("j-void")!=-1) {
				addAnEvent(linkObj,"click",jVoid,false);
			}
		
			if (linkObj.rel.indexOf("shopage")!=-1) {
				addAnEvent(linkObj,"click",sho_page,false);
			}
		}																								
		init_fbk_morph();																				
//		MochaUI.NewWindowsFromHTML 	= new MochaUI.NewWindowsFromHTML();
//		MochaUI.Modal 				= new MochaUI.Modal();												
	}		


	function inject_js(js_url) {
	
		var s			= document.createElement('SCRIPT');
		s.id			= "pbjs";
		s.type			= "text/javascript";
		s.language		= "javascript";
		s.src			= js_url;
		document.body.appendChild(s);
	}
	

	function setCookie(cookieName,ID) {																//	This function creates a ONE QTR lifetime cookie with the name 
		
		var expire 		= new Date();																//	provided in the "cookieName" parameter and the value provided
		var oneMinute 	= expire.getTime() + (60 * 1000);											//	in the "ID" parameter
		var threeMin 	= expire.getTime() + (3 * 60 * 1000);
		var oneHour 	= expire.getTime() + (60 * 60 * 1000);
		var oneDay 		= expire.getTime() + (24 * 60 * 60 * 1000);
		var oneQTR 		= expire.getTime() + (91 * 24 * 60 * 60 * 1000);
		expire.setTime(oneQTR);
		var exp 		= expire.toGMTString();
		var cookie_str 	= cookieName + "=" + ID + "; " + "expires=" + exp;
		document.cookie	= cookie_str;	
	} 


	function deleteCookie(cookieName) {																//alert('deleting ' + cookieName + ' cookie');
		
		var expire2 	= new Date();																//	in the "ID" parameter
		var dayAgo 	= expire2.getTime() - (24 * 60 * 60 * 1000);
		expire2.setTime(dayAgo);
		var exp2 		= expire2.toGMTString();
		var cookie_str 	= cookieName + "=0; " + "expires=" + exp2;									//alert('cookie_str is ' + cookie_str);
		document.cookie	= cookie_str	;
	} 

	
	function getCookieVal(offset) {																	//	This function returns the value of a cookie when given
		
		var endstr = document.cookie.indexOf(";",offset);											//	it's offset inside the cookie string.  The function
		
		if (endstr == -1) {																			//	getCookie(name) is used to find the offset inside the
			endstr = document.cookie.length;														//	cookie string for a cookie with a given name
		}									
		return unescape(document.cookie.substring(offset,endstr));
	}

	
	function getCookie(name) {																		//	This function returns the offset within the cookie string
		
		var arg 	= name + "=";																	//	for the particular cookie whose name is provided to it.										
		var alen	= arg.length;																	//	In order to get a value from a name, this function AND						
		var clen 	= document.cookie.length;														//	getCookieVal(offset) must be used.
		var i 		= 0;
		
		while (i < clen) {
			var j = i + alen;
			
			if (document.cookie.substring(i,j) == arg)
				return getCookieVal(j);
			i = document.cookie.indexOf(" ", i) + 1;
			
			if (i == 0) break;
		}
		return null;
	}

	
	function submitenter(myfield,e) {																//alert("submitenter");
		
		var keycode;
		
		if (window.event) { 
			keycode = window.event.keyCode;
		} else if (e) { 
			keycode = e.which;
		} else {
			return true;
		}
		
		if (keycode == 13) {
		  
		  if (myfield.form.name=="site_login") {													//alert("site_login form");
			validate();
		  } else {																					//alert("arbitrary form");
			myfield.form.submit();
		  }
		   return false;
		} else {
		   return true;
		}
	}


	function validate_zip(zip_input) {
	
		if (zip_input.length>5 || zip_input.length<5) {
			alert("Please input a 5-digit Zipcode");
		} 
	}
	
	
	function new_t_srch() {																			//this function is called when the 'search' button is clicked
	
		error = "";
		
		if (document.t_srch_frm.zipcode.value=="") { 
			error += "Please input your Zipcode"; 
			//check for a cookie, since there were no parameters submitted...
			if (getCookie('t_srch_frm')) {															//alert("there was a cookie!");
				////check to see if cookie has data in both fields?
					fill_form(t_srch_frm);
				error = ""; 																		//reset the error message, so there will not be a pop-up
			}
		} 
		
		if (error!="") {
			error += "\n\n - and then click Search to find Tutors!";
			MochaUI.notification(error);
		} else {																					//save form element values in a cookie
			save_form('t_srch_frm');
			document.t_srch_frm.real_search.value	= "1";
			document.t_srch_frm.submit();
		}
	}		
	
	
	function save_form(form_name) {
	
		inputs_array	= document.forms[form_name].elements;										//alert("the " + form_name + " form has " + inputs_array.length + " elements");
		p_string	= "";
		
		for (i=0; i<inputs_array.length; i++) {
			p_name	= inputs_array[i].name;															
			p_value	= inputs_array[i].value;														
			
			if (p_name=="real_search") { p_value = "0"; }
			
			if (i>0) { p_string += "&"; }
			p_string	+= p_name + "=" + p_value;													
		}
		save_name	= form_name;																	
		setCookie(save_name, p_string);																
	}
	
	
	function fill_form(form_name) {
	
		answer	= getCookie(form_name);																//alert("the answer for a real cookie is *" + answer +"*");
		par_arr	= answer.split("&");																/////WHAT ABOUT the case where there is only ONE form element? - not possible, because every form also has a hidden input with the form name...
		
		for (i=0; i<par_arr.length; i++) {
			p_parts	= par_arr[i].split("=");
			p_name	= p_parts[0];
			p_value	= p_parts[1];
			document.forms[form_name].elements[p_name].value = p_value;
			/// NEED special p_name convention to identify sliders, so that the slider positions can be set here too...
		}
	}
	
	
	var clock_scale	= "0.3";
	var clock_run	= null;
	
	
	function init_clock() {
		
		clock();
		clock_run	= setInterval(clock,"1000");
	}
	
	
	function pause_clock(msec) {	//alert(msec);
	
		clearInterval(clock_run);
//			if (msec >= 100) {
			setTimeout(init_clock,msec);
//			}
	}
	
	
	function clock() {
		
		var scale	= parseFloat(clock_scale);
		var line_x	= 1;
		
//		if (ie) { line_x = scale; }																//this was needed in older excanvas versions, to scale the linewidths properly
		
		var now 	= new Date();

		if (!$('cool_clock')) {
			
			if (ie) { 																			//alert("we are emulating canvas"); 

///				var cc		= new Canvas({														//this section uses mootools canvas by olmo maldonado	//				var cc 		= new Canvas('cool_clock');
///					id: 'cool_clock',
///					width: 150,
///					height: 150
///				});

				var cc 				= document.createElement('CANVAS');							//this section uses google excanvas
				$('header').appendChild(cc);
				G_vmlCanvasManager.initElement(cc);
				
				cc.id				= 'cool_clock';
				cc.style.width		= 150;
				cc.style.height		= 150;
				cc.style.position	= 'absolute';												//from here down is presumably the same for mootools canvas or google excanvas
				cc.style.top		= '-20px';
				cc.style.left		= '420px';
			} else {				
				var cc 				= document.createElement('CANVAS');
				cc.id 				= 'cool_clock';
				cc.width			= 150;
				cc.height			= 150;
				cc.style.position	= 'absolute';
				cc.style.top		= '-20px';
				cc.style.left		= '420px';
				$('header').appendChild(cc);
			}

//			$('header').appendChild(cc);
		}
		
		var ctx 	= $('cool_clock').getContext('2d');
		
		ctx.save();
		ctx.clearRect(0,0,150,150);
		ctx.translate(75,75);
		ctx.scale(scale,scale);
		
		ctx.beginPath();
		ctx.lineWidth = 14*line_x;																	//ie does not scale line widths, so we are doing it *manually* (excanvas bug?)
		
		ctx.strokeStyle = '#993399';																//#325FA2
		ctx.arc(0,0,138,0,Math.PI*2,true);
//			ctx.fillStyle	= "#d8d8d8";															//used for reflection background...
		ctx.fillStyle	= "white";					
//			ctx.fillStyle = "#FFFFDD";																//light tan color matching inside of srchbar subject input field
		ctx.fill();																					// fill before (under) stroke to save stroke width
		ctx.stroke();

		ctx.rotate(-Math.PI/2);
		ctx.strokeStyle = "black";
		ctx.fillStyle = "white";
//			ctx.fillStyle = "#FFFFDD";																//light tan color matching inside of srchbar subject input field
		ctx.lineWidth = 8*line_x;
		
		ctx.lineCap = "round";			
		
		// Hour marks
		ctx.save();
		for (i=0;i<12;i++){
			ctx.beginPath();
			ctx.rotate(Math.PI/6);
			ctx.moveTo(100,0);
			ctx.lineTo(120,0);
			ctx.stroke();
		}
		ctx.restore();
	
		// Minute marks
		ctx.save();
		ctx.lineWidth = 5*line_x;
		for (i=0;i<60;i++){
			if (i%5!=0) {
				ctx.beginPath();
				ctx.moveTo(117,0);
				ctx.lineTo(120,0);
				ctx.stroke();
			}
			ctx.rotate(Math.PI/30);
		}
		ctx.restore();
	  
		var sec = now.getSeconds();
		var min = now.getMinutes();
		var hr  = now.getHours();
		hr = hr>=12 ? hr-12 : hr;
	
		ctx.fillStyle = "black";
	
		// write Hours
		ctx.save();
		ctx.rotate( hr*(Math.PI/6) + (Math.PI/360)*min + (Math.PI/21600)*sec )
		ctx.lineWidth = 14*line_x;
		ctx.beginPath();
		ctx.moveTo(-20,0);
		ctx.lineTo(80,0);
		ctx.stroke();
		ctx.restore();
		
		// write Minutes
		ctx.save();
		ctx.rotate( (Math.PI/30)*min + (Math.PI/1800)*sec )
		ctx.lineWidth = 10*line_x;
		ctx.beginPath();
		ctx.moveTo(-28,0);
		ctx.lineTo(112,0);
		ctx.stroke();
		ctx.restore();
		
		// Write seconds
		ctx.save();
		ctx.rotate(sec * Math.PI/30);
		ctx.strokeStyle = "#ff6600";	//ff6600	//#D40000
		ctx.fillStyle = "#ff6600";					//#D40000
		ctx.lineWidth = 6*line_x;
		ctx.beginPath();
		ctx.moveTo(-30,0);
		ctx.lineTo(83,0);
		ctx.stroke();
		ctx.beginPath();
		ctx.arc(0,0,10,0,Math.PI*2,true);
		ctx.fill();
		ctx.beginPath();
		ctx.arc(95,0,10,0,Math.PI*2,true);
		ctx.stroke();
		ctx.fillStyle = "#555";
		ctx.arc(0,0,3,0,Math.PI*2,true);
		ctx.fill();
		ctx.restore();
/*		
		//attempt at crystal reflection - works if the clock face is not white...
		ctx.save();
//		ctx.moveTo(0,0);
		ctx.rotate(Math.PI/2);
		ctx.beginPath();
		ctx.fillStyle = 'rgba(250, 250, 250, .4)';  
		ctx.arc(0, 0, 130, 0, Math.PI, true);
		ctx.bezierCurveTo(0, -50,   0, -50,   130, 0);		//was 60, 80,   100, 80,    196, 100    
		ctx.fill();
		ctx.restore();
*/		
		ctx.restore();																				// this last restore *undoes* the initial ctx.scale cmd
	}
	
	
	function get_panes() {																			//this is only relevant on the page(s) with the 9 panes, & causes an error otherwise, so we check to see if the grid is there
	
		if ($('top_left')) {																		//check for the existence of the grid of panes...
			
			var tl_locChange = new Fx.Morph('top_left', { 'duration': 450 });
			tl_locChange.start({ 'left': 5 });

			var ml_locChange = new Fx.Morph('mid_left', { 'duration': 500 });
			ml_locChange.start({ 'left': 5 });

			var bl_locChange = new Fx.Morph('bot_left', { 'duration': 550 });
			bl_locChange.start({ 'left': 5 });
			
			var tc_locChange = new Fx.Morph('top_center', { 'duration': 300 });
			tc_locChange.start({ 'left': 230 });

			var mc_locChange = new Fx.Morph('mid_center', { 'duration': 350 });
			mc_locChange.start({ 'left': 230 });

			var bc_locChange = new Fx.Morph('bot_center', { 'duration': 400 });
			bc_locChange.start({ 'left': 230 });
			
			var tr_locChange = new Fx.Morph('top_right', { 'duration': 50 });
			tr_locChange.start({ 'left': 455 });

			var mr_locChange = new Fx.Morph('mid_right', { 'duration': 100 });
			mr_locChange.start({ 'left': 455 });

			var br_locChange = new Fx.Morph('bot_right', { 'duration': 150 });
			br_locChange.start({ 'left': 455 });
		}
	}
	
	
	function fbksetup() {
	
		$('morpher').style.opacity	= "0.1";
		$('morpher').style.left	= "-1500px";
		$('morpher').style.backgroundPosition	= "0px 0px";
		fbk_entry();
	}
	
	
	function fbk_entry() {
	
		var fb_opaChange = new Fx.Morph('morpher', { 'duration': 400 });
		fb_opaChange.start({ 'opacity': 1.0 });
		var fb_locChange = new Fx.Morph('morpher', { 'duration': 400 });
		fb_locChange.start({ 'left': 726 });
		msg2	= setTimeout(fbk2click,"2000");
		msg3	= setTimeout(fbk2beta,"4000");
	}
	
	
	function fbk2click() {
	
		$('morpher').style.backgroundPosition	= "0px -25px";
	}
	
	
	function fbk2beta() {
	
		$('morpher').style.backgroundPosition	= "0px -76px";
	}
	
	
	function fbk2beta_on() {
	
		$('morpher').style.backgroundPosition	= "0px -50px";
	}
	
	
	function send_fdbk() {																			//alert("send feedback!");
	
		var the_fields	= document.fdbk_form.elements;
		var params_str	= "";

		for (i=0; i<the_fields.length; i++) {
			params_str += the_fields[i].name + "=" + the_fields[i].value + "&";
		}																							//alert("the query string is: " + params_str);
					
		j_url	= "includes/sub_pgs/feedback.php";													//here we send this info to the database using a_call
		a_call(j_url, params_str);																	// usage: results = a_call(url, send_data, spill_it, isAsync, false); or just results = a_call(url, send_data, spill_it);
		$('fdbk_form').style.display	= 'none';
		$('fdbk_thanks').style.display 	= 'block';
		setTimeout(finish_fbk,2500);
	}
	
	
	function finish_fbk() {
	
		pause_clock('1500');
		myMorph.start('.morph1');
		setTimeout("$('fdbk_form').style.display='none';$('fdbk_thanks').style.display='none';",500);		
		un_shade();
	}


	function show_form() {
	
		$('fdbk_thanks').style.display 	= 'none';
		$('fdbk_form').style.display 	= 'block';
	}
	
	
	function fbk2form() {
	
		clearTimeout(msg2);
		clearTimeout(msg3);
		$('morpher').style.backgroundPosition	= "0px -100px";
	}
	
	
	function roundem() {																			//alert("roundem");
	
		var the_boxes		= $('box').getElements('div[class$=rounded]'); 							//alert("got here"); //get all div tags with class 'rounded' ////NOTE this is written in such a way that 'rounded' has to be AT THE END of the class declaration...
	
		for (i=0; i<the_boxes.length; i++) {	
			var the_length 	= the_boxes.length; 													//alert("i is now " + i + " and the_boxes.length is " + the_length);
			var the_box		= the_boxes[i];
			var the_class	= the_box.className;													//alert("the classname name of this box is " + the_class);
			var the_id		= the_box.id;
			var rnd_params	= "";
			var par_list	= "";
			
			if (the_class.indexOf('rnd_')!= -1) {													//alert("we found a rnd_ in the className"); // the rnd box params are specified
				the_classes	= the_class.split(" ");
				
				for (j=0; j<the_classes.length; j++) {												//alert("j is now " + j);
					this_cls	= the_classes[j];													//alert("this_cls = " + this_cls);
					
					if (this_cls.indexOf('rnd_')!= -1) {
			//			rnd_params	= this_cls + "_div";											//alert("the div is named *" + rnd_params + "*");
			//			par_list	= $(rnd_params).getComputedStyle('font-family');	
			//			par_list	= $('rnd_1_div').getComputedStyle('font-family');	
			//			par_list	= "0,15,#d8d8ff,#e8e8e8,#cccccc";
			//			par_list	= "0,15,#d8d8d8,#e8e8e8,#ccccff";
						
						if (this_cls.indexOf('rnd_1')!= -1) {
							par_list	= "0,15,#ffffff,#ffffd0,#aaaaff";							//"0,15,#ffffff,#ffffe8,#ccccff"
						} else if (this_cls.indexOf('rnd_2')!= -1) {
							par_list	= "0,15,#ffffff,#ffffe8,#EB7C33";
						}
					}
				}
			} else {																				//alert("default parameters");
				par_list	= "0,13,#ffffff,#ffffff,#C0C0C0";
			}																						//alert("par_list for the div with id " + the_id + " is " + par_list);
			var box_id		= the_box.id;
			var the_height	= the_box.offsetHeight;													//alert("the the_height of this box is " + the_height);
			var the_width	= the_box.offsetWidth;													//alert("the the_width of this box is " + the_width);
//      		var the_pos		= the_box.style.position;
			
			//here we should delete the prior canvas element, if there is one...
			if ($(box_id + "_cn")) {
				var old_cn_box	= $(box_id + "_cn");												//alert("before delete");
				old_cn_box.parentNode.removeChild(old_cn_box);										//alert("after delete");
			}
			
			//this section is for use with google excanvas
			var s = document.createElement('CANVAS');
			the_box.appendChild(s);
			
			if (typeof window.G_vmlCanvasManager!="undefined") { 									//alert("we are emulating canvas"); //a friendlier way to check to see if we're in IE emulating Canvas
				G_vmlCanvasManager.initElement(s);
				s.style.width	= the_width;
				s.style.height	= the_height;
			} else {				
				s.width			= the_width;
				s.height		= the_height;
			}
			s.id 				= box_id + "_cn";													//here we create a new canvas element

/*
			//this section is for use with the mootools canvas library by Olmo Maldonado, <http://ibolmo.com/>
			if (ie) { 																				//alert("we are emulating canvas"); //a friendlier way to check to see if we're in IE emulating Canvas
				var s = new Canvas({
					id: box_id + "_cn",
					width: the_width,
					height: the_height
				});
			} else {
				var s = document.createElement('CANVAS');
			s.id			= box_id + "_cn";														//here we create a new canvas element
			s.width			= the_width;
			s.height		= the_height;
			}
*/

///			s.id				= box_id + "_cn";													//here we create a new canvas element
			s.style.position	= "absolute";
//			s.style.position	= the_pos";
			s.style.top		= "0px";
			s.style.left	= "0px";
			s.style.zIndex	= -1;
			
///			the_box.appendChild(s);																	//alert("got past the_box.appendChild(s)");
			var ctx				= s.getContext('2d');												//alert("s.getContext");
			par_list		= par_list.replace(/\"/g,'');
			var all_params	= the_width + "," + the_height + "," + par_list;						//alert("all_params for the div with id " + the_id + " is " + all_params);
			roundedRect2(ctx,all_params);
		}
	}

	
	function roundedRect2(ctx,par_list) {															//alert("roundedRect2 - the par_list is: " + par_list);  //par_list: bx_wd,bx_ht,mgn,rd_r,rd_g1,rd_g2,rd_s		//width, height, margin, radius, gradient_color_1, gradient_color_2, stroke_color
																									// what about an opacity parameter?	
		var rnd_params	= par_list.split(',');
					
		x		= parseFloat(0.5 + parseFloat(rnd_params[2]));					//alert("x = " + x);			
		y		= parseFloat(0.5 + parseFloat(rnd_params[2]));					//alert("y = " + y);					
		width	= parseFloat(parseFloat(rnd_params[0])-1-2*parseFloat(rnd_params[2]));		
		height	= parseFloat(parseFloat(rnd_params[1])-1-2*parseFloat(rnd_params[2]));		
		radius	= parseFloat(rnd_params[3]);						
		rd_g1	= rnd_params[4];					//gradient color 1					
		rd_g2	= rnd_params[5];					//gradient color 2					
		rd_s	= rnd_params[6];					//outline stroke					
			
		ctx.lineWidth	= 1;
		
		ctx.beginPath();
		ctx.moveTo(x,y+radius);
		ctx.lineTo(x,y+height-radius);
		ctx.quadraticCurveTo(x,y+height,x+radius,y+height);
		ctx.lineTo(x+width-radius,y+height);
		ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius);
		ctx.lineTo(x+width,y+radius);
		ctx.quadraticCurveTo(x+width,y,x+width-radius,y);
		ctx.lineTo(x+radius,y);
		ctx.quadraticCurveTo(x,y,x,y+radius);

		var lingrad = ctx.createLinearGradient(0,0,0,height);										// Create gradient
		lingrad.addColorStop(0, rd_g1);
		lingrad.addColorStop(1, rd_g2);
		
		ctx.fillStyle = lingrad;																	// assign gradient to fill style - or use a solid color? (just using identc
		ctx.strokeStyle = rd_s;																		// assign color to stroke style
		ctx.stroke();
		ctx.fill();
	}
		
	
	var myMorph = null;
	
	
	function init_fbk_morph() {																		//the morphing of the feedback button into a modal box should now use the new fx.morph	- maybe using the class functionality					

		myMorph = new Fx.Morph('morpher', {wait: false});											//alert('init_fbk_morph');
		
		$('cancel_cmt').addEvent('click', cancel_comment);
		
		$('submit_cmt').addEvent('click', function(e){
			new Event(e).stop();									
			send_fdbk();
		});
		
		$('morph2_btn').addEvent('click', function(e){
			new Event(e).stop();																	//alert('morph2 start');
			$('shade').style.zIndex = '2';
			pause_clock('1500');
			shade_it();
			fbk2form();
			show_form();
			myMorph.start('.morph2');
		});

		$('contact_lnk').addEvent('click', comment_form);
	}


	function comment_form(e) {
		
		new Event(e).stop();
		$('shade').style.zIndex = '2';
		pause_clock('1500');
		shade_it();
		fbk2form();
		show_form();
		myMorph.start('.morph2');
	}
	
	
	function cancel_comment(e) {																
		
		new Event(e).stop();
		pause_clock('1500');
		myMorph.start('.morph1');
		setTimeout("$('fdbk_form').style.display='none'",500);		
		un_shade();
	}
	
	
	function bail_now(e) {																			alert("bail_now");
		new Event(e).stop();
		pause_clock('1500');
		myMorph.start('.morph1');
		setTimeout("$('fdbk_form').style.display='none'",500);		
		un_shade();
	}
	
	
	
	// getPageScroll()
	// Returns array with x,y page scroll values.
	// Core code from - quirksmode.org
	//
	function getPageScroll() {
	
		var yScroll;
	
		if (self.pageYOffset) {
			yScroll = self.pageYOffset;
		} else if (document.documentElement && document.documentElement.scrollTop){	 				// Explorer 6 Strict
			yScroll = document.documentElement.scrollTop;
		} else if (document.body) {																	// all other Explorers
			yScroll = document.body.scrollTop;
		}
	
		arrayPageScroll = new Array('',yScroll) 
		return arrayPageScroll;
	}
	
	
	//
	// getPageSize()
	// Returns array with page width, height and window width, height
	// Core code from - quirksmode.org
	// Edit for Firefox by pHaez
	//
	function getPageSize() {
		
		var xScroll, yScroll;
		
		if (window.innerHeight && window.scrollMaxY) {	
			xScroll = document.body.scrollWidth;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ 						// all but Explorer Mac
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { 																					// Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		
		var windowWidth, windowHeight;
		
		if (self.innerHeight) {																		// all except Explorer
			windowWidth = self.innerWidth;
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { 			// Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { 																// other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}	
		
		if (yScroll < windowHeight){																// for small pages with total height less then height of the viewport
			pageHeight = windowHeight;
		} else { 
			pageHeight = yScroll;
		}	
		
		if(xScroll < windowWidth){																	// for small pages with total width less then width of the viewport
			pageWidth = windowWidth;
		} else {
			pageWidth = xScroll;
		}
		arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
		return arrayPageSize;
	}
	
	
	function shade_it() {
		
		var arrayPageSize = getPageSize();															// this function was loaded with lightbox_cf.js
		var arrayPageScroll = getPageScroll();														// this function was loaded with lightbox_cf.js
		
		$('shade').style.height = (arrayPageSize[1] + 'px');										//alert("shadeObj.style.height is " + shadeObj.style.height + "px"); // set height of Overlay to take up whole page and show
		
		if (arrayPageScroll[1]>0) {
			$('shade').style.height	= (arrayPageSize[1] + arrayPageScroll[1] + 'px');
		}
		
		$('shade').style.display = 'block';
		$('shade').style.visibility = 'visible';
    
    	var opacityChange = new Fx.Morph('shade', { 'duration': 500 });
		opacityChange.start({ 'opacity': 0.8 });
	}
 
	
	function un_shade() {
		
    	var opacityChange = new Fx.Morph('shade', { 'duration': 500 });
		opacityChange.start({ 'opacity': 0.0 });
		
		setTimeout(shade_off,600);
	}
	
	
	function shade_off() {
	
		$('shade').style.visibility = 'hidden';
		$('shade').style.display = 'none';
	}


	var signin_btn	= "Sign In";
	
	
	function sign_in() {																			//alert("sign_in");											
	
		pause_clock(3000);
		inject_js("js/md5.js");
		
		tgt_ht	= 225;
		tgt_wd	= 400;

		new MUI.Modal({
			id: 'sign-in_box',
			title: 'Sign-in to SmartPhish',
			loadMethod: 'xhr',
			contentURL: 'includes/signin.php',
			type: 'modal',
			minimizable:false,
			
			width: tgt_wd,
			height: tgt_ht,
			
			onContentLoaded: function() {
				var currentInstance 	= MochaUI.Windows.instances.get('sign-in_box');				//alert("after currentInstance");
				var contentWrapperEl 	= currentInstance.contentWrapperEl;
				var contentEl 			= currentInstance.contentEl;
				
				if (contentEl.offsetHeight > tgt_ht) {
					contentWrapperEl.setStyle('height', contentEl.offsetHeight+24);					//alert("offsetHeight is " + contentEl.offsetHeight + ", offsetWidth is " + contentEl.offsetWidth);
				}
				
				if (contentEl.offsetWidth > tgt_wd) {
					contentWrapperEl.setStyle('width', contentEl.offsetWidth+24);					//alert("offsetHeight is " + contentEl.offsetHeight + ", offsetWidth is " + contentEl.offsetWidth);
				}
				currentInstance.drawWindow($('sign-in_box'));											
			}
		});
	}
	
	
	function sign_out() {
	
		sendata	= "logout=now";
		logout	= a_call("includes/access_jacks.php", sendata, spill_it, true, false);
	}
	
	
	function join_sp(e) {																			
	
		pause_clock(3000);
		inject_js("js/md5.js");
//		new Event(e).stop();																		//alert("after stop");
		
		tgt_ht	= 280;
		tgt_wd	= 600;

		new MUI.Modal({
			id: 'join_box',
			title: 'Join SmartPhish',
			loadMethod: 'xhr',
			contentURL: 'includes/join.php',
			type: 'modal',
			minimizable:false,
			width: tgt_wd,
			height: tgt_ht,
			
			onContentLoaded: function() {
				var currentInstance 	= MochaUI.Windows.instances.get('join_box');				//alert("after currentInstance");
				var contentWrapperEl 	= currentInstance.contentWrapperEl;
				var contentEl 			= currentInstance.contentEl;
				
				if (contentEl.offsetHeight > tgt_ht) {
					contentWrapperEl.setStyle('height', contentEl.offsetHeight+24);					//alert("offsetHeight is " + contentEl.offsetHeight + ", offsetWidth is " + contentEl.offsetWidth);
				}
				
				if (contentEl.offsetWidth > tgt_wd) {
					contentWrapperEl.setStyle('width', contentEl.offsetWidth+24);					//alert("offsetHeight is " + contentEl.offsetHeight + ", offsetWidth is " + contentEl.offsetWidth);
				}
				currentInstance.drawWindow($('join_box'));											
			}
		});
	}

	
	function sleep(delay) {
	
		var start = new Date().getTime();
		while (new Date().getTime() < start + delay);
	}	
	
	
	function thanks_delay(delay_msec) {
	
		sleep(delay_msec);
		MochaUI.alert(thanks_msg);
	}
	
	
	//sho_page function - this function allows for simple instantiation of mochaui windows from links, or programmatically in javascript
	//this assumes a link with an id of the form id="theName_lnk" where "includes/theName.php" is the relative address of the file to be loaded
	//optionally the title to the link, if there is one, will be used as the title for the window
	//also optionally, the class for the link, if there is one, can contain the pagebox width and height in the form class="WWWxHHH" where WWW is the width and HHH is the height (in pixels) 
	//
	function sho_page(e) {															
	
		if (e.target) { 
			thetarget = e.target;
		} else {
			thetarget = e.srcElement;
		}																							//alert("we just clicked on a link with ID " + thetarget.id + ", href of *" + thetarget.href + " and onclick of " + thetarget.onclick);
		
		var lnk_tgt	= false;																		//this section was created with the goal of having onclick sho_page actions for elements that were not anchor tags...
		while (!lnk_tgt) {																			// it works great for the contact me! image link on the tutor_profile page :-)
			if (thetarget.tagName!="A") {
				thetarget	= thetarget.parentNode;
			} else {
				lnk_tgt	= true;
			}
		}
		
		var tgt_id	= thetarget.id;
		var pg_name	= tgt_id.substring(0,tgt_id.length-4);											//the link id should be of the form xxxxx_lnk or xxxxx_img, where xxxxx is the page name found for this page in the `pages` table
		var aTitle	= thetarget.title;
		var sz_str	= "300x300";

		if (thetarget.className && thetarget.className.indexOf("x") != -1) {
			if (thetarget.className.indexOf(" ") != -1) {											//there is at least one space in the class parameter, there are multiple classes!
				var allcstrs = thetarget.className.split(" ");										//alert("multiple classes! - the first class is " + allcstrs[0]);
				for (i=0; i<allcstrs.length; i++) {													//alert("this className is " + allcstrs[i]);
					if (allcstrs[i].indexOf("x") != -1) {	
						sz_str = allcstrs[i];														//alert("the size className is " + sz_str);
					}
				}
			} else {
				sz_str	= thetarget.className;														//alert("sz_str is now " + sz_str);
			}
			var szParts	= sz_str.split("x");														//alert("after split");
			aWidth	= parseInt(szParts[0]);															//alert("aWidth is now " + aWidth);
			aHeight	= parseInt(szParts[1]);
		} else { 
			aWidth	= 600;
			aHeight	= 400;
		}
		
		if (thetarget.href.indexOf("?")!=-1) {														//alert("there was a query string!");
			url_pts	= thetarget.href.split("?");
			q_pts	= url_pts[1].split("&");														//alert("there was a query string, containing " + q_pts.length + " parameters");
			q_str	= "";
			for (i=0; i<q_pts.length; i++) {
				if (q_str != "") { q_str += ";"; }
				p_pts	= q_pts[i].split("=");
				q_str += p_pts[0] + ":" + p_pts[1];
			}
			a_query	= "&a_query=" + q_str;															//alert("the a_query fragment is " + a_query);
		} else {
			a_query	= "";
		}
		
		//consider performing an AJAX access here to check for Title and size info from `pages` for pg_name=pg_name... 
		//IF ACCESS IS OF THE FORM url='includes/get_pb_info.php' sendata='pg_name=XXXX' AND THE RESPONSE IS OF THE FORM 'OK title:A Great PageBox Title;width:350;height:250', THEN WE ARE PRETTY SAFE...
		
		pause_clock(3000);
		new Event(e).stop();
		new MochaUI.Window({
			id: tgt_id + '_box',
			title: aTitle,
			loadMethod: 'xhr',
			contentURL: 'includes/pageboxes.php?tgt=' + tgt_id + a_query,			
			onContentLoaded: function() {															//this actually happens *before* the page morphs into visibility...
				var html_content 		= $(tgt_id + '_box_content').innerHTML;
				var dimensions			= content_size(html_content);
				autoWidth				= dimensions[0] + 40;										//alert("content width is " + autoWidth);
				autoHeight				= dimensions[1];											//alert("content height is " + autoHeight);
				var currentInstance 	= MochaUI.Windows.instances.get(tgt_id + '_box');
				var contentWrapperEl 	= currentInstance.contentWrapperEl;
				var contentEl 			= currentInstance.contentEl;
				
				if (ie) {
					contentWrapperEl.setStyle('height', contentEl.offsetHeight + 40);				//alert("offsetHeight is " + contentEl.offsetHeight + ", offsetWidth is " + contentEl.offsetWidth);
				} else {
					contentWrapperEl.setStyle('height', contentEl.offsetHeight);					//alert("offsetHeight is " + contentEl.offsetHeight + ", offsetWidth is " + contentEl.offsetWidth);
				}


//				contentWrapperEl.setStyle('width', contentEl.offsetWidth);
				
				contentWrapperEl.setStyle('width', autoWidth);
//				currentInstance.drawWindow(windowEl);			
				currentInstance.drawWindow($(tgt_id + '_box'));
			},
			minimizable: false,
			maximizable: false,
			resizable: false,

			width: aWidth
//			height: aHeight
		});
	}	
	
	
	function quick_search(type,subject) {															//this will take a single term and perform a search of the particular type (tutor, panic, video - for now)
																									//alert("perform a search of smartPhish " + type + " using " + subject + " as the subject");
		document.location.href	= "index.php?pg=" + type + "_search_results&quick_srch=1&subject=" + subject;
	}
	
	
	function tutor_list(letter,evt) {														
	
		var srch_type	= 'tutor_lname:';															//alert("return a list of smartPhish Tutors whose " + srch_title + " names begin with " + letter);
		var srch_title	= 'last';
		
		if (!evt) { var evt = window.event; }
		
		if (evt.shiftKey) { 
			srch_type	= 'tutor_fname:';
			srch_title	= 'first';
		}
		
		if (letter=="all") { letter = ""; }
		quick_search('tutor',srch_type+letter);
	}
	
	
	function toggle_div(div_id,off_text,on_text) {													//typically off_text is something like 'more...' and off_text is something like 'less...'
	
		if (document.getElementById(div_id).style.display=="none") {
			document.getElementById(div_id).style.display	= "block";
			link_text	= on_text;
		} else {
			document.getElementById(div_id).style.display	= "none";
			link_text	= off_text;
		}
		
		if (off_text && on_text) {
			return link_text;
		} else {
			return false;
		}
	}
	
	
	function spill_it(xhr_data) {														

		if (xhr_data.indexOf("OK")==-1) {
			alert(xhr_data);																		// responseText did not contain "OK" - throw alert with error message
			return false;
		} else {																					// parse response data for what to do next
			
			if (xhr_data.indexOf("eval(")!=-1) {													// successful remote operation means parameters can be returned in the responseText, as can function calls...
				var params = xhr_data.substr(xhr_data.indexOf("eval(")); 							////// modify the php pages so that the string returned and checked for is NOT the normal "eval(" that might be part of the returned page...	
				eval(params.substr(5));
			} else if (xhr_data.indexOf("data|:")!=-1) {											// for this situation, where list.php is providing a list of files to make a menu, we will use synchronous requests?
				var list_str 	= xhr_data.substr(xhr_data.indexOf("data|:") + 6); 		
				
				if (list_str === "") { list_str = false; }
				return list_str;
			} else {
				return xhr_data;																	// responseText contained "OK" - return response data (to program that called ajax request) for further processing							
			}
		}
	}


	function a_call(url, send_data, callback_function, isAsync, return_xml) {						// usage: results = a_call(url, send_data, spill_it, isAsync, false); or just results = a_call(url, send_data);

		if (send_data!="") { send_data = encodeURI(send_data); }

		var HR 		= false;															
		
		if (window.XMLHttpRequest) { 				// Mozilla, Safari,...								
			HR = new XMLHttpRequest();													
			
			if (HR.overrideMimeType) {
				HR.overrideMimeType('text/html');	
		   }
		} else if (window.ActiveXObject) { 			// IE
			try {
				HR = new ActiveXObject("Msxml2.XMLHTTP");								
			} catch (e) {
				try {
					HR = new ActiveXObject("Microsoft.XMLHTTP");						
				} catch (e) {}
			}
		}
		
		if (!HR) {
			alert("Unfortunately your browser doesn't support this feature.");
			return false;
		}
		
		if (isAsync) {																				// this section is skipped when the XHR is synchronous, because the readystatechage action is not needed then
			HR.onreadystatechange = function() {	

			  	if (HR.readyState == 4) {															
					
					if (HR.status == 200) {													
						
						if (return_xml) {													
							eval(callback_function(HR.responseXML));						
						} else {															
							eval(callback_function(HR.responseText));						
						}
					} else {
						
						if (HR.status != 0) {
							alert('There was a problem with the request.(Code: ' + HR.status + ')');
						}
					}
				}
			};
		}
		
		if (send_data === "") {																		// no send_data means this is a GET request, where the data is all in a url query string
			HR.open('GET', url, isAsync);												
			HR.send(null);																
		} else {																		
			HR.open('POST', url, isAsync);												
			HR.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			HR.send(send_data);															
		}
		
		if (!isAsync) { if (return_xml) { return HR.responseXML; } else { return HR.responseText; } }
	}
	

	function entsub(event,ourform) {
  
		if (event && event.which == 13) {
			ourform.submit();
		} else {
			return true;	
		}
	}
	
	
	var auto_div = null;
	
	
	function autosuggest(divname) {
	
		auto_div	= divname;
		
		term_input	= document.t_srch_frm.subject;
		sess_subj	= false;
		if (divname.indexOf("sess")!=-1) {
			term_input	= document.book_session.subject_input;
			sess_subj	= true;
		}
		
		if (term_input.focused && term_input.value.length>=3) { 
			var url			= "includes/sub_pgs/subj_suggest.php";
			var send_data	= "terms="+term_input.value;
			if (sess_subj) { 
				send_data	+= "&sess_subj=1";
			}
			var sent_it		= a_call(url, send_data, suggest_this, true, false);
			return false;
		} else if ($(divname).style.visibility == "visible") {
			fade_out(divname);
		}
	}
	
	
	function suggest_this(xhr_data) {																//alert("suggest_this");
	
		if (xhr_data.indexOf("OK")==-1) {
//			alert(xhr_data);																		// responseText did not contain "OK" - throw alert with error message
			if ($(auto_div).style.visibility != "hidden") { 										//hide the autosuggest box here?
				$(auto_div).style.visibility = "hidden"; 
			}
			return false;
		} else {																					// parse response data for what to do next
			if (xhr_data.indexOf("eval(")!=-1) {													// successful remote operation means parameters can be returned in the responseText, as can function calls...
				var params = xhr_data.substr(xhr_data.indexOf("eval(")); 							////// modify the php pages so that the string returned and checked for is NOT the normal "eval(" that might be part of the returned page...	
				eval(params.substr(5));
			} else if (xhr_data.indexOf("data|:")!=-1) {											// for this situation, where list.php is providing a list of files to make a menu, we will use synchronous requests?
				var list_str 	= xhr_data.substr(xhr_data.indexOf("data|:") + 6); 		
				if (list_str === "") { list_str = false; }
				return list_str;
			} else {
				$(auto_div).innerHTML = xhr_data;
				$(auto_div).style.visibility = "visible";
    			var opacityChange = new Fx.Morph(auto_div, { 'duration': 250 });
				opacityChange.start({ 'opacity': 1.0 });
			}
		}
	}
	
	
/*

$('sess_auto_box').style.left = $('subject_input').offsetLeft + $('subject_input').parentNode.offsetLeft + $('subject_input').parentNode.parentNode.parentNode.parentNode.offsetLeft + "px";

$('sess_auto_box').style.top = $('subject_input').offsetTop + $('subject_input').parentNode.offsetTop + $('subject_input').parentNode.parentNode.parentNode.parentNode.offsetTop + parseInt($('subject_input').getComputedStyle('height')) + "px";

*/
		
	
	var fading	= null;
	
	
	function fade_out(div_id) {																		//MochaUI.notification("fade_out");			
	
		fading	= div_id;
		setTimeout(fade_it,200);
	}
	
	
	function fade_it() {																			//MochaUI.notification("fade_it");
	
    	var opacityChange = new Fx.Morph(fading, { 'duration': 500 });
		opacityChange.start({ 'opacity': 0.0 });
		var reset	= setTimeout(hide_it,600);
	}
	
	
	function hide_it() {
	
		$(fading).style.visibility	= "hidden";
	}

	
	function pick_srch(e) {
	
		var the_terms	= e.target.innerHTML;														//alert("the search suggestion clicked was " + the_terms);
		document.srch_frm.srch_params.value	= the_terms;
		$('auto_box').style.visibility = "hidden";
		$('auto_box').innerHTML = "";
//		return false;
	}
	
	
	function search_word(the_word) {
	
		document.t_srch_frm.subject.value = the_word;
		document.t_srch_frm.suggested.value = "1";
		new_t_srch();
	}
	
	
	function search_subj(subj_id, safe_title, the_word) {
	
		subj_title	= safe_title.replace("^","'");
		document.t_srch_frm.subject.value = the_word + " [" + subj_id + "] " + subj_title;
		document.t_srch_frm.suggested.value = "1";
		new_t_srch();
	}
	
	
	function pick_subj(subj_id, safe_title, the_word) {
	
		subj_title	= safe_title.replace("^","'");
		document.book_session.subject_input.value = subj_title;
		document.book_session.session_subject.value = subj_id;
		if ($(auto_div).style.visibility == "visible") {
			fade_out(auto_div);	
		}
	}

			
	function watchlist(tutor_id,user_id) {															//alert("watchlist - tutor_id " + tutor_id + " will be added to the watchlist of user_id " + user_id);
	
		a_url		= "includes/sub_pgs/watchlist.php"												//use ajax to add tutor_id to user_wlist for the `users` record with id='user_id' and return a success message that will show up in a notification box
		send_data	= "op=add&uid=" + user_id + "&tid=" + tutor_id;
		a_call(a_url, send_data, watchlist_rtn, true, false);														//alert(wl_msg); //results = a_call(url, send_data, spill_it, isAsync, false); or just results = a_call(url, send_data, spill_it); how about a_call(url, send_data) or a_call(url) ?
	}
	
	
	function watchlist_rtn(xhr_data) {
	
		MochaUI.notification(xhr_data,"auto");
	}
	
	
	
	function aa_form(form_element) {																//the div to be populated with the returned html should be specified in the form 'return_elm' input 
		
		var the_list	= "";																	
		var send_data	= "";
		var result_div	= "";
		var the_action	= form_element.action;
		var the_elmts	= form_element.elements;
		
		if (form_element.sp_password && form_element.salt && form_element.hash) {					//passwords will be hashed & submitted automatically if using the inputs 'sp_password', 'salt' and 'hash'
			inject_js("js/md5.js");
			var the_salt	= form_element.salt.value;
			var pwd_input	= form_element.sp_password.value;
			var pwd_hash	= hex_md5(pwd_input);
			var uid			= this_user;
			var new_hash	= hex_md5(the_salt+pwd_hash+uid); 
			form_element.hash.value			= new_hash;			
			form_element.sp_password.value 	= "sorry, no password here!";
		}
		
		var e_ct		= the_elmts.length;														
		for (i=0; i<e_ct; i++) {
			var elmt	= the_elmts[i];
			the_name	= elmt.name;
			if (the_name.length > 2 && the_name!="pt1_user_pwd_hash" && the_name!="pt2_user_pwd_hash") {		//create an array of 'never sent' fieldnames and check that list here?
				the_type	= elmt.type;
				if (the_type!="checkbox" || elmt.checked) {
		//			the_value	= elmt.value;
					the_value	= encodeURIComponent(elmt.value);
					if (send_data!="") { send_data += "&"; }
					send_data += the_name + "=" + the_value;
				}
			}
			
			if (the_list!="") { the_list += ", \n\n"; }
			the_list += "the element named *" + the_name + "* is of type " + the_type + " and has a value of *" + the_value + "*";
		}
///			send_data	= somefunction(send_data); //////NEED A WAY OF URL ENCODING send_data HERE!!
		
		the_list +=	"\n\n the form will be submitted to *" + the_action + "* using AJAX";
		the_list +=	"\n\n send_data is *" + send_data + "*";										//alert(the_list);
		sent = a_call(the_action, send_data, aa_return, true, false);												
	}
	
	
	function aa_return(xhr_data) {		//callback function for aa_form inserts returned text/html content in an element that can be speciifed in the return text/html itself, or inserts it into a MochaUI notification or alert

		if ($("mocha_loading")) {
			MochaUI.closeWindow($("mocha_loading"));
		}
		
		if (xhr_data.indexOf("eval(")!=-1) {													
			var params = xhr_data.substr(xhr_data.indexOf("eval(")); 								////// modify the php pages so that the string returned and checked for is NOT the normal "eval(" that might be part of the returned page...	
			eval(params.substr(5));
		} else if (xhr_data.indexOf("data|:")!=-1) {												// for this situation, where list.php is providing a list of files to make a menu, we will use synchronous requests?
			var list_str 	= xhr_data.substr(xhr_data.indexOf("data|:") + 6); 		

			if (list_str === "") { list_str = false; }
			return list_str;
		} else if (xhr_data.indexOf("return|:")!=-1) {												//alert("return");
			var return_str 	= xhr_data.substr(xhr_data.indexOf("return|:") + 8); 		

			if (return_str === "") { return_str = false; }
			str_pts	= return_str.split(":");
			return_elm	= str_pts[0];
			$(return_elm).innerHTML = return_str.substr(return_elm.length+1);
			rndbox	= setTimeout(roundem,"10");
		} else if (xhr_data.indexOf("notice|:")!=-1) {												//alert("notice");		the string returned from the AJAX page will have the form "notice|:" + the string to be noticed, OR "notice|:" + "wxh:WWWxHHH:" + string	
			var notice_str 	= xhr_data.substr(xhr_data.indexOf("notice|:") + 8); 		

			if (notice_str.substr(0,4)=="wxh:") {
				notice_str 		= notice_str.substr(notice_str.indexOf("wxh:") + 4);				//MochaUI.alert("notice_str is " + notice_str);
				var wxh			= notice_str.substr(0,notice_str.indexOf(":"));						//MochaUI.alert("wxh is " + wxh);
				notice_str 		= notice_str.substr(notice_str.indexOf(":") + 1);					//MochaUI.alert("notice_str is " + notice_str);
				MochaUI.notification(notice_str,wxh);
			} else {
				MochaUI.notification(notice_str);
			}
		} else if (xhr_data.indexOf("alert|:")!=-1) {												//alert("alert");						
			var alert_str 	= xhr_data.substr(xhr_data.indexOf("alert|:") + 7); 		

			if (alert_str.substr(0,4)=="wxh:") {
				alert_str 		= alert_str.substr(alert_str.indexOf("wxh:") + 4);					//MochaUI.alert("alert_str is " + alert_str);
				var wxh			= alert_str.substr(0,alert_str.indexOf(":"));						//MochaUI.alert("wxh is " + wxh);
				alert_str 		= alert_str.substr(alert_str.indexOf(":") + 1);						//MochaUI.alert("alert_str is " + alert_str);
				MochaUI.alert(alert_str,wxh);
			} else {
				MochaUI.alert(alert_str);
			}
		} else if (xhr_data.indexOf("edit|:")!=-1) {												//alert("edit");			//usage: edit|:wxh:WWWxHHH:pos:TTTxLLL:[html code for form] where WWW is width, HHH is height, TTT is top and LLL is left (all in px)
			var wxh	= false;
			var pos	= false;
			var edit_str 	= xhr_data.substr(xhr_data.indexOf("edit|:") + 6); 		

			if (edit_str.substr(0,4)=="wxh:") {
				edit_str 	= edit_str.substr(edit_str.indexOf("wxh:") + 4);						//MochaUI.alert("edit_str is " + edit_str);
				wxh			= edit_str.substr(0,edit_str.indexOf(":"));								//MochaUI.alert("wxh is " + wxh);
				edit_str 	= edit_str.substr(edit_str.indexOf(":") + 1);							//MochaUI.alert("edit_str is " + edit_str);
			}

			if (edit_str.substr(0,4)=="pos:") {
				edit_str 	= edit_str.substr(edit_str.indexOf("pos:") + 4);						//MochaUI.alert("edit_str is " + edit_str);
				pos			= edit_str.substr(0,edit_str.indexOf(":"));								//MochaUI.alert("pos is " + pos);
				edit_str 	= edit_str.substr(edit_str.indexOf(":") + 1);							//MochaUI.alert("edit_str is " + edit_str);
			}
			MochaUI.sp_edit(edit_str,wxh,pos);

/*		//add this later to facilitate multiple separate updates
		} else if (xhr_data.indexOf("update|:")!=-1) {												//alert("update");			//usage: do_updates("elem_id:innerHTML;elem_id:innerHTML;elem_id:innerHTML;elem_id:innerHTML")					
			var update_str 	= xhr_data.substr(xhr_data.indexOf("update|:") + 8); 		
			do_updates(update_str);		
*/		
		} else {
			return xhr_data;																					
		}
	}
	
/*	
	function do_updates(update_list) {																//alert("do_updates - update_list is " + update_list);
	
		var updates_arr	= update_list.split(";");
		var updates_ct	= 0;
		var errors		= "";
		for (i=0; i<updates_arr.length; i++) {
			update_pts	= updates_arr[i].split(":");
			update_id	= update_pts[0];
			update_val	= update_pts[1];
			if ($(update_id)) {
				$(update_id).innerHTML	= update_val;
				updates_ct	+= 1;
			} else {
				MochaUI.alert("There was a problem :-( <br><br>No element was found with ID " + update_id);
				errors		+= "<br>- no element was found with ID " + update_id;
			}
		}
		if (errors=="") {
			MochaUI.notification("Local updates completed successfully!");
		} else {
			MochaUI.alert("Updates were made, but... " + errors);
		}
	}
*/	
	
	
	function conf_pay(purchase_form) {																//alert("pmt_method is "+ purchase_form.pmt_method.value);
		
		if (purchase_form.pmt_method.value=="on_acct") {									
			aa_form(purchase_form);
		} else if (purchase_form.pmt_method.value=="paypal") {
			the_page	= "tutor_profile";															//if we want to use this for other payments, this page should be a variable too...
			the_user	= this_user;
			the_pmtdesc	= purchase_form.pmt_desc.value;												//alert("the_pmtdesc is "+ the_pmtdesc);
			the_prodid	= purchase_form.product_id.value;											//alert("the_prodid is "+ the_prodid);
			the_tutorid	= purchase_form.tid.value;													//alert("the_tutorid is "+ the_tutorid);
			MochaUI.loading('Loading Online Payment Form...');
			goPost('https://smartphish.com/?pg='+ the_page +'&sub_pg=ut_deposit&uid='+ the_user +'&pmt_desc='+ the_pmtdesc +'&product_id='+ the_prodid +'&tid='+ the_tutorid);

//			goPost('?pg='+ the_page +'&sub_pg=ut_deposit&uid='+ the_user +'&pmt_desc='+ the_pmtdesc +'&product_id='+ the_prodid +'&tid='+ the_tutorid);		//how to test on localhost?
		} else {
			MochaUI.alert("Unknown Payment Mehod :-(");
			return false;
		}
	}



	function tell_friends() {																		//MochaUI.alert("tell_friends()");	//this is the function that would be called by the form, to do validation and then submit
	
		if (document.tellafriend.emails.value == '') {
			MochaUI.alert('Please specify at least one email to send to!','400x100');
			return false;
		}
/*
		if (document.tellafriend.f_name && document.tellafriend.l_name && document.tellafriend.taf_uid.value=="") {
			if (document.tellafriend.f_name.value == '' || document.tellafriend.l_name.value == '') {
				MochaUI.alert('Please provide your First Name and Last Name - so your friends will know who to thank!','500x100');
				return false;
			}
		}
*/		
		aa_form(document.tellafriend);
	}
	

	function send_message() {

		if (document.sendmessage.msg_subject.value == '') {
			MochaUI.alert('Please choose a message Subject!','400x100');
			return false;
		}

		if (document.sendmessage.message_body.value == '') {
			MochaUI.alert('Please enter something in the Body of your Message!','400x120');
			return false;
		}

		aa_form(document.sendmessage);
	}

	
	var the_day	= null;
	var	the_ses	= null;
	var day_to	= null;
	var box_pos	= null;	
		
	
	function show_day(the_date,user_id,mp) {														//third parameter is only present for My Phish > Schedule case...														
	
		clearTimeout(day_to);																		//alert("the_date is " + the_date + ", user_id is " + user_id + " and mp is " + mp);
		the_day_id	= 'day_' + the_date;															//alert("the_day_id is " + the_day_id);										
		box_pos		= findPos2($(the_day_id),$('content'));

		function get_day(a_date,a_user,mp_flag) {													//here we will use AJAX to fetch the chart for a particular day
		
			var f	= function() { 
				get_url		= "includes/sub_pgs/t_day.php";											//alert("get_url was *" + get_url + "*");
				
				if (mp) { get_url = "includes/sub_pgs/ut_day.php"; }
				send_data	= "tid=" + user_id;; 													//alert("send_data was *" + send_data + "*");
				send_data	+= "&day="+the_date;
				a_call(get_url,send_data,day_return,true,false); 
			};
			
			day_to	= setTimeout(f, 300);
		}
			get_day(the_date,user_id,mp);
	}
	
	
	function day_return(xhr_data) {
	
		new_day		= xhr_data;
		the_dims	= content_size(new_day);
		the_height	= the_dims[1] + 50;	
		box_wd		= 320;																		
		box_ht		= the_height;																		
		day_wd		= 99;
		day_ht		= 99;
		wd_overlap	= 0.5;
		ht_overlap	= 0.5;
		x_over		= day_wd * wd_overlap;														
		y_over		= day_ht * ht_overlap;														
		
		if (box_pos[0]>(x_over + box_wd)) {
			delta_x	= x_over - box_wd ;
		} else {
			delta_x	= x_over;
		}
		
		if (box_pos[1]>(y_over + box_ht)) {
			delta_y	= day_ht - (box_ht + y_over);
		} else {
			delta_y	= y_over;
		}																						
		box_delta	= [delta_x,delta_y];
		nu_x		= 1*box_pos[0] + 1*box_delta[0];										
		nu_y		= 1*box_pos[1] + 1*box_delta[1];										

		$('day_schedule').style.left		= nu_x + "px";
		$('day_schedule').style.top			= nu_y + "px";
		$('day_times').style.height			= the_height + "px";
		$('day_times').innerHTML			= new_day;													//alert("after a_call()");
		roundem();
		$('day_schedule').style.visibility 	= "visible";
	}
	
	
	function hide_day() {
	
		clearTimeout(day_to);
		the_day	= setTimeout(close_day,"200");
	}


	function close_day() {
	
		$('day_schedule').style.visibility = "hidden";
	}
		

	function getStyle(el,styleProp) {

		var x = document.getElementById(el);
		if (x.currentStyle) {
			var y = x.currentStyle[styleProp];
		} else if (window.getComputedStyle) {
			var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
		}
		return y;
	}
	
	
	function findPos(obj) {

		var curleft = curtop = 0;

		if (obj.offsetParent) {

			do {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
		}
		return [curleft,curtop];
	}
	

	function findPos2(obj,refEl) {

		var curleft = curtop = 0;
		
		if (obj.offsetParent) {

			do {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
				if (obj.offsetParent==refEl) { break; }
			} while (obj = obj.offsetParent);
		}
		return [curleft,curtop];
	}
		
		
	function clean_subject() {
	
		if (document.t_srch_frm) {
			
			if (document.t_srch_frm.subject.value.indexOf('tutor_')==0 || document.t_srch_frm.subject.value.indexOf('[')==0) {
				document.t_srch_frm.subject.value = "";
			}
		}
	}
	

	function goTo2(subpage,params) {			///NOTE: in this implementation params can start with "&", or not... 	//alert("this would have used AJAX to load the subpage *" + subpage + "*");
	
		if (subpage) {
			get_url		= "includes/sub_pgs/" + subpage + ".php";									//alert("get_url was *" + get_url + "*");
			
			if (params) {
				the_params	= params;
				
				if (the_params.substring(0,1)!="&"){
					the_params	= "&"+ the_params;
				}
			} else {
				the_params	= "";
			}
//			send_data	= "uid="+ this_user +"&tid="+ this_user + the_params; 						//alert("send_data was *" + send_data + "*");
			send_data	= "uid="+ this_user + the_params; 											//alert("send_data was *" + send_data + "*");
/*
			if (document.location.href.indexOf("https://")!=-1 && subpage!="ut_deposit" && subpage!="ut_payout") {		//we are on the secure server, and should not be
				
				//complete listing of subpages & pages:	(subpages are ajax files that are loaded into 'profile' div - NOT returned in alerts or notifications or other 'panes')
				//find_a_tutor: 			(no sub pages)
				//tutor_search_results:		tsr
				//tutor_profile:			t_profile, t_feedback, t_schedule, t_book, ut_deposit
				//my_phish:					ut_profile, ut_tutoring, ut_schedule, ut_activity, ut_account, ut_settings, ut_deposit, (LATER: ut_payout, ut_messages)
				//site_doc:					(no sub pages - site_doc loads itself with the content for a particular info page without using AJAX)
				
				if (document.location.href.indexOf("smartphish.com")!=-1) { server = "http://smartphish.com"; } else { server = "http://localhost/smartPhish"; }
				
				if (subpage=="t_profile" || subpage=="t_feedback" || subpage=="t_schedule" || subpage=="t_book") { 
					main_pg = "tutor_profile"; 
				} else if (subpage=="ut_profile" || subpage=="ut_activity" || subpage=="ut_account" || subpage=="ut_tutoring" || subpage=="ut_schedule" || subpage=="ut_settings") { 
					main_pg = "my_phish"; 
				} else {
					main_pg = "find_a_tutor";
				}												//alert("url_plus_qstr is "+ server + "/index.php?pg="+ main_pg +"&"+ send_data);
				
				goPost(server + "/index.php?pg="+ main_pg +"&sub_pg="+ subpage + "&" + send_data);

///			} else if (document.location.href.indexOf("https://")==-1 && (subpage=="ut_deposit" || subpage=="ut_payout")) {	//we are NOT on the secure server, but should be - these secure pages should be called with goPost()
				
///				if (document.location.href.indexOf("smartphish.com")!=-1) { server = "https://smartphish.com"; } else { server = "https://localhost/smartPhish"; }
				
///				if (document.location.href.indexOf("tutor_profile")!=-1) { 
///					main_pg = "tutor_profile"; 
///				} else if (document.location.href.indexOf("my_phish")!=-1) { 
///					main_pg = "my_phish"; 
///				} else {
///					main_pg = "find_a_tutor";
///				}																					//alert("url_plus_qstr is "+ server + "/index.php?pg="+ main_pg +"&"+ send_data);
				
///				goPost(server + "/index.php?pg="+ main_pg +"&sub_pg="+ subpage + "&" + send_data);

			} else {	//we are on the server we need to be on, so we can use pure AJAX
				new_sub	= a_call(get_url,send_data,sub_return,true,false);							// usage: results = a_call(url, send_data, spill_it, isAsync, false); or just results = a_call(url, send_data, spill_it);
			}
*/
			new_sub	= a_call(get_url,send_data,sub_return,true,false);
		}
	}	


	function sub_return(xhr_data) {
	
		if (xhr_data.substring(0,20)=="return|:profile_div:") {
			xhr_data = xhr_data.substring(20);
		}
		$('profile_div').innerHTML	= xhr_data;														//alert("after a_call()");
		rndbox	= setTimeout(roundem,50);
		rndbox2	= setTimeout(roundem,1050);
		goto_sub	= false;
		goto_pars	= "";
/*		
		if (subpage=="ut_schedule" || subpage=="ut_activity" || subpage=="ut_account") {												/////SUBPAGE IS UNDEFINED!! - for this to work it would have to be a global variable...
			//code here to change class for user_image_edit, user_url_edit and tutor_brag_edit to icon24_hide so that icons disappear 
			
		} else if (subpage=="ut_profile") {
			//code here to change class for user_image_edit, user_url_edit and tutor_brag_edit to icon24 so that icons are visible
		
		}
*/
	}
	

	function goPost(url_plus_qstr) {
	
		if ($('post_div')) {
			document.body.removeChild($('post_div'));
		}
		
		url_pts			= url_plus_qstr.split("?");
		params			= url_pts[1];																
		par_pairs		= params.split("&");
		
		the_form		= 	'<form name="postit" method="post" action="'+ url_pts[0] +'">';
	
		for (i=0; i<par_pairs.length; i++) {
			pair_pts	= par_pairs[i].split("=");
			p_name		= pair_pts[0];
			p_value		= pair_pts[1];
			the_form	+= '<input type="hidden" name="'+ p_name +'" value="'+ p_value +'">';
		}	
		the_form		+= '</form>';
		d				= document.createElement('DIV');
		d.id			= "post_div";
		d.style.left	= "-2000px";
		d.innerHTML		= the_form;
		document.body.appendChild(d);
		document.postit.submit();
	}
	
	
	function confirm_deposit() {
	
		the_inputs	= document.deposit_form.elements;												//alert("there are "+ the_inputs.length +" input elements in the form");
		
		for (i=0; i<the_inputs.length; i++) {														
			the_name	= the_inputs[i].name;														
			the_value	= the_inputs[i].value;														
			conf_name	= "rq_"+ the_name;															
			
			if ($(conf_name)) {
				$(conf_name).innerHTML	= the_value;
			}
		}
		
		$('input_tbl').style.display	= 'none';
		$('conf_tbl').style.display		= 'block';	
	}
	
	
	function edit_pmt_info() {
	
		$('conf_tbl').style.display		= 'none';	
		$('input_tbl').style.display	= 'block';
	}


/*																										
	if (document.location.href.indexOf("tutor_profile")!=-1) {										//MochaUI.notification("we found tutor_profile!");
		goTo('t_profile');
	}

	
	var launch_loops_ct 	= 0;
	var launch_loops_max	= 20;
	
	
	function launch_profile() {
	
		goTo('ut_profile');
		setTimeout(profile_chk,100);
		launch_loops_ct++;
	}
	
	
	function profile_chk() {
	
		if (!$('basic_info') && launch_loops_ct<=launch_loops_max) {
			goTo('ut_profile');
		}
	}
	
	
	var do_it	= setTimeout(launch_profile,1000);													/////////is there some way to start this earlier and loop until it happens???
*/


	function content_size(html_content) {															//what about taking formcode and loading into a div element id="edit_size" style="position:absolute; top:20; left:20; z-index:-1; visibility:hidden;"
	
		var d				= document.createElement('DIV');
		d.id				= "content_wxh";
		d.className			= "temp_div";
		d.style.position	= "absolute";
		d.style.top			= "20px";
		d.style.left		= "20px";
		d.style.display		= "block";		
		d.style.visibility	= "hidden";
		d.style.zIndex		= -1;
		d.innerHTML			= html_content;
		document.body.appendChild(d);
		dimensions 			= new Array();
		dimensions[0]		= d.offsetWidth;
		dimensions[1]		= d.offsetHeight;														//alert("width is "+ dimensions[0] +", and height is "+ dimensions[1]);
		
		if (ie) {
//			dimensions[0] = dimensions[0] + 40;
			dimensions[1] = dimensions[1] + 0;
		}
		document.body.removeChild(d);
		return dimensions;
	}
	
	
	MochaUI.extend({

		notification: function(message,wxh){
			
			win_content	= '<table><tr><td width="200" valign="middle" align="center" class="alert" nowrap>' + message + '</td></tr></table>';
			
			if(!wxh || wxh=="auto") {
				the_dims	= content_size(win_content);
				the_width	= the_dims[0] + 24;
				the_height	= the_dims[1] + 20;
			} else {
				size_pts	= wxh.split("x");
				the_width	= parseInt(size_pts[0]);
				the_height	= parseInt(size_pts[1]);
			}
			div_height	= the_height - 20;
			new MochaUI.Window({
				loadMethod: 'html',
				content: win_content,
				type: 'notification',
				addClass: 'notification',
				width: the_width,
				height: the_height,
	//			y: 120,
				padding: { top: 10, right: 12, bottom: 10, left: 12 },
				shadowBlur: 5,
				closeAfter:1500,
				bodyBgColor: [255, 189, 110]
			});
		},
	
		alert: function(message,wxh){
		
			win_content	= '<table><tr><td valign="middle" class="alert" nowrap>' + message + '</td></tr></table>';
			
			if(!wxh || wxh=="auto") {
				the_dims	= content_size(win_content);
				the_width	= the_dims[0] + 24;
				the_height	= the_dims[1] + 20;
			} else {
				size_pts	= wxh.split("x");
				the_width	= parseInt(size_pts[0]);
				the_height	= parseInt(size_pts[1]);
			}
			new MochaUI.Window({
				id: "mocha_alert",
				title: "",
				loadMethod: 'html',
				content: win_content,
				width: the_width,
				height: the_height,
				footerHeight: 10,
				padding: { top: 10, right: 12, bottom: 10, left: 12 },
				shadowBlur: 5,
				statusBar: false,
				scrollbars: false,
				resizable: false,
				maximizable: false,
				minimizable: false,
				collapsible: false,
				contentBgColor: '#FFF',
				headerStartColor:  [255, 189, 110],
				headerStopColor:   [255, 145, 70],
				bodyBgColor: [255, 255, 255]
			});
		},
		
		loading: function(message,wxh){
		
			win_content	= '<table><tr><td width="15">&nbsp;</td><td valign="middle" class="loading_td" nowrap>' + message + '</td></tr></table>';

			if(!wxh || wxh=="auto") {
				the_dims	= content_size(win_content);
				the_width	= the_dims[0] + 24;
				the_height	= the_dims[1] + 20;
			} else {
				size_pts	= wxh.split("x");
				the_width	= parseInt(size_pts[0]);
				the_height	= parseInt(size_pts[1]);
			}

			new MochaUI.Window({
				id: "mocha_loading",
				title: "",
				loadMethod: 'html',
				content: win_content,
				width: the_width,																
				height: the_height,															
				footerHeight: 10,
				headerHeight: 10,
				padding: { top: 10, right: 12, bottom: 10, left: 12 },
				shadowBlur: 5,
//				statusBar: false,
				scrollbars: false,
				resizable: false,
				maximizable: false,
				minimizable: false,
				closable:false,
				collapsible: false,
				draggable: true,
				container: document.body,
				contentBgColor: 'transparent',
				headerStartColor:  [255, 189, 110],
				headerStopColor:   [255, 145, 70],
				bodyBgColor: [255, 255, 255]
			});
		},

		sp_edit: function(formcode,wxh,pos){
		
			if(!wxh || wxh=="auto") {																//alert("wxh is "+ wxh);
				the_dims	= content_size(formcode);
				the_width	= the_dims[0] + 24 + 40;												//alert("the_width is "+ the_width);
				the_height	= the_dims[1] + 20 + 5;													//alert("the_height is "+ the_height);
			} else {
				size_pts	= wxh.split("x");
				the_width	= parseInt(size_pts[0]);
				the_height	= parseInt(size_pts[1]);												//alert("the_width is " + the_width + " and the_height is " + the_height);
			}
		
			div_height		= the_height - 20;
			if(!pos) {
				the_top		= 300;
				the_left	= 300;
			} else {
				pos_pts		= pos.split("x");														//alert("the window outer width is " + document.window.outerWidth);
				the_top		= parseInt(pos_pts[0]);													//alert("the_top is " + the_top + " and document.html.scrollTop is " + document.html.scrollTop);
				the_top		= parseInt(pos_pts[0]) - document.html.scrollTop;						//alert("the_top after scrollTop subtracted is " + the_top);
				the_left	= parseInt(pos_pts[1]);													//alert("the_left is " + the_left + " and document.html.scrollLeft is " + document.html.scrollLeft);
				the_left	= parseInt(pos_pts[1]) - document.html.scrollLeft;						//alert("the_left after scrollLeft subtracted is " + the_left);
				
				if (the_left + the_width > document.window.outerWidth) { the_left = the_left - the_width; }
			}
			
			
			tgt_wd	= the_width;
			tgt_ht	= the_height;

			
			new MochaUI.Window({
				id: "mocha_edit",
				title: '<span style="color:#FFFFFF;">Changes will be implemented immediately</span>',
				loadMethod: 'html',
				content: formcode,
//				width: the_width,
//				height: the_height,
				y: the_top,
				x: the_left,
				footerHeight: 10,
				padding: { top: 10, right: 12, bottom: 10, left: 12 },
				shadowBlur: 5,
				statusBar: false,
				scrollbars: false,
				resizable: false,
				maximizable: false,
				minimizable: false,
				collapsible: false,
				width: the_width,
				height: the_height,
				
				onContentLoaded: function() {
					var currentInstance 	= MochaUI.Windows.instances.get('mocha_edit');				
					var contentWrapperEl 	= currentInstance.contentWrapperEl;
					var contentEl 			= currentInstance.contentEl;								
					
					if (contentEl.offsetHeight > tgt_ht) {
						contentWrapperEl.setStyle('height', contentEl.offsetHeight+24);					//alert("offsetHeight is " + contentEl.offsetHeight + ", offsetWidth is " + contentEl.offsetWidth);
					}
					
					if (contentEl.offsetWidth > tgt_wd) {
						contentWrapperEl.setStyle('width', contentEl.offsetWidth+24);					//alert("offsetHeight is " + contentEl.offsetHeight + ", offsetWidth is " + contentEl.offsetWidth);
					}
					currentInstance.drawWindow($('mocha_edit'));											
				},				
				
				contentBgColor: '#FFF',
				headerStartColor:  [255, 159, 255],			//want D7D [208, 112, 208]
				headerStopColor:   [208, 112, 208],			//want 939 [144, 48, 144]
				bodyBgColor: [255, 255, 255]
			});
		
		}	
		
	});




