var Curcnt=0;
var Leftpx=40;
var a=50;

function fade(sty) {
	document.getElementById(sty).style.filter = "alpha(opacity=" + a + ")" ;
	a=a+10;
	if(a<105){
		setTimeout("fade('" + sty + "')", 50);
	}	
	else{
		a=50;
		}
}

function SImg(temptop,sty){
Leftpx=Leftpx+20;
    if(navigator.appName.charAt(0)=="M"){
        if (navigator.appVersion.indexOf("MSIE 5") != -1 || navigator.appVersion.indexOf("MSIE 6") != -1){
            if(document.getElementById)
            {
            if(document.getElementById(sty).style.visibility=="visible") {HImg(sty);}
            	document.getElementById(sty).style.zIndex=++Curcnt;  
            	document.getElementById(sty).style.top=temptop;         
            	document.getElementById(sty).style.left=Leftpx + "px";  
            	document.getElementById(sty).style.visibility="visible";            	
            	fade(sty);
            }
        }
        else{
            if(document.all)
            {
            	if(document.all(sty).style.visibility=="visible") {HImg(sty);}
            	document.all(sty).style.zIndex=++Curcnt;         
            	document.all(sty).style.top=temptop;
            	document.all(sty).style.left=Leftpx + "px";              	
            	document.all(sty).style.visibility="visible";            	
           	}
        }
    }
    if(navigator.appName.charAt(0)=="N"){
        if(document.getElementById)
        {
       		if(document.getElementById(sty).style.visibility=="visible") {HImg(sty);}
       		document.getElementById(sty).style.zIndex=++Curcnt;               		
       		document.getElementById(sty).style.top=temptop;
           	document.getElementById(sty).style.left=Leftpx + "px";              	
        	document.getElementById(sty).style.visibility="visible";       		
        }
        if(document.layers)
        {
        	if(document.layers[sty].visibility=="show") {HImg(sty);}
        	document.layers[sty].zIndex=++Curcnt;         	
        	document.layers[sty].top=temptop;
           	document.layers[sty].left=Leftpx;              	        		
        	document.layers[sty].visibility="show";        	
        }
    }
}

function HImg(sty){
    Curcnt=Curcnt-1;
    Leftpx=Leftpx-20;
    
    if(navigator.appName.charAt(0)=="M"){
        if (navigator.appVersion.indexOf("MSIE 5") != -1 || navigator.appVersion.indexOf("MSIE 6") != -1){
            if(document.getElementById){
				document.getElementById(sty).style.filter = "alpha(opacity=0)" ;	           	
	           	document.getElementById(sty).style.visibility="hidden";            
           		a=50;
            }
        }
        else{
	        if(document.all){
            	document.all(sty).style.visibility="hidden";            
            }
        }
    }

    if(navigator.appName.charAt(0)=="N"){
        if(document.getElementById){
           	document.getElementById(sty).style.visibility="hidden";            
        }
        if(document.layers){
           	document.layers[sty].visibility="hidden";            
        }
    }
}
