function changeNew(id, idactive, maxid, state) {		
	for(var i=1; i<=maxid;) {
		if(i==id) {
			document.getElementById(i).onClick = function() { changeNew(i, id, maxid, 'activenew'); }
			document.getElementById(i).className = "activenew";
		} else {
			document.getElementById(i).onClick = function() { changeNew(i, id, maxid, 'inactivenew'); }
			document.getElementById(i).className = "inactivenew";
		}
		i++;
	}
}

function xmlhttpPost(strURL, argVal) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(getquerystring(argVal));
}

function getquerystring(argVal) {
    qstr = "newid="+argVal;
    return qstr;
}

function updatepage(str){
    document.getElementById("newcontent").innerHTML = str;
}
