function blinkElement(element, color1, color2) {
 // Requires Jquery library. Blinks an on-screen element.
 // Color1 should be the normal BG color, color2 the flash color (e.g. 'yellow').
   for (i=0;i<3;i++) {
	 setTimeout(function(){$(element).css('background-color',color2);},100*i); 
     setTimeout(function(){$(element).css('background-color',color1);},100*i+50); 		   
    }
}// end blinkElement

function getParams(formname) {
  // Gathers all the input values into an array object. Requires jquery library.
	 params = {};
	 $(formname) 
	   .find("input[@checked], input[@type='text'], input[@type='hidden'], input[@type='password'], input[@type='submit'], option[@selected], textarea") 
	   .filter(":enabled") 
	   .each(function() { params[ this.name || this.id || this.parentNode.name || this.parentNode.id ] = this.value; });  
    return params;
} // end getParams

function xml_get_node(xmlString,tagname) {
  // This function parses an XML string and returns the first
  // value found wrapped in a tag -tagname-. E.g.:
  // alert( xml_get_node(xml,"error"));
  // Author: Jeff Childers 7/25/2006
  
   // Get the cross-browser DOM parser...
   if (document.implementation.createDocument){
        // Mozilla, create a new DOMParser
        var parser = new DOMParser();
        myDocument = parser.parseFromString(xmlString, "text/xml");
        } else if (window.ActiveXObject){
        // Internet Explorer, create a new XML document using ActiveX
        // and use loadXML as a DOM parser.
        myDocument = new ActiveXObject("Microsoft.XMLDOM")
        myDocument.async="false";
        myDocument.loadXML(xmlString);
    }  
    var docRoot = myDocument.documentElement;

    //get the first "Latitude" element
    var returnval = docRoot.getElementsByTagName(tagname)[0].firstChild.data;

   return returnval;
  }
  