// Wrapper function to get a cross browser XMLHttp object/***************************************************************************************************************************/function getXMLHTTP() {	// function to create an XmlHttp object	var xmlHttp = null;	try {		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");	} catch(e) {		try {			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");		} catch(oc) {			xmlHttp = null;		}	}	if(!xmlHttp && typeof XMLHttpRequest != "undefined") {		xmlHttp = new XMLHttpRequest();	}	return xmlHttp;}/***************************************************************************************************************************/// QueryString function/***************************************************************************************************************************/function PageQuery(q) {	if(q.length > 1) this.q = q.substring(1, q.length);		else this.q = null;	this.keyValuePairs = new Array();	if(q) {		for(var i=0; i < this.q.split("&").length; i++) {			this.keyValuePairs[i] = this.q.split("&")[i].toLowerCase();		}	}	this.getKeyValuePairs = function() { return this.keyValuePairs; }	this.getValue = function(s) {		for(var j=0; j < this.keyValuePairs.length; j++) {			if(this.keyValuePairs[j].split("=")[0] == s)			return this.keyValuePairs[j].split("=")[1];		}		return "";	}	this.getParameters = function() {		var a = new Array(this.getLength());		for(var j=0; j < this.keyValuePairs.length; j++) {			a[j] = this.keyValuePairs[j].split("=")[0];		}		return a;	}	this.getLength = function() { return this.keyValuePairs.length; } }function queryString(key){	var page = new PageQuery(window.location.search); 	return unescape(page.getValue(key.toLowerCase())); }/***************************************************************************************************************************/// Cookie functions/***************************************************************************************************************************/function getExpiryDate(minutes){	var UTCstring;	Today = new Date();	nomilli = Date.parse(Today);	Today.setTime(nomilli + (minutes * 60000));	UTCstring = Today.toUTCString();	return UTCstring;}function setCookie(name, value, duration){	cookiestring = name + "=" + escape(value) + "; EXPIRES=" + getExpiryDate(duration);	document.cookie = cookiestring;}function getCookie(cookiename) {	var cookiestring = "" + document.cookie;	var index1 = cookiestring.indexOf(cookiename);	if (index1 == -1 || cookiename == "") return ""; 	var index2 = cookiestring.indexOf(';', index1);	if (index2 == -1) index2 = cookiestring.length; 	return unescape(cookiestring.substring(index1 + cookiename.length + 1, index2));}/***************************************************************************************************************************/