		
//***** parameter settings *****

divid="panorama";                                       //the id of the div container that will hold the panorama
impad='images/CPanorama.jpg';                           //the path to the panorama-image
imwid=2533;                                             //the width of the image
imhei=480;                                              //the height of the image
panwid=333;                                             //the width of the shown area
panhei=250;                                             //the height of the shown area
                                                        //if it differs from the image-height, the image gets scaled in length and height
speed=20;                                               //timeout between moves; set it lower to increase speed
move=1;                                                 // movement at one step in pixel

tim=0;
noscroll=true;

imw=imwid*panhei/imhei;
imh=panhei;
imstart=panwid/2-imw*1.5;
jumpa=panwid/2-imw*2.5;
jumpwida=imw-move;
jumpb=panwid/2-imw/2;
jumpwidb=imw+move;
conwid=15;
//panhei+=30;
contop=(imh*1)+(10*1);
conlefa=panwid/2-conwid;
conlefb=panwid/2;

function sri()
{
 if(!noscroll){
 now=parseFloat(document.getElementById("pano").style.left);
 if (now<=jumpa)
{
 now+=jumpwida;} else{now-=move;
}
 document.getElementById("pano").style.left=now+"px";
 tim=setTimeout("sri()",speed);
}
}

function sle()
{
 if(!noscroll)
{
 now=parseFloat(document.getElementById("pano").style.left);
 if (now>=jumpb)
{
 now-=jumpwidb;
} else{now+=move;
}
 document.getElementById("pano").style.left=now+"px";
 tim=setTimeout("sle()",speed);
}
}

function stop() 
{
 clearTimeout(tim); 
 noscroll=true;
}

function shownow() 
{
 imstart=340;                    //added setup in image at start removed
 tp="<div id='panorama2'; z-index:10;>";
 tp=tp+"<div id='pano' style='position:absolute; left:"+imstart+"px; top:0px; width:"+imw*3+"px; height:"+(imh)+"px; z-index:10; visibility:visible;'>";
 tp=tp+"<img src='"+impad+"' width="+imw+"px height="+imh+"px>";
 tp=tp+"<img src='"+impad+"' width="+imw+"px height="+imh+"px>";
 tp=tp+"<img src='"+impad+"' width="+imw+"px height="+imh+"px>";
 tp=tp+"</div>";
 tp=tp+"</div>";
 document.getElementById(divid).style.height=panhei+"px";
 document.getElementById(divid).innerHTML=tp; 
 noscroll=false; 
 sle();
}

 document.write("<style>");
 document.write("#panorama2 {position:absolute;left:0px; top:0px; width:"+panwid+"px; height:"+panhei+"px; clip:rect(0px,"+panwid+"px,"+panhei+"px,0px); overflow:hidden;}");
 document.write("</style>");

 onload=shownow;		
		

