var oldver = false;
if (navigator.userAgent.match(/MSIE (\d+)\./)) {
	if (parseInt(RegExp.$1) < 9) {
		if (navigator.userAgent.toLowerCase().indexOf("chromeframe") < 0)
			oldver = true;
	}
} else if (navigator.userAgent.match(/Firefox\/(\d+)\./)) {
	if (parseInt(RegExp.$1) < 3)
		oldver = true;
} else if (navigator.userAgent.match(/Opera (\d+)\./)) {
	if (parseInt(RegExp.$1) < 9)
		oldver = true;
} else if (navigator.userAgent.indexOf("Safari") > 0 && navigator.userAgent.match(/Version\/(\d+)\./)) {
	if (parseInt(RegExp.$1) < 3)
		oldver = true;
}

var winwidth = 1024;
var winheight = 768;
if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
	winwidth = window.innerWidth;
	winheight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	//IE 6+ in 'standards compliant mode'
	winwidth = document.documentElement.clientWidth;
	winheight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	//IE 4 compatible
	winwidth = document.body.clientWidth;
	winheight = document.body.clientHeight;
}

var httpreq = null;
if (typeof XMLHttpRequest == "undefined") {
    try {
		httpreq = new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e0) {
		try {
			httpreq = new ActiveXObject("Msxml2.XMLHTTP.6.0");
		} catch (e1) {
			try {
				httpreq = new ActiveXObject("Msxml2.XMLHTTP.3.0");
			} catch (e2) {}
		}
	}
} else
	httpreq = new XMLHttpRequest();

function elems(id) {
	return document.getElementById(id);
}

function setdisplay(id, mode) {
	elems(id).style.display = mode;
}

