
scrollpointsx=new Array(2,3,5,7,9,11,13,15,17,19,21,23,25,27,29,29,29,29,29,29,29,27,25,23,20,17,14,9,5,2,2,1,1,1,1);
notclear=false;
tubemov=0;
klipp=0;
brick1=new Image();
brick2=new Image();
brick3=new Image();
shard1=new Image();
shard2=new Image();
shard3=new Image();
brick1.src='bilder/brick1.png';
brick2.src='bilder/brick2.png';
brick3.src='bilder/brick3.png';
shard1.src='bilder/shard1.png';
shard2.src='bilder/shard2.png';
shard3.src='bilder/shard3.png';

document.onmousemove=flyttabildtextruta;

function preload(){
live1html='<IMG SRC="bilder/forgrund1.png" BORDER=0 ID="live1img" USEMAP="#live1thumbs" STYLE="position: absolute;left: 0px;top: 0px;z-index: 100">';
live1html+='<IMG SRC="bilder/P1030295_l.gif" WIDTH=117 HEIGHT=84 STYLE="position: absolute;left: 128px;top: 362px;z-index:10">';
live1html+='<IMG SRC="bilder/DSC02437_l.gif" WIDTH=88 HEIGHT=110 STYLE="position: absolute;left: 11px;top: 30px;z-index:10">';
live1html+='<IMG SRC="bilder/DSC02427_l.gif" WIDTH=99 HEIGHT=78 STYLE="position: absolute;left: 100px;top: 41px;z-index:10">';
live1html+='<IMG SRC="bilder/P1030290_l.gif" WIDTH=82 HEIGHT=86 STYLE="position: absolute;left: 21px;top: 140px">';
live1html+='<IMG SRC="bilder/P1030303_l.gif" WIDTH=137 HEIGHT=78 STYLE="position: absolute;left: 366px;top: 2px">';
live1html+='<IMG SRC="bilder/MickeoThomas_l.gif" WIDTH=99 HEIGHT=73 STYLE="position: absolute;left: 278px;top: 376px">';
live1html+='<IMG SRC="bilder/Thomascitykul_l.gif" WIDTH=101 HEIGHT=88 BORDER=0 STYLE="position: absolute;left: 402px;top: 301px">';
live1html+='<IMG SRC="bilder/Andreascitykul_l.gif" WIDTH=91 HEIGHT=88 STYLE="position: absolute;left: 23px;top: 258px">';
live1html+='<IMG SRC="bilder/ThomasDavidCitykul_l.gif" WIDTH=73 HEIGHT=79 STYLE="position: absolute;left: 453px;top: 157px">';
live1html+='<IMG SRC="bilder/DSC02423_l.gif" WIDTH=90 HEIGHT=73 STYLE="position: absolute;left: 114px;top: 289px">';
live1html+='<IMG SRC="bilder/9e1are2_l.gif" WIDTH=91 HEIGHT=64 STYLE="position: absolute;left: 274px;top: 24px">';
live1html+='<IMG SRC="bilder/DSC00172_l.gif" WIDTH=86 HEIGHT=72 STYLE="position: absolute;left: 365px;top: 125px">';
live1html+='<IMG SRC="bilder/Bild122_l.gif" WIDTH=74 HEIGHT=62 STYLE="position: absolute;left: 200px;top: 79px">';
live1html+='<IMG SRC="bilder/P1030311_l.gif" WIDTH=79 HEIGHT=66 STYLE="position: absolute;left: 388px;top: 236px">';
live1html+='<DIV STYLE="position: absolute;left: 0px;top: 195px;width: 547px;z-index: 200;font-size: 32px;font-family: Monotype Corsiva;font-weight: bold;text-align: center;clip: rect(auto 377px auto 170px)">Livebilder<BR>2006-2007</DIV>';
live1html+='<MAP NAME="live1thumbs">';
live1html+='<AREA SHAPE="polygon" COORDS="126,408, 230,444, 242,386, 167,361" HREF="bilder/P1030295.jpg" TARGET=\'_blank\' onMouseOver="opaco(128,362,117,84);bildtext(\'Octopus?\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="11,113, 47,139, 98,81, 40,30" HREF="bilder/DSC02437.jpg" TARGET=\'_blank\' onMouseOver="opaco(11,30,88,110);bildtext(\'Andreas&nbsp;i&nbsp;m�rkret\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="100,81, 141,118, 198,90, 172,41" HREF="bilder/DSC02427.jpg" TARGET=\'_blank\' onMouseOver="opaco(100,41,99,78);bildtext(\'Wiks&nbsp;fhsk&nbsp;9/5&nbsp;2006\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="21,222, 48,140, 102,163, 80,225" HREF="bilder/P1030290.jpg" TARGET=\'_blank\' onMouseOver="opaco(21,140,82,86);bildtext(\'Thomas\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="366,38, 445,79, 502,27, 383,1" HREF="bilder/P1030303.jpg" TARGET=\'_blank\' onMouseOver="opaco(366,2,137,78);bildtext(\'Grand,&nbsp;Uppsala\')" onMouseOut="document.getElementById(\'opaBRCA\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="278,388, 280,488, 376,480, 348,376" HREF="bilder/MickeoThomas.jpg" TARGET=\'_blank\' onMouseOver="opaco(278,376,99,73);bildtext(\'Thomas&nbsp;&&nbsp;Micke\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="402,348, 449,388, 502,323, 447,301" HREF="bilder/Thomascitykul.jpg" TARGET=\'_blank\' onMouseOver="opaco(402,301,101,88);bildtext(\'Thomas&nbsp;p�&nbsp;Citykul&nbsp;2006\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="23,265, 58,345, 113,317, 84,258" HREF="bilder/Andreascitykul.jpg" TARGET=\'_blank\' onMouseOver="opaco(23,258,91,88);bildtext(\'Andreas&nbsp;p�&nbsp;Citykul&nbsp;2006\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="453,174, 466,235, 525,235, 506,157" HREF="bilder/ThomasDavidCitykul.jpg" TARGET=\'_blank\' onMouseOver="opaco(453,157,73,79);bildtext(\'Thomas&nbsp;och&nbsp;David&nbsp;p�&nbsp;Citykul&nbsp;2006\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="114,317, 167,361, 203,317, 168,289" HREF="bilder/DSC02423.jpg" TARGET=\'_blank\' onMouseOver="opaco(114,289,90,73);bildtext(\'Fredrik&nbsp;Forell,&nbsp;g�stgitarrist,&nbsp;njuter&nbsp;av&nbsp;CWs&nbsp;framtr�dande&nbsp;mellan&nbsp;sina&nbsp;tv�&nbsp;g�stspel\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="274,79, 342,87, 364,38, 274,24" HREF="bilder/9e1are2.jpg" TARGET=\'_blank\' onMouseOver="opaco(274,24,91,64);bildtext(\'Thomas,&nbsp;David&nbsp;och&nbsp;Micke&nbsp;p�&nbsp;Grand,&nbsp;Uppsala\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="365,163, 390,196, 453,174, 412,125" HREF="bilder/DSC00172.jpg" TARGET=\'_blank\' onMouseOver="opaco(365,125,86,72);bildtext(\'Vi&nbsp;har&nbsp;inga&nbsp;roddare\')" onMouseOut="document.getElementById(\'opaTLCA\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="200,91, 225,140, 273,132, 273,79" HREF="bilder/Bild122.jpg" TARGET=\'_blank\' onMouseOver="opaco(200,79,74,62);bildtext(\'Micke&nbsp;checkar\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='<AREA SHAPE=polygon COORDS="388,279, 447,301, 466,236, 400,236" HREF="bilder/P1030311.jpg" TARGET=\'_blank\' onMouseOver="opaco(388,236,79,66);bildtext(\'Andreas\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
live1html+='</MAP>';
andrahtml='<IMG SRC="bilder/forgrund2.png" BORDER=0 USEMAP="#andrathumbs" STYLE="position: absolute;left: 0px;top: 0px;z-index: 100">';
andrahtml+='<IMG SRC="bilder/DSC02204_l.gif" WIDTH=101 HEIGHT=67 STYLE="position: absolute;left: 173px;top: 24px;z-index:10">';
andrahtml+='<IMG SRC="bilder/DSC02078_l.gif" WIDTH=104 HEIGHT=80 STYLE="position: absolute;left: 342px;top: 38px;z-index:10">';
andrahtml+='<IMG SRC="bilder/DSC00175_l.gif" WIDTH=83 HEIGHT=70 STYLE="position: absolute;left: 142px;top: 90px;z-index:10">';
andrahtml+='<IMG SRC="bilder/IMG_0848_l.gif" WIDTH=94 HEIGHT=83 STYLE="position: absolute;left: 48px;top: 81px">';
andrahtml+='<IMG SRC="bilder/DSC00177_l.gif" WIDTH=87 HEIGHT=69 STYLE="position: absolute;left: 167px;top: 317px">';
andrahtml+='<IMG SRC="bilder/ff212_l.gif" WIDTH=77 HEIGHT=63 STYLE="position: absolute;left: 390px;top: 174px">';
andrahtml+='<IMG SRC="bilder/BILD077_l.gif" WIDTH=86 HEIGHT=68 BORDER=0 STYLE="position: absolute;left: 83px;top: 250px">';
andrahtml+='<IMG SRC="bilder/DSC00180_l.gif" WIDTH=110 HEIGHT=92 STYLE="position: absolute;left: 58px;top: 317px">';
andrahtml+='<IMG SRC="bilder/DSC02340_l.gif" WIDTH=71 HEIGHT=62 STYLE="position: absolute;left: 277px;top: 327px">';
andrahtml+='<IMG SRC="bilder/P1260018_l.gif" WIDTH=82 HEIGHT=66 STYLE="position: absolute;left: 80px;top: 163px">';
andrahtml+='<IMG SRC="bilder/P1260015_l.gif" WIDTH=94 HEIGHT=85 STYLE="position: absolute;left: 412px;top: 90px">';
andrahtml+='<IMG SRC="bilder/P7220129_l.gif" WIDTH=78 HEIGHT=87 STYLE="position: absolute;left: 447px;top: 236px">';
andrahtml+='<IMG SRC="bilder/P1280101_l.gif" WIDTH=70 HEIGHT=64 STYLE="position: absolute;left: 273px;top: 76px">';
andrahtml+='<DIV STYLE="position: absolute;left: 0px;top: 215px;width: 547px;z-index: 200;font-size: 32px;font-family: Monotype Corsiva;font-weight: bold;text-align: center;clip: rect(auto 377px auto 170px)">Andra&nbsp;bilder</DIV>';
andrahtml+='<MAP NAME="andrathumbs">';
andrahtml+='<AREA SHAPE=polygon COORDS="173,40, 199,90, 273,78, 273,24" HREF="bilder/DSC02204.jpg" TARGET=\'_blank\' onMouseOver="opaco(173,24,101,67);bildtext(\'Micke&nbsp;&&nbsp;David&nbsp;tar&nbsp;det&nbsp;lugnt&nbsp;en&nbsp;h�rlig&nbsp;v�rdag\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="342,88, 403,118, 445,79, 366,38" HREF="bilder/DSC02078.jpg" TARGET=\'_blank\' onMouseOver="opaco(342,38,104,80);bildtext(\'V�ra v�nner&nbsp;i&nbsp;bandet&nbsp;Klotet.&nbsp;David,&nbsp;Sofia,&nbsp;P�l&nbsp;&&nbsp;Mikael\')" onMouseOut="document.getElementById(\'opaBRCA\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="142,119, 187,159, 224,140, 199,90" HREF="bilder/DSC00175.jpg" TARGET=\'_blank\' onMouseOver="opaco(142,90,83,70);bildtext(\'Inspelning&nbsp;i&nbsp;tv�ttstugan\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="48,140, 102,163, 141,119, 99,81" HREF="bilder/IMG_0848.jpg" TARGET=\'_blank\' onMouseOver="opaco(48,81,94,83);bildtext(\'V�ran&nbsp;backdrop\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="167,361, 242,386, 253,332, 204,317" HREF="bilder/DSC00177.jpg" TARGET=\'_blank\' onMouseOver="opaco(167,317,87,69);bildtext(\'Inspelning&nbsp;i&nbsp;k�llaren\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="390,196, 400,236, 466,236, 453,174" HREF="bilder/ff212.jpg" TARGET=\'_blank\' onMouseOver="opaco(390,174,77,63);bildtext(\'Str�mmen&nbsp;m�ste&nbsp;ha&nbsp;g�tt\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="83,258, 113,317, 168,289, 149,250" HREF="bilder/BILD077.jpg" TARGET=\'_blank\' onMouseOver="opaco(83,250,86,68);bildtext(\'Inte&nbsp;alltid&nbsp;positivt\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="58,345, 127,408, 167,361, 113,317" HREF="bilder/DSC00180.jpg" TARGET=\'_blank\' onMouseOver="opaco(58,317,110,92);bildtext(\'Det&nbsp;h�nder&nbsp;att&nbsp;vi&nbsp;m�ste&nbsp;bygga&nbsp;scenen&nbsp;sj�lva\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="277,334, 278,388, 347,376, 322,327" HREF="bilder/DSC02340.jpg" TARGET=\'_blank\' onMouseOver="opaco(277,327,71,62);bildtext(\'I&nbsp;Danmark&nbsp;hittade&nbsp;vi&nbsp;en&nbsp;tavla&nbsp;av&nbsp;denna&nbsp;m�rkliga&nbsp;figur&nbsp;som&nbsp;vi&nbsp;valde&nbsp;att&nbsp;kalla&nbsp;Jimmy\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="80,224, 149,228, 161,188, 102,163" HREF="bilder/P1260018.jpg" TARGET=\'_blank\' onMouseOver="opaco(80,163,82,66);bildtext(\'Klaviatur&nbsp;i&nbsp;studion\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="412,125, 453,174, 505,156, 457,90" HREF="bilder/P1260015.jpg" TARGET=\'_blank\' onMouseOver="opaco(412,90,94,85);bildtext(\'Ljushuvud&nbsp;i&nbsp;studion\')" onMouseOut="document.getElementById(\'opaTLCA\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="447,301, 503,322, 524,236, 466,236" HREF="bilder/P7220129.jpg" TARGET=\'_blank\' onMouseOver="opaco(447,236,78,87);bildtext(\'Repspelning&nbsp;vid&nbsp;en&nbsp;r�d&nbsp;stuga&nbsp;(kolla&nbsp;filmklippen)\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='<AREA SHAPE=polygon COORDS="273,131, 318,139, 342,88, 273,76" HREF="bilder/P1280101.jpg" TARGET=\'_blank\' onMouseOver="opaco(273,76,70,64);bildtext(\'Sista&nbsp;minuten-inspelning&nbsp;p�&nbsp;Wiks&nbsp;folkh�gskola\')" onMouseOut="document.getElementById(\'opa\').style.visibility=\'hidden\';document.getElementById(\'btxt\').style.visibility=\'hidden\';">';
andrahtml+='</MAP>';
document.getElementById('live1').innerHTML=live1html;
document.getElementById('andra').innerHTML=andrahtml;

}

function spawnWall(){
tubemov=0;
document.getElementById('tubepanel').style.top='-500px';
document.getElementById('tubepanel').style.visibility='hidden';
setSida('bilder');
if (!notclear){
incr=0;
menumov=0;
transclear=true;

document.getElementById('wall').style.clip='rect(0px auto auto auto)';
xpos=new Array(6);
ypos=new Array(6);
xspos=new Array(6);
yspos=new Array(6);
htmlstr='';

for (j=0;j<6;j++){
xpos[j]=new Array(7);
ypos[j]=new Array(7);
xspos[j]=new Array(7);
yspos[j]=new Array(7);
for (i=0;i<7;i++){
    htmlstr+='<IMG SRC="bilder/shard'+Math.floor(Math.random()*3+1)+'.png" ID="s'+i+'x'+j+'" STYLE="position:absolute;top: '+(j*80)+'px;left: '+(i*80)+'px;visibility: hidden;z-index: 1000;">';
    xrand=Math.floor(Math.random()*35)-20;
    yrand=Math.floor(Math.random()*35)-20;
    htmlstr+='<IMG SRC="bilder/brick'+Math.floor(Math.random()*3+1)+'.png" ID="b'+i+'x'+j+'" STYLE="position:absolute;top: '+((j*80)+yrand)+'px;left: '+((i*80)+xrand)+'px;visibility: hidden;z-index: 1001;">';
    xpos[j][i]=(i*80+xrand);
    ypos[j][i]=(j*80+yrand);
    xspos[j][i]=(i*80);
    yspos[j][i]=(j*80);
}
}
document.getElementById('bricks').innerHTML=htmlstr;
document.getElementById('mobj1').style.top='0px';
document.getElementById('mobj1').style.left='0px';
document.getElementById('mobj2').style.top='0px';
//document.getElementById('mobj2').style.left='0px';
//document.getElementById('mobj3').style.top='0px';
//document.getElementById('mobj3').style.left'0px';
document.getElementById('mobj4').style.top='0px';
document.getElementById('mobj4').style.left='0px';
document.getElementById('live1').style.visibility='hidden';
document.getElementById('andra').style.visibility='hidden';
document.getElementById('live1').style.MozOpacity=1;
document.getElementById('andra').style.MozOpacity=1;
document.getElementById('live1').style.opacity=1;
document.getElementById('andra').style.opacity=1;
document.getElementById('wall').style.width=547;
document.getElementById('wall').style.height=515;

document.getElementById('m1').style.zIndex=2000;
document.getElementById('m2').style.zIndex=2001;
//document.getElementById('m3').style.zIndex=2000;
document.getElementById('m4').style.zIndex=2000;
}
else
    shw.style.visibility='visible';
document.getElementById('wallcontainer').style.visibility='visible';
}

function explode(){
if (tubemov>0){
    tubemov=0;
    tube(false);
}
if (menumov==0)
    movemenu();
else {
document.getElementById('m1').style.zIndex=8;
document.getElementById('m2').style.zIndex=9;
//document.getElementById('m3').style.zIndex=9;
document.getElementById('m4').style.zIndex=8;
}
if (incr==0){
clh=document.body.clientHeight+175;
xspeed=new Array(7);
yspeed=new Array(7);
for (i=0;i<7;i++){
    xspeed[i]=new Array(6);
    yspeed[i]=new Array(6);
    for(j=6;j>0;j--){
	xspeed[i][6-j]=(i-3)+Math.floor(Math.random()*6)-2;
	yspeed[i][6-j]=((j-1)*2)+Math.floor(Math.random()*3)-2;
    }
}
//document.getElementById('bricks').style.visibility='visible';
document.getElementById('b0x0').style.visibility='visible';
document.getElementById('b1x0').style.visibility='visible';
document.getElementById('b2x0').style.visibility='visible';
document.getElementById('b3x0').style.visibility='visible';
document.getElementById('b4x0').style.visibility='visible';
document.getElementById('b5x0').style.visibility='visible';
document.getElementById('b6x0').style.visibility='visible';
document.getElementById('s0x0').style.visibility='visible';
document.getElementById('s1x0').style.visibility='visible';
document.getElementById('s2x0').style.visibility='visible';
document.getElementById('s3x0').style.visibility='visible';
document.getElementById('s4x0').style.visibility='visible';
document.getElementById('s5x0').style.visibility='visible';
document.getElementById('s6x0').style.visibility='visible';
movebricks();
}
}

function movebricks(){
notclear=false;
if (incr<5.2&&Math.round(incr*10)/10==Math.round(incr)){
    document.getElementById('wall').style.clip='rect('+(Math.round(incr+1)*80+38)+'px auto auto auto)';
    for (i=0;i<7;i++){
	document.getElementById('b'+i+'x'+Math.round(incr)).style.zIndex=1982;
	document.getElementById('s'+i+'x'+Math.round(incr)).style.zIndex=1973;
	if (incr<4.2){
	    document.getElementById('b'+i+'x'+Math.round(incr+1)).style.visibility='visible';
	    document.getElementById('s'+i+'x'+Math.round(incr+1)).style.visibility='visible';
	}
    }
}
for (i=0;i<7;i++){
    for(j=6;j>0;j--){
	if ((6-j)<=incr){
	xpos[6-j][i]+=(xspeed[i][6-j]);
	ypos[6-j][i]-=(yspeed[i][6-j]);
	xspos[6-j][i]+=(xspeed[i][6-j])-(Math.floor(Math.random()*3)-1);
	yspos[6-j][i]-=Math.floor((yspeed[i][6-j])*0.80);
	yspeed[i][6-j]-=1;
	b=document.getElementById('b'+i+'x'+(6-j));
	s=document.getElementById('s'+i+'x'+(6-j));
	b.style.left=xpos[6-j][i]+'px';
	b.style.top=ypos[6-j][i]+'px';
	s.style.left=xspos[6-j][i]+'px';
	s.style.top=yspos[6-j][i]+'px';
	if (ypos[6-j][i]<clh||ypos[6-j][i]<475||yspos[6-j][i]<clh||yspos[6-j][i]<475)
	    notclear=true;
	}
    }
}
incr+=0.2;
if (notclear)
    setTimeout('movebricks()',50);
else {
    document.getElementById('wall').style.width=1;
    document.getElementById('wall').style.height=1;
}
}

function movemenu(){
document.getElementById('mobj1').style.top=-menumov+'px';
document.getElementById('mobj1').style.left=-Math.floor(menumov*0.95)+'px';
document.getElementById('mobj2').style.top=-(1.15*menumov)+'px';
//document.getElementById('mobj2').style.left=-(0.3*menumov)+'px';
//document.getElementById('mobj3').style.top=-(1.3*menumov)+'px';
//document.getElementById('mobj3').style.left=(0.4*menumov)+'px';
document.getElementById('mobj4').style.top=-(1.45*menumov)+'px';
document.getElementById('mobj4').style.left=(1.1*menumov)+'px';
menumov+=10;
if (menumov<=200)
    setTimeout('movemenu()',50);
else if (incr>0){
document.getElementById('m1').style.zIndex=8;
document.getElementById('m2').style.zIndex=9;
//document.getElementById('m3').style.zIndex=8;
document.getElementById('m4').style.zIndex=8;
}
}

function tube(show){
if (tubemov==0)
    offset=0;
if (show){
    if (menumov==0) 
	movemenu();
    offset+=scrollpointsx[17+Math.floor(tubemov/2)];
    document.getElementById('tubepanel').style.left=(566-offset)+'px';
    document.getElementById('tubepanel').style.top=(-488+offset)+'px';    
    if (tubemov==0)
	document.getElementById('tubepanel').style.visibility='visible';
}
else {
    offset+=tubemov+5;
    document.getElementById('tubepanel').style.top=(40+offset)+'px';
}
tubemov++;
if (tubemov<36)
    setTimeout('tube('+show+')',20);
else if (!show){
    document.getElementById('tubepanel').style.visibility='hidden';
    tubemov=0;
    }
    else if (klipp==0)
	spawnplayer(1);		

}

function spawnplayer(video){
t=document.getElementById('tubepanel');
switch(video)
{
case 1:
    t.innerHTML='<DIV STYLE="height: 22px"><A HREF="#" onClick="spawnplayer(7);">< F�reg�ende</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klipp 1 av 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#" onClick="spawnplayer(2);">N�sta ></A></DIV><object width="445" height="364"><param name="Wmode" value="transparent"></param><param name="movie" value="http://www.youtube.com/v/lCJ33D79rP4&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lCJ33D79rP4&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364" wmode="transparent"></embed></object>';
    break;    
case 2:
    t.innerHTML='<DIV STYLE="height: 22px"><A HREF="#" onClick="spawnplayer(1);">< F�reg�ende</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klipp 2 av 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#" onClick="spawnplayer(3);">N�sta ></A></DIV><object width="445" height="364"><param name="Wmode" value="transparent"></param><param name="movie" value="http://www.youtube.com/v/qhL6O5cV-F0&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qhL6O5cV-F0&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364" wmode="transparent"></embed></object>';
    break;    
case 3:
    t.innerHTML='<DIV STYLE="height: 22px"><A HREF="#" onClick="spawnplayer(2);">< F�reg�ende</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klipp 3 av 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#" onClick="spawnplayer(4);">N�sta ></A></DIV><object width="445" height="364"><param name="Wmode" value="transparent"></param><param name="movie" value="http://www.youtube.com/v/7vFE7HuQQUo&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/7vFE7HuQQUo&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364" wmode="transparent"></embed></object>';
    break;    
case 4:
    t.innerHTML='<DIV STYLE="height: 22px"><A HREF="#" onClick="spawnplayer(3);">< F�reg�ende</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klipp 4 av 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#" onClick="spawnplayer(5);">N�sta ></A></DIV><object width="445" height="364"><param name="Wmode" value="transparent"></param><param name="movie" value="http://www.youtube.com/v/db1x1qE-tvE&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/db1x1qE-tvE&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364" wmode="transparent"></embed></object>';
    break;    
case 5:
    t.innerHTML='<DIV STYLE="height: 22px"><A HREF="#" onClick="spawnplayer(4);">< F�reg�ende</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klipp 5 av 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#" onClick="spawnplayer(6);">N�sta ></A></DIV><object width="445" height="364"><param name="Wmode" value="transparent"></param><param name="movie" value="http://www.youtube.com/v/J_EfflSXeCY&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/J_EfflSXeCY&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364" wmode="transparent"></embed></object>';
    break;    
case 6:
    t.innerHTML='<DIV STYLE="height: 22px"><A HREF="#" onClick="spawnplayer(5);">< F�reg�ende</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klipp 6 av 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#" onClick="spawnplayer(7);">N�sta ></A></DIV><object width="445" height="364"><param name="Wmode" value="transparent"></param><param name="movie" value="http://www.youtube.com/v/tEqw4TACU2w&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/tEqw4TACU2w&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364" wmode="transparent"></embed></object>';
    break;    
case 7:
    t.innerHTML='<DIV STYLE="height: 22px"><A HREF="#" onClick="spawnplayer(6);">< F�reg�ende</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klipp 7 av 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#" onClick="spawnplayer(1);">N�sta ></A></DIV><object width="445" height="364"><param name="Wmode" value="transparent"></param><param name="movie" value="http://www.youtube.com/v/KVzs3KmP68Y&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KVzs3KmP68Y&hl=sv&fs=1&border=1&rel=0&color1=0xe4e488&color2=0xf4f4a7&iv_load_policy=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364" wmode="transparent"></embed></object>';
    break;    
default:
    t.innerHTML='';
}
klipp=video;
}

function displaypage(page,fade){
if (transclear){
shw=document.getElementById(page);
hde=false;

if (document.getElementById('live1').style.visibility=='visible')
    hde=document.getElementById('live1');
//if (document.getElementById('live2').style.visibility=='visible')
//    hde=document.getElementById('live2');
if (document.getElementById('andra').style.visibility=='visible')
    hde=document.getElementById('andra');
if (shw!=hde){
if (fade){
    shw.style.MozOpacity=0;
    shw.style.opacity=0;
    step=0;
    transclear=false;
    fader();
 }
shw.style.visibility='visible';
}
}
}

function fader(){
step+=5;
//hde.style.filter='alpha(opacity='+(100-step)+')';
hde.style.MozOpacity=(100-step)/100;
hde.style.opacity=(100-step)/100;
//shw.style.filter='alpha(opacity='+step+')';
shw.style.MozOpacity=step/100;
shw.style.opacity=step/100;
if (step<100&&navigator.appName!='Microsoft Internet Explorer')
    setTimeout('fader()',50);
else {
    hde.style.visibility='hidden';
//    shw.style.filter='none';
//    hde.style.filter='none';
    transclear=true;
}
}

function opaco(lft,tp,brd,hjd){
if (navigator.appName!='Microsoft Internet Explorer'){
if (lft==319||lft==342||lft==366)
    op=document.getElementById('opaBRCA');
else if (lft==365||lft==412||lft==457)
    op=document.getElementById('opaTLCA');
else
    op=document.getElementById('opa');
op.style.width=brd+'px';
op.style.height=hjd+'px';
op.style.left=lft+'px';
op.style.top=(tp+18)+'px';
op.style.visibility='visible';
}
}

function bildtext(txt){
document.getElementById('txt').innerHTML=txt;
document.getElementById('btxt').style.visibility='visible';
//startFade(0,true);
}

function startFade(opaci,io){
	document.getElementById('btxt').style.MozOpacity=(opaci/5);
	if (io)
		opaci++;
	else
		opaci--;
	if (opaci>=0||opaci<=1)
		setTimeout("startFade("+opaci+","+io+")",50);
	//else if (!io)
		//document.getElementById('btxt').style.visibility='hidden';
}

function flyttabildtextruta(ev){
if (!ev) 
    ev=window.event;
if (document.getElementById('btxt').clientWidth+ev.clientX+7<document.body.clientWidth)
    document.getElementById('btxt').style.left=(ev.clientX+3)+'px';
else
    document.getElementById('btxt').style.left=(document.body.clientWidth-document.getElementById('btxt').clientWidth-4)+'px';
document.getElementById('btxt').style.top=(ev.clientY+16)+'px';
}

function hideWall(){
document.getElementById('wallcontainer').style.visibility='hidden';
document.getElementById('live1').style.visibility='hidden';
document.getElementById('andra').style.visibility='hidden';
if (tubemov>0){
    tubemov=0;
    tube(false);
}
}
