//Copyright Locapoint.com & Naoki Ueda // this class has a array of div names as parameter // These divs will be switched like tab, with cross-fade effect. // Divs don't have to be in a sma position. // // on call of this.ontab(n) will appear div(n) on top (with specified zindex) // other divs will disappear and these zindex will be zero (behind) // //Usage // // var xft; //Global variable. Cross-Fade Tab switch. // //initialise: //Tabs does not have to be tab. // xft = new xfadetabs(new Array("layer1", "layer2", "layer3"),3,200,"xft"); // xft.ontab(1); //Constructor function xfadetabs(divarrays, zindex, millisec, thisobjname) { //Members this.divs = divarrays; this.zindex = zindex; this.millisec = millisec; this.thisobjname = thisobjname; if(divarrays!=null){ this.length = divarrays.length; } this.currentTop = 0; //Methods this.ontab; // this.hidexftabs(); // this.showxftabs(); //change the opacity for different browsers this.changeOpac = function(opacity, id) { var divobject = document.getElementById(id); if (divobject ==null){ return; } var object=divobject.style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } var n; for(n=0;n