var fade_out_done;
var doInTime = "50";
var doOutTime = "25";
function home_fade_out(picName) {
fade_out_done = 0;
  if (!this.doOut) {
   		this.doOut = window.setInterval ('home_fade_out(\"'+picName+'\")', doOutTime);
  }
  else {
    var elem = document.getElementById("home_fade");
   
    var img_opacity;

    if (!elem.filters) {//Moz
      img_opacity = !elem.style.opacity ? 1 : parseFloat(elem.style.opacity);
      
    }
    //IE
    else {
      img_opacity = !elem.filters.alpha.opacity ? 1 : parseFloat (elem.filters.alpha.opacity);
	  
     }

  if (!elem.filters){
	  	if (img_opacity > 0.025) {//alert("moz: " + img_opacity);//Moz
      		img_opacity -= 0.15;
			elem.style.opacity = img_opacity;
		}else {//alert("else: " + img_opacity);
      		window.clearInterval (this.doOut);
	  		fade_out_done = 1;
      		this.doOut = null;
	  		img_fade_in();
	 		document.getElementById("imgArea").innerHTML = "<img id='home_fade' style='FILTER: alpha(opacity=0); opacity:0;' src='bin/home/" + picName + "' border='0' name='imgregion'  onClick='window.location.href=\"index2.php?pageID=1&navLay=1\"' class='hand' onFocus='this.blur()'/>";
   	 	}
  }
	else{
		 if (img_opacity > 1) {//alert("ie: " + img_opacity);// IE
			img_opacity -= 15;
			elem.filters.alpha.opacity = img_opacity;
		}else {//alert("else: " + img_opacity);
      		window.clearInterval (this.doOut);
	  		fade_out_done = 1;
      		this.doOut = null;
	  		
	 		document.getElementById("imgArea").innerHTML = "<img id='home_fade' style='FILTER: alpha(opacity=0); opacity:0;' src='bin/home/" + picName + "' border='0' name='imgregion'  onClick='window.location.href=\"index2.php?pageID=1&navLay=1\"' class='hand' onFocus='this.blur()'/>";
			img_fade_in();
   	 	}
	}
		  
    
    
  }
}
function img_fade_in(){  // ***************  steve  ******************
	  var img_opacity;
	var elem = document.getElementById("home_fade");
	if (!this.doIn) {
	   	this.doIn = window.setInterval ('img_fade_in()', doInTime);

	  }else{
		img_opacity = parseFloat (elem.style.opacity);
		if(img_opacity<1){
			img_opacity+=0.1;
			elem.style.opacity = img_opacity;

		}
		else{
		 window.clearInterval (this.doIn);
		}
	}
}
//  **********************steve  *********************

// function img_fade_in() {
		  //alert("55: " );  // *************  steve **********************
  //if (!this.doIn) {
	 //alert("57: " + img_opacity);  // *************  steve **********************
   	//	this.doIn = window.setInterval ('img_fade_in()', doInTime);
  //}
	//alert("this.doIn "+this.doIn);

/* if(this.doIn && fade_out_done==1){
	 alert("61: " + img_opacity);  // *************  steve **********************
    var elem = document.getElementById("home_fade");
   
    var img_opacity;

    if (!elem.filters) {//Moz
      img_opacity = !elem.style.opacity ? 1 : parseFloat (elem.style.opacity);
       alert("68: " + img_opacity);  // *************  steve **********************
    }
    //IE
    else {
      img_opacity = !elem.filters.alpha.opacity ? 0 : parseFloat (elem.filters.alpha.opacity)/100;
	  alert("73: " + img_opacity);  // *************  steve **********************
     }

    if (img_opacity < 1) {
		  alert("77: " + img_opacity);  // *************  steve **********************
			if (!elem.filters) {
			img_opacity += 0.12;
			}
			else{
				img_opacity += 0.12;
			}

			  if (!elem.filters) {
				elem.style.opacity = img_opacity;
				
			  }
			  else {
				elem.filters.alpha.opacity = img_opacity*100;
				
			  }
    }
    else {
	 alert("95: " + img_opacity);  // *************  steve **********************
      window.clearInterval (this.doIn);
      this.doIn = null;
    }
  }

}
*/
//----------------------------
/*
var fade_out_done;
function home_fade_out(picName) {
fade_out_done = 0;
  if (!this.doOut) {
   		this.doOut = window.setInterval ('home_fade_out(\"'+picName+'\")', 115);
  }
  else {
    var elem = document.getElementById("home_fade");
   
    var img_opacity;

    if (!elem.filters) {//Moz
      img_opacity = !elem.style.opacity ? 1 : parseFloat(elem.style.opacity);
      
    }
    //IE
    else {
      img_opacity = !elem.filters.alpha.opacity ? 1 : parseFloat (elem.filters.alpha.opacity);
	  
     }

  if (!elem.filters){
	  	if (img_opacity > 0.025) {//alert("moz: " + img_opacity);//Moz
      		img_opacity -= 0.25;
			elem.style.opacity = img_opacity;
		}else {//alert("else: " + img_opacity);
      		window.clearInterval (this.doOut);
	  		fade_out_done = 1;
      		this.doOut = null;
	  		img_fade_in();
	 		document.getElementById("imgArea").innerHTML = "<img id='home_fade' style='FILTER: alpha(opacity=0); opacity:0;' src='bin/home/" + picName + "' border='0' name='imgregion'  onClick='window.location.href=\"index2.php?pageID=1&navLay=1\"' class='hand' onFocus='this.blur()'/>";
   	 	}
  }
	else{
		 if (img_opacity > 1) {//alert("ie: " + img_opacity);// IE
			img_opacity -= 8;
			elem.filters.alpha.opacity = img_opacity;
		}else {//alert("else: " + img_opacity);
      		window.clearInterval (this.doOut);
	  		fade_out_done = 1;
      		this.doOut = null;
	  		
	 		document.getElementById("imgArea").innerHTML = "<img id='home_fade' style='FILTER: alpha(opacity=0); opacity:0;' src='bin/home/" + picName + "' border='0' name='imgregion'  onClick='window.location.href=\"index2.php?pageID=1&navLay=1\"' style='cursor:pointer' onFocus='this.blur()'/>";
			img_fade_in();
   	 	}
	}
		  
    
    
  }
}
function img_fade_in() {

  if (!this.doIn) {
   		this.doIn = window.setInterval ('img_fade_in()', 25);
  }
 if(this.doIn && fade_out_done==1){
    var elem = document.getElementById("home_fade");
   
    var img_opacity;

    if (!elem.filters) {//Moz
      img_opacity = !elem.style.opacity ? 1 : parseFloat (elem.style.opacity);
      
    }
    //IE
    else {
      img_opacity = !elem.filters.alpha.opacity ? 0 : parseFloat (elem.filters.alpha.opacity)/100;
	  //alert("ie: " + img_opacity);
     }

    if (img_opacity < 1) {
			if (!elem.filters) {
			img_opacity += 0.06;
			}
			else{
				img_opacity += 0.12;
			}

			  if (!elem.filters) {
				elem.style.opacity = img_opacity;
				
			  }
			  else {
				elem.filters.alpha.opacity = img_opacity*100;
				
			  }
    }
    else {
      window.clearInterval (this.doIn);
      this.doIn = null;
    }
  }
}
*/