function sendToWhom (n){	var sb_domain = "sanjoseskate.com"		var sb_cc = "?cc=skate@sanjoseskate.com"		//var sb_bcc = "?bcc=skate@sanjoseskate.com"		switch (n){		case '1':			var sb = "SV Roller Girls"			var sb_user = "derby"			var sb_subject = "&subject=Derby questions"			break;		case '2':			var sb = "Lesson info"			var sb_user = "Lessons"			var sb_subject = "&subject=Lessons"			break;		case '3':			var sb = "Band events"			var sb_user = "Bands"			var sb_subject = "&subject=Band information"			break;		default:			var sb = "General info"			var sb_user = "skate"			var sb_subject = "&subject=General info"				}window.location = "mailto:" + sb_user + "@" + sb_domain + sb_cc + sb_subject}var good;function checkEmailAddress(field) {// the following expression must be all on one line...var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);if (goodEmail){   good = true} else {   alert('Please enter a valid e-mail address.')   field.focus()   field.select()   good = false   }}u = window.location;m = "I thought this might interest you...";function mailThisUrl(){   good = false   checkEmailAddress(document.eMailer.address)   if (good){      // the following expression must be all on one line...      window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;   }}function createRequestObject() {   var req;   if(window.XMLHttpRequest){      // Firefox, Safari, Opera...      req = new XMLHttpRequest();   } else if(window.ActiveXObject) {      // Internet Explorer 5+      req = new ActiveXObject("Microsoft.XMLHTTP");   } else {      // There is an error creating the object,      // just as an old browser is being used.      alert('Problem creating the XMLHttpRequest object');   }   return req;}function handleDivTag(divtag){   var divtag;   return divtag;}// Make the XMLHttpRequest objectvar http = createRequestObject();// Create the Divtag Handler -- Mainly an IE 6 Fixvar divhandler = new handleDivTag(null);function sendRequest(act,divtag,url) {   // Open PHP script for requests   divhandler.divtag = divtag;   document.getElementById(divhandler.divtag).innerHTML = '<h2>Please wait</h2><img src=\"http://l.yimg.com/a/i/us/per/gr/gp/rel_interstitial_loading.gif\"/>';   string = url.split(':');   if(string[0] == 'mailto') sendToWhom (string[1]);   http.open('get', url);   http.onreadystatechange = handleResponse;   divhandler.divtag = divtag;   http.send(null);   //alert ('hello');    carousel.render();   carousel.startAutoPlay();}function handleResponse() {   if(http.readyState == 4 && http.status == 200){   	      // Text returned FROM the PHP script	      var response = http.responseText;	      if(response) {	         // UPDATE ajaxTest content	         document.getElementById(divhandler.divtag).innerHTML = response;	      }   }}function ajaxObject(layer, url) {                                    // This is the object constructor   var that=this;                                                    // A workaround for some javascript idiosyncrocies   var updating = false;                                             // Set to true if this object is already working on a request   this.callback = function() {}                                     // A post-processing call -- a stub you overwrite.   this.update = function(passData) {                                // Initiates the server call.      if (updating==true) { return false; }                          // Abort if we're already processing a call.      updating=true;                                                 // Set the updating flag.      var AJAX = null;                                               // Initialize the AJAX variable.      if (window.XMLHttpRequest) {                                   // Are we working with mozilla?         AJAX=new XMLHttpRequest();                                  //  Yes -- this is mozilla.      } else {                                                       // Not Mozilla, must be IE         AJAX=new ActiveXObject("Microsoft.XMLHTTP");                //  Wheee, ActiveX, how do we format c: again?      }                                                              // End setup Ajax.      if (AJAX==null) {                                              // If we couldn't initialize Ajax...         alert("Your browser doesn't support AJAX.");                // Sorry msg.						         return false                                                // Return false (WARNING - SAME AS ALREADY PROCESSING!)      } else {         AJAX.onreadystatechange = function() {                      // When the browser has the request info..            if (AJAX.readyState==4 || AJAX.readyState=="complete") { //   see if the complete flag is set.               LayerID.innerHTML=AJAX.responseText;                  //   It is, so put the new data in the object's layer               delete AJAX;                                          //   delete the AJAX object since it's done.               updating=false;                                       //   Set the updating flag to false so we can do a new request               that.callback();                                      //   Call the post-processing function.            }                                                        // End Ajax readystate check.         }                                                           // End create post-process fucntion block.         var timestamp = new Date();                                 // Get a new date (this will make the url unique)         var uri=urlCall+'?'+passData+'&timestamp='+(timestamp*1);   // Append date to url (so the browser doesn't cache the call)         AJAX.open("GET", uri, true);                                // Open the url this object was set-up with.         AJAX.send(null);                                            // Send the request.         return true;                                                // Everything went a-ok.      }                                                              // End Ajax setup aok if/else block                    }         // This area set up on constructor calls.   var LayerID = document.getElementById(layer);                     // Remember the layer associated with this object.   var urlCall = url;                                                // Remember the url associated with this object.}                                                                    // End AjaxObjectfunction ShowPic(ShowThis, wdth, where) {			where = document.getElementById(where);			where.src = ShowThis;			where.style.width = wdth+'px';			}if(str[4]=='bands'){	parent.ShowPic("/media/logos/SJSkate1.gif", 400, 'logo');}else{	parent.ShowPic("/media/logos/sjskate.gif", 300, 'logo');}
