function popupcenter(page, width, height) {
	//var midHeight = (document.body.clientHeight /3) + (height/3);
	var midWidth = (document.body.clientWidth /3) - (width/3);
	var properties = "height=" + height + ",width=" + width + ",top=0, left=" + midWidth +",toolbar=no,scrollbars=yes,menubar=no,resizable=yes,status=no,location=no,directories=no";  open(page, "", properties);
}

function process_url(urlstr){ 

	xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null){
		alert ("Browser does not support HTTP Request")
		return
    }
	
    xmlHttp.onreadystatechange=stateChanged
    xmlHttp.open("GET",urlstr,true)
    xmlHttp.send(null)
}
        
function GetXmlHttpObject(){
    var xmlHttp=null;
    try{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
    }catch (e){
		//Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}catch (e){
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
    }
    return xmlHttp;
}

function toggle_display_tr(id){
	var row = document.getElementById(id);
	if (row.style.display == 'none') {
		try {
			row.style.display='table-row';
		} catch(e) {
			row.style.display = 'block';
		}
	}else{
		row.style.display = 'none';
	}
}

function toggle_display_span(id){
	var obj = document.getElementById(id);
	if (obj.style.display == 'none') {
		obj.style.display = "inline";
	}else{
		obj.style.display = 'none';
	}
}

function roundNumber(rnum, rlength){
	var newnumber = Math.round(rnum*Math.pow(100,rlength))/Math.pow(100,rlength);
	return newnumber;
}