            function UserGuide(guide, addjustControl) {
                var pages = guide.getElementsByTagName("div");
                this.gfxpath = "/graphics/";

                this.highlight = false;
                this.pages = new Array();
                this.height = 0;
                this.controlbarheight = 0;
                this.width = 0;
                this.guide = document.createElement("div");
                this.guide.className = "jsguide";
                this.page = 0;
                this.addjustControl = addjustControl !== undefined ? addjustControl : 0;

                var options = [];
                
                for ( var c = 0; c < pages.length; c++ ) {

                    if ( pages[c].className == "guidestep" ) {

                        var pagenumber = this.pages.length;
                        this.pages[pagenumber] = new Object();

                        this.pages[pagenumber]["height"] = pages[c].offsetHeight;

                        if ( this.pages[pagenumber]["height"] > this.height ) 
                            this.height = this.pages[pagenumber]["height"];

                        var elements = pages[c].getElementsByTagName("*");
                        for ( var e = 0; e < elements.length; e++ ) {
                            switch ( elements[e].className ) {
                                case "guideheader":
                                    this.pages[pagenumber]["header"] = elements[e].innerHTML;
                                    options[options.length] = new Option(this.pages[pagenumber]["header"],pagenumber);
                                    break;
                                case "guideimage":
                                    this.pages[pagenumber]["image"] = document.createElement("div");
                                    this.pages[pagenumber]["image"].style.height = elements[e].offsetHeight + "px";
                                    this.pages[pagenumber]["image"].style.width = elements[e].offsetWidth + "px";
                                    this.controlbarheight = this.controlbarheight < elements[e].offsetHeight ? elements[e].offsetHeight : this.controlbarheight;

/*
                                    var image = document.createElement("img");
                                        image.src = elements[e].src;
                                    this.pages[pagenumber]["image"].appendChild(image);
*/
                                    this.pages[pagenumber]["image"].innerHTML = elements[e].parentNode.innerHTML;

                                    this.pages[pagenumber]["width"] = elements[e].offsetWidth;
                                    if ( this.pages[pagenumber]["width"] > this.width ) 
                                        this.width = this.pages[pagenumber]["width"];
                                    break;
                                case "guidetext":
                                    this.pages[pagenumber]["text"] = document.createElement("div");
                                    this.pages[pagenumber]["text"].className = "guidetext";                                    
                                    this.pages[pagenumber]["text"].innerHTML = elements[e].innerHTML;
                                    break;
                            }//switch
                        }//for 

                    }//if

                }//for

                this.guide.style.width = this.width + "px";
                this.guide.style.height = (this.height + 50) + "px";
                this.guide.style.overflow = "hidden";
                this.guide.style.position = "relative";

                this.slider = document.createElement("div");
                this.slider.style.position = "absolute";
                this.slider.style.top = "0px";
                this.slider.style.left = "0px";
                this.guide.appendChild(this.slider);

                //add controlbtns to guide:
                var btns = {
                    next:[( this.width - parseInt( this.width / 10 ) ),"next"],
                    prev:[parseInt( this.width / 10 ),"prev"]
                }

                for ( var btn in btns ) {

                    this[btn + "Btn"] = document.createElement("img");
                    this[btn + "Btn"].src = this.gfxpath + "guides_icon_" + btn + ".png";
                    this[btn + "Btn"].style.position = "absolute";
                    this[btn + "Btn"].style.top =  this.controlbarheight + "px";
                    this[btn + "Btn"].style.left =  (( btns[btn][0] - 15 ) + this.addjustControl) + "px";
                    this[btn + "Btn"].style.zIndex = 10;
                    this[btn + "Btn"].style.display = "block";
                    this[btn + "Btn"].style.opacity = 1;
                    this[btn + "Btn"].style.filter = "alpha(opacity=100)";
                    this.guide.appendChild(this[btn + "Btn"]);

                    this[btn + "BtnMo"] = document.createElement("img");
                    this[btn + "BtnMo"].src = this.gfxpath + "guides_icon_" + btn + "_mo.png";
                    this[btn + "BtnMo"].style.position = "absolute";
                    this[btn + "BtnMo"].style.top =  this.controlbarheight + "px";
                    this[btn + "BtnMo"].style.left =  (( btns[btn][0] - 15 ) + this.addjustControl) + "px";
                    this[btn + "BtnMo"].style.zIndex = 11;
                    this[btn + "BtnMo"].style.display = "block";
                    this[btn + "BtnMo"].style.opacity = 0;
                    this[btn + "BtnMo"].style.filter = "alpha(opacity=0)";
                    resExt.addEventHandler(this[btn + "BtnMo"],"mouseover",this.btnHighlight.bind(this,btn + "Btn",1));
                    resExt.addEventHandler(this[btn + "BtnMo"],"mouseout",this.btnHighlight.bind(this,btn + "Btn",-1));
                    resExt.addEventHandler(this[btn + "BtnMo"],"click",this[btns[btn][1]].bind(this));
                    this.guide.appendChild(this[btn + "BtnMo"]);

                }//for

                this.selecter = document.createElement("select");
                for ( var c = 0; c < options.length; c++ ) {
                    this.selecter.options[c] = options[c];
                }//for
                this.selecter.style.position = "absolute";
                this.selecter.style.width = (parseInt(this["nextBtn"].style.left) - parseInt(this["prevBtn"].style.left)) - 50 + "px";
                this.selecter.style.top = (this.controlbarheight + 4) + "px";
                this.selecter.style.border = "solid 1px #cccccc";
                this.selecter.style.fontSize = "14px";
                this.selecter.style.height = "20px";
                this.selecter.style.fontFamily = "sans";
                this.selecter.style.fontWeight = "normal";
                this.selecter.style.left = ((parseInt(this["prevBtn"].style.left) + 40)) + "px";
                resExt.addEventHandler(this.selecter,"change",this.gotoIndex.eventBind(this));
                this.guide.appendChild(this.selecter);

                for ( var c = 0; c < this.pages.length; c++ ) {
                    this.pages[c].html = document.createElement("div");
                    this.pages[c].html.style.position = "absolute";
                    this.pages[c].html.style.top = "0px";
                    this.pages[c].html.style.left = ( this.width * c ) + "px";
                    this.pages[c].html.appendChild(this.pages[c]["image"]);
                    
                    this.pages[c]["text"].style.position = "absolute";
                    this.pages[c]["text"].style.top = (parseInt(this.pages[c]["image"].style.height) + 50) + "px";
                    this.pages[c]["text"].style.left = "0px";
                    this.pages[c]["text"].style.width = this.width + "px";
                    this.pages[c]["text"].style.height = ( parseInt(this.height) + 50 - parseInt(this.pages[c]["text"].style.top) ) + "px";
                    this.pages[c].html.appendChild(this.pages[c]["text"]);
                    
                    if ( c < (this.pages.length - 1) ) {
                        var gotonext = document.createElement("div");
                            gotonext.style.textDecoration = "underline";
                            gotonext.style.color = "#a20303";
                            gotonext.style.cursor = "pointer";
                            gotonext.style.position = "absolute";
                            gotonext.style.bottom = "0px";
                            gotonext.style.right = "0px";
                            gotonext.appendChild(document.createTextNode(resExt.gt("next")));
                        resExt.addEventHandler(gotonext,"click",this.next.bind(this));

                        this.pages[c]["text"].appendChild(gotonext);
                    }//if

                    this.slider.appendChild(this.pages[c].html);
                }//for

                guide.parentNode.insertBefore(this.guide,guide);

            }//UserGuide

            UserGuide.prototype.gotoIndex = function(select) {
                var dist = select.selectedIndex - this.page;

                if ( dist < 0 ) {
                    for ( var c = 0; c < ( dist * -1 ); c++ ) {
                        this.prev();
                    }
                } else {
                    for ( var c = 0; c < dist; c++ ) {
                        this.next();
                    }

                }
            }//gotoIndex

            UserGuide.prototype.btnHighlight = function(btn,mode) {

                this[btn + "Mo"].style.display = "block";

                setTimeout(function() {
                    if ( this.highlight === false ) {
                        this.highlight = true;

                        setTimeout(function() {
                            if ( parseFloat(this[btn + "Mo"].style.opacity) < 1 && mode == 1 || parseFloat(this[btn + "Mo"].style.opacity) <= 0 && mode == -1) {
                                this[btn + "Mo"].style.opacity = parseFloat(this[btn + "Mo"].style.opacity) + 0.2 * mode;
                                this[btn + "Mo"].style.filter = "alpha(opacity=" + Math.round(100 * this[btn + "Mo"].style.opacity) + ")";
                                this[btn].style.opacity = parseFloat(this[btn].style.opacity) - 0.2 * mode;
                                this[btn].style.filter = "alpha(opacity=" + Math.round(100 * this[btn].style.opacity) + ")";
                                setTimeout(arguments.callee.bind(this),40);
                            } else {
                                this[btn + "Mo"].style.opacity = mode == 1 ? 1 : 0;
                                this[btn + "Mo"].style.filter = "alpha(opacity=" + Math.round(100 * this[btn + "Mo"].style.opacity) + ")";
                                this[btn].style.opacity = mode == 1 ? 0 : 1;
                                this[btn].style.filter = "alpha(opacity=" + Math.round(100 * this[btn].style.opacity) + ")";
                                this.highlight = false;
                            }
                        }.bind(this),30);
                    } else {
                        setTimeout(arguments.callee.bind(this),30);
                    }

                }.bind(this),30);

            }//btnHighlight
            
            UserGuide.prototype.next = function() {
                if ( this.page < ( this.pages.length - 1 ) ) {
                    this.page++;
                    this.selecter.selectedIndex = this.page;
                    this.slide();
                }//if
            }//next
            
            UserGuide.prototype.prev = function() {
                if ( this.page > 0 ) {
                    this.page--;
                    this.selecter.selectedIndex = this.page;
                    this.slide();
                }//if
            }//prev
            
            UserGuide.prototype.end = function() {
            
            }//end
            
            UserGuide.prototype.begin = function() {
            
            }//begin

            UserGuide.prototype.slide = function() {

                var newpos = this.page * this.width * -1;
                var currentpos = parseInt(this.slider.style.left);
                this.direction = newpos > currentpos ? 100 : -100;

                setTimeout(function() {
                    var newpos = this.page * this.width * -1;
                    var currentpos = parseInt(this.slider.style.left);
                    //når direction skifter fortegn er siden helt på plads!
                    var direction = newpos > currentpos ? 100 : -100;
                    currentpos += direction;
                    direction = newpos > currentpos ? 100 : -100;
                    
                    if ( this.direction == direction ) {
                        this.slider.style.left = currentpos + "px";
                        setTimeout(arguments.callee.bind(this),30);
                    } else {
                        this.slider.style.left = newpos + "px";                        
                    }
                }.bind(this),30);

            }//slide
