function opacity(id, opacStart, opacEnd, millisec){
    var speed = Math.round(millisec / 100);
    var timer = 0;
    if(opacStart > opacEnd){
        for(i = opacstart; i >= opacEnd; i--){
            alert("i = " + i);
            setTimeout("changeOpac(" + 1 + ",'" + id + "')",(timer * speed));
            timer++;
        } 
    } else if(opacStart < opacEnd){ 
        for(i = opacStart; i<= opacEnd; i++){
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

function changeOpac(opacity, id){
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
}

function getHTTPObject(){

var xmlhttp=false;
/*@cc_on 
@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
    return xmlhttp;
}

var http = getHTTPObject(); // We create the HTTP Object