<!-- Begin --

function preloadGIF() {

            for (var x = 0; x < GIFimages.length; x++) {
                            var temp = makeId(GIFimages[x]);
                eval("MO"+temp +"= new Image()");
                eval("MO"+temp+".src = '"+GIFimages[x]+".gif'");
                                eval("MO"+temp+"on = new Image()");
                eval("MO"+temp+"on.src = '"+GIFimages[x]+"on.gif'");

            }
                        donepreGIF = 1;
        }



function makeId(path) {
            return path.substring( path.lastIndexOf("/")+1,99);
        }

function startUP() {

        		  showproj (Pselect);
                  InitialiseScrollableArea();
                  hideimg('loading','loading');
      }



function displayon(a)
{
document.getElementById(a).src = eval("MO"+a+"on.src");
}


function displayoff(a)
{
        document.getElementById(a).src = eval ("MO"+a+".src");
}


 function hideimg(a,b){
             if (ie) document.all[a].style.visibility='hidden'; if (ie) document.all[b].style.visibility='hidden';
             if (n) document.layers[a].style.visibility='hidden'; if (n) ddocument.all[b].style.visibility='hidden';
             if (n6) document.getElementById(a).style.visibility='hidden'; if (n6) document.getElementById(b).style.visibility='hidden';
}



 function showimg(a,b){
            if (ie) document.all[a].style.visibility='visible'; if (ie) document.all[b].style.visibility='visible';
         if (n) document.layers[a].style.visibility='visible'; if (n) document.all[b].style.visibility='visible';
            if (n6) document.getElementById(a).style.visibility='visible'; if (n6) document.getElementById(b).style.visibility='visible';
}


//här börjar scrollshitten

function verifyCompatibleBrowser(){
    this.ver=navigator.appVersion
    this.dom=document.getElementById?1:0
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
    this.ie4=(document.all && !this.dom)?1:0;
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
    return this
}
bw=new verifyCompatibleBrowser()


var ltimeout

var speed

var bspeed

var loop, timer

function ConstructObject(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
    this.up=MoveAreaUp;this.down=MoveAreaDown;
    this.MoveArea=MoveArea; this.x; this.y;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}

function MoveArea(x,y){
    this.x=x;this.y=y
    this.css.left=this.x
    this.css.top=this.y
}

function MoveAreaDown(move){
        if(this.y>-this.scrollHeight+objContainer.clipHeight){
    this.MoveArea(0,this.y-move)
    if(loop) setTimeout(this.obj+".down("+move+")",ltimeout)
        }
        else displayoff('arrowdown');
}

function MoveAreaUp(move){
        if(this.y<32){
    this.MoveArea(0,this.y-move)
    if(loop) setTimeout(this.obj+".up("+move+")",ltimeout)
        }
        else displayoff('arrowup');
}

function PerformScroll(speed){
        if(initialised){
                loop=true;
                if(speed>0) {displayon('arrowdown');objScroller.down(bspeed)}
                else {displayon('arrowup');objScroller.up(-bspeed)}
        }
}

function speedup(speed){
bspeed = (bspeed+15);
PerformScroll(speed);
}

function CeaseScroll(){
    loop=false
	if(timer) clearTimeout(timer)
    displayoff('arrowup')
    displayoff('arrowdown')
	if (dabrowsa == 'macns') bspeed = 15; else bspeed = 3;
}

var initialised;
function InitialiseScrollableArea(){
    if (dabrowsa == 'macns') ltimeout = 110; else ltimeout = 15;
	if (dabrowsa == 'macns') bspeed = 20; else bspeed = 4;
    objContainer=new ConstructObject('container')
    objScroller=new ConstructObject('projektlista','container')
    objScroller.MoveArea(0,32)
    objContainer.css.visibility='visible'
    initialised=true;
}





function displaypage(){
newcode = "<HTML><HEAD><TITLE>TURBOFORCE ART</TITLE><LINK REL='stylesheet' TYPE='text/css' HREF='tfstyle.css' TITLE='tfstyle'></HEAD><body id='bg2'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr valign='top'><td width='165'></td><td align='center'><p class='instru'>Let this window remain open - newly selected images will be loaded into it, with previous ones browsable using the BACK button (IE only).<br>If you browse BACK subsequent images will load into another window.</p></td><td width='165' align='right'><img src='bilder/tfart.gif' width='163' height='25' alt='' border='0'></td></tr></table><table align='center' width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td align='center' valign='middle'><img src=bilder/"+image+".jpg border=0 alt=''></td></tr></table><table align='center' width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td align='center' valign='middle'><p class='bildtext'>"+bildtext+"</p></td></tr></table></BODY></HTML>";
if (!displayWindow.closed && displayWindow.document)
        {
                        if (oldimage == image)
                        displayWindow.focus();
                        else
                        {
                        displayWindow.document.write(newcode);
                        displayWindow.focus();
                        displayWindow.document.close();
                        }
        }
else
        {
        displayWindow = window.open("","artbrowser","toolbar=1,scrollbars,location=0,statusbar=0,menubar=0,resizable=1,width=850,height=700,left = 20,top = 20");
        if (!displayWindow.closed && displayWindow.document)
                        {
                        displayWindow.document.write(newcode)
                        displayWindow.document.close()
                        }
        else alert("Your browser seems unwilling to open the Artbrowser pop-up window.\nIf you are using Norton Internet Security, try turning off Adblocking.\nIf you're not, well...try something else. ;-)")
        }
}

// End -->