// JavaScript Document

	// cross browser ajax call - Resolve the XMLHttpRequest Call (IE 5/6/7 + Firefox)
	if(typeof XMLHttpRequest == "undefined")
		XMLHttpRequest= function(){
			return new ActiveObject(navigator.userAgent.indexOf("MSIE 5") >= 0 ? "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP");
		};
	
	// Serialize a set of data. It can take two different types of objects.
	// an Array of input elements.
	// a hash of key/value pairs.
	// returns a serialized string
	function serialize(a){
		var s = [];
		if(a.constructor == Array){
			for(var i = 0; i < a.length; i++){
				s.push(a[i].name + "=" + encodeURIComponent(a[i].value));
			}
		}else{
			for (var j in a){
				s.push(j + "=" + encodeURIComponent(a[j]));
			}
		}
		return s.join("&");
	}