
/*******
* Image Gallery
* @author Simon Kappel
* This notice must stay untouched
* 
* This script is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License (LGPL) as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* For more details on the GNU Lesser General Public License,
* see http://www.gnu.org/copyleft/lesser.html
********/

var g_xMenu=null;
var g_xMF=null;
var g_xBigImage=null;

g_axLinks = new Array("Home","Paintings","Sculptures","Comissions","Txt","Contact","CV");
g_axSculptures = new Array(new Image("Wilted Cross, 2010, Konsthallen Hishult","painted aluminium and steel, var.dim","wilted.jpg",false),

                           new Image("Human Canon, 2009","wood, 210x120x210 cm","canon.jpg"),
                           new Image("Thai Fish, 2009","nickel-plated bronze, steel and mirrror","Thai Fish. Degeberga Konsthall 2009.jpg",false),
                           new Image("Down Town, 2008"," By Light, Malmö, modified streetlight, various materials and dimentions","Down Town. By Light Malmo. 2008.jpg",false),
                           new Image("Down Town","detail","Down Town.2008.detail.JPG",false),
                           new Image("A Hard Rain´s A Gonna Fall, 2007","electric organ, wood, light and notes (Bob Dylan),160x80x60 cm","A Hard Rains A Gonna Fall. 2007. Electric organ.wood. light. 160x80x60 cm.jpg",false),
                           new Image("A Hard Rain´s A Gonna Fall","detail","detail.JPG"),
                           new Image("Sealed Flute, 2007","lead on plastic pipe, 265x30x30 cm","Sealed Flute 2007.JPG"),
                           new Image("Sealed Flute","detail","Sealed Flute 2007. lead and wood. 265x30x30 cm.JPG"),
                           new Image("Malevitj Down, 2007","modified traffic sign, the plate dimension is 106x106 cm (see Malevitj Black Square, 1923 Russian National Museum, St Petersburg","Malevitj Down. 2007. various dim..jpg"),
                           new Image("Bunker, 2007","fiber-glass, smoke-machine and brass details, 250x170x170 cm","Bunker.Kristianstad Konsthall 2007. Fiberglass.smokemachine and brass.JPG"),
                           new Image("Bunker","testing smoke-machine","Bunker 2007.JPG"),
                           new Image("Vicissitudes of Daily Life, 2007","Installation view, Roger Bjorkholmen Galleri, Stockholm","Installation view. Galleri Roger Bjorkholmen 2007.jpg"),
                           new Image("Roger Björkholmen Galleri","Stockholm 2007","Roger Bjorkholmen Galleri 2007.jpg",false),
                           new Image("Tourist, 2007, Grünke Collection Rügen, Germany","painted steel and glass lenses","Tourist 2007.jpg"),
                           new Image("Tourist","detail","detail Touristen).jpg"),
			   new Image("The Club, 2005, collection Konsthallen Hishult, Sweden","painted wood, porcelain and copper-wire, scale 1:0,9 of a Harley Davidson Electra Glide","bike.jpg"),
			   new Image("Keep Out!, 2005","wood,porcelain, wire, metal, tapestry, var. dim","keepout.jpg",false),
			   new Image("In den Wohnungen des Todes, 2004","Installation in the room of Nelly Sachs at The Royal Library, Stockholm, diabase object with bronze capsules (painted)","In den Wohnungen des Todes. Nelly Sachs-rummet. Kungliga Binlioteket. Stockholm 2004.diabase with painted bronze objects.jpg",false),
                           new Image("Tungsten Tomb, 2005, Collection of Hansestadt Wismar, Germany","diabase, steel, glow-pigment and armor-glass, 110x90x60 cm","Tungsten Tomb. 2005. Wismar. Germany. Diabase.glass.steel.glowpigment. 110x80x65 cm.jpg",false),
                           new Image("Tungsten Tomb","Wismar, Germany","Tungsten Tomb (2).jpg"),
			   new Image("Watch the Power Station, 2006","mirror and model-craft, 80x90x100 cm","Watch the.......jpg",false),
			   new Image("Watch the Power Station","detail","Watch the Power Station. 2006. watch mirror. model craft. various dimensions.jpg"),
			   new Image("Watch the Power Station","detail","power detalj.jpg"),
			   new Image("Watch the Lodger, 2005, various material and dimensions","Collection Christian Dam Gallery, Copenhagen","watch the 1.jpg",false),
                           new Image("Watch the Lodger, 2005","detail","watch the 2.jpg"),
                           new Image("Skyltar, 1999, Rooseum, Malmö","painted bronze 160x50x8 cm","roos.jpg"),
                           
                           new Image("Holkar och Skyltar, The Edstrand Foundation Art Prize 1999, Rooseum, Malmö","waxpaint (encaustik), cast iron, wood","Plates and Boxes. The Edstrand Foundation Art Prize 1999. Rooseum.Malmo.jpg"),
                           new Image("Skyltar, (Signs)","Rooseum-Center for Contemporary Art, Malmö","Plates. The Edstrand Foundation Art Prize 1999. Rooseum.Malmo.jpg"),
                           new Image("Tungsten 1-3, Breanäs Kulturhus 1999","Brännhult-diabase and bronze objects, dim. variable","Tungsten1. Breanas Kulturhus 1999.jpg"),
                           new Image("Tungsten 1-3","Roger Björkholmen Galleri, Stockholm 2004","Tungsten1.jpg"),
                           
                           new Image("Holkar (Boxes), 1995","Malmö Konsthall, (Mellanrummet)","Boxes. Malmo Konsthall  1995.jpg"),
                           new Image("Holk (Box)","1995","Box. Malmo Konsthall 1995.jpg"),
                           new Image("Installation view, Galerie Leger, Malmö 1994","Weather Station with sound (seaweather-report)","Weather. Installation view. Galerie Leger Malmo 1995.jpg"),
                           new Image("Holkar och Skyltar (Signs and Boxes), Ronneby Kulturcentrum 1995","44 boxes, 44 signs 44 bowls, ticking soundeffect, water","Plates and Boxes.Ronneby Kulturcentrum 1995.jpg"),
                           new Image("Signs and Boxes","detail","Plates and Boxes 1995.jpg",false),
                           new Image("Unibox, 1990, Galleri Periscope, Stockholm","2x2x2 m, bulletproof steel and glass","Unibox.2x2x2m.Bulletproof steel. Galleri Periscope Stockholm 1990.jpg",false),
                           new Image("Sand Container","steel, sand, 90x45x50 cm","Sand Container  1991. 80x60x40 cm.jpg",false),
			   new Image("Full scale Container, unpainted","Mosebacke torg, Stockholm 1990","container2.jpg",false),
			   new Image("Podium 1, 1983","wood","Podium.1983.jpg"),
                           new Image("Podium 3, 1983","wood and rubber","Podium III. 1983. 220x90x20 cm. wood and rubber.jpg")
                          


                            );
                            
g_axPaintings = new Array( new Image("Installation view","Roger Björkholmen Galleri Stockholm 2010","view.jpg"),
			   new Image("Installation view","Tjörnedala Konsthall, Baskemölla 2010","tjornedala.jpg"),
                           new Image("Marshall 10A, 2010","188x124 cm each (diptych) acrylic on canvas","marshalls.jpg"),
			   new Image("Marshall 10B, 2010","150x100 cm acrylic on paper","marshall10b.jpg",false),
			   new Image("Gibson 10A, 2010","100x70 cm acrylic on paper","gibson10a2010.jpg",false),
                           new Image("Gibson 10B, 2010","50x49 cm acrylic on paper","gibson10B.jpg",false),
                           new Image("Fender 10B, 2010","76x57 cm acrylic on paper","fender10B.jpg",false),
			   new Image("Fender 10C, 2010","50x50 cm acrylic on paper","fender10c.jpg",false),
                           new Image("Vox 10A, 2010","50x50 cm each (diptych), acrylic on epoxi laminate","vox10A.jpg"),
                           new Image("Vox 10B, 2010","92x92 cm each (diptych), acrylic on epoxi laminate","vox10B.jpg"),
                           new Image("Hagström 10A, 2010","92x92 cm acrylic on epoxi laminate","hagstrom10A.jpg",false),
			   new Image("Hagström 10B, 2010","acrylic on canvas","hagstrom10b.jpg",false),
                           new Image("Gretsch, 2010","diam 50 cm acrylic on aluminium plate","gretch1.jpg",false),
                           new Image("Rickenbacker, 2010","25x25 cm acrylic on circuit board","rickenbacker.jpg",false),
                           new Image("Bed reserved, 2010","30x20 cm acrylic on mdf","sovplats.jpg",false),
                           new Image("Seat reserved, 2010","30x20 cm acrylic on mdf","sittplats.jpg",false),
			   new Image("M, 2010","diam. 100 cm acrylic on aluminium plate","m2010.jpg",false),
			   new Image("Crosscut (altered) 2009","185x120 cm each (diptych) acrylic on canvas","vedkap.jpg"),
                           new Image("Routing, 2009","129x129 cm each, acrylic on canvas","Routing 2009.129x129 cm. acrylic on canvas.jpg"),
                           new Image("Routing","detail","Routing.2009. detail.jpg"),
			   new Image("Na Naah, 2008","120x140 cm, acrylic on plywood","NaNaah.2008.120x140cm.acrylic on plywood.jpg"),
                           new Image("Hoo Hoo, 2009","Diam. 100 cm each, acrylic on canvas on parabols","HooHoo.2009.acrylic on parabols. diam.100cm each (diptych).jpg"),
                           new Image("Saga, 2009","104x163 cm, acrylic on mdf","Saga.2009.104x163 cm.acrylic on mdf.jpg"),
                           new Image("Vä, 2009","104x163 cm, acrylic on mdf","va2009-104x163cm-acrylic-on-mdf.jpg"),
                           new Image("Vä","detail","Va.detail.jpg"),
			   new Image("Installation view","Galerie Hartwich, Germany 2009","hartwich.jpg"),
                           new Image("No Abstraction, 2008","50x50 cm, acrylic on epoxi laminate","No Abstraction. 2008. 50x50 cm. acrylic on plate.jpg",false),
                           new Image("Dead End, 2008","92x92 cm, acrylic on epoxi laminate","Dead End 2008. 92x92 cm.acrylic on plate.jpg",false),
			   new Image("GO, 2008","92x92 cm, acrylic on epoxi laminate","GO.2008.92x92 cm. acrylic on plate.jpg",false),
			   new Image("Why, 2008","100x100 cm, acrylic on aluminium plate","Why.2008. 100x100 cm. acrylic on plate.jpg",false),
			   new Image("One Way Only, 2008","185x120 cm, acrylic on acrylic glass","One Way Only. 2008. 185x120 cm. acrylic on plate.jpg",false),
			   new Image("Children Crossing, 2004","185x120 cm each (diptych), acrylic on canvas","Children Crossing 2004 185x120 each. acrylic on canvas.jpg"),
			   new Image("Travellers Head, 2004","50x50 cm each (diptych), acrylic on epoxi laminate","Travellers Head 2004. 50x50 cm each. acrylic on plates.jpg"),
			   new Image("Judge´s Head, 2004","50x50 cm each (diptych), acrylic on epoxi laminate","judges head.jpg"),
			   new Image("Meteorit, 1993","35x45 cm, screenprint on circuit board, edition 80 ex","meteorit.jpg"),
                           new Image("Auspuff, 1990","220x220 each (diptych) waxpaint, lead on wood","auspuff (2).jpg"),
   			   new Image("Head in progress, 2004","foto: Kjell-Åke Gustavsson","head.jpg",false),
			   new Image("Wilderness Caches, 1999, 150x100 cm, charcoal,acrylic and wax on paper","Collection of Bo Siesjö, Lund","kolteckning.jpg",false),
                           new Image("Installation view","Galerie Leger, Malmö 1990","Installation view. Galerie Leger Malmo.1990.jpg"),
                           new Image("left; Monument, 1990, Collection of Moderna Museet, Stockholm, (right; Hybrid 1990)","Waxpaint and lead on wood, 220x220 cm each (diptych)","left.Monument 1990. Collection of Moderna Museet. Stockholm. right.Hybrid 1990.jpg",false),
                           new Image("Unter dem Siegel der Verschwiegenheit, Künstlerhaus Bethanien, Berlin 1989","Waxpaint on wood, 220x220 cm each, object diam.60 cm","Unter dem Siegel der Verschwiegenheit. Kunstlerhaus Bethanien.Berlin 1989.jpg"),
                           new Image("Die Falle, 1989, collection of Malmö Konstmuseum","Waxpaint and lead on wood","Die Falle. 1989.jpg"),
                           new Image("no title, 1988","Oil on copper plates, 100x210 cm","No title.1988. Oil on copper plates. 100x210 cm.jpg"),
			   new Image("-, 1987","200x300 cm, privat collection, Zürich, oil and wood on steel plates","1987.jpg"),
     			   new Image("-, 2010, collection of Björn Olsson, Stockholm","40x60 cm, acrylic and wood on aluminium plate","remade.jpg"),
			   new Image("<I>Sydnytt</I>","Malmö Konsthall 1987","sydnytt.jpg"),
                           new Image("no title, 1987","Wax and enamelpaint on lead on wood, 110x110 cm each (diptych)","mejan.jpg"),
			   new Image("-, 1987","oil and wax on paper","brun.jpg"),
                           new Image("-, 1986","oil and wax on paper","Untitled-1.jpg"),
			   new Image("Elevutställning","Konstakademien Stockholm 1987","akademien.jpg"),
                           new Image("Ungt måleri i Skåne","Galleri Nordqvist Malmö 1983","ungt.jpg")

                            );
                            
g_axCommisions = new Array(new Image("Ruska, Göteborgs Universitet-media 2008","bronze with nickel -plated bronze object, 226x210x210 cm","ruska5.jpg"),
                           new Image("Ruska","GU","3[1].jpg"),
                           new Image("Koloni 1-3, Södersjukhusets entré, Stockholm, 2001","bronze objects on engraved copper plates, each piece 3x3 m, (3 pieces)","sos1.jpg"),
                           new Image("Koloni 1-3","details","sos2.jpg"),
                           new Image("Koloni 1-3","details","sos3.jpg"),
			   new Image("Koloni 1-3","detail with living flower","sos6.jpg"),
                           new Image("work in progress","SÖS, Stockholm 2001","mounting.jpg",false),
			   new Image("The Oath of Secrecy, AstraZeneca Lund, 1997","114 kvm laminated glass, charcoal drawings, bronze objekts, steel frame, blasted details","oath4.jpg",false),
                           new Image("The Oath of Secrecy","model","astraa.jpg",false),
                           new Image("The Oath of Secrecy","model","astrab.jpg",false),
                           new Image("The Oath of Secrecy","detail","oath1.jpg",false),
                           new Image("The Oath of Secrecy","detail","oath2.jpg"),
                           new Image("The Oath of Secrecy","detail","oath5.jpg"),
                           new Image("The Oath of Secrecy","detail","oath6.jpg"),
                           new Image("The Oath of Secrecy","detail","oath7.jpg",false),
                           new Image("The Oath of Secrecy","detail","oath8.jpg",false),
                           new Image("The Oath of Secrecy","detail","oath9.jpg",false),
                           new Image("The Oath of Secrecy","detail","oath10.jpg",false),
			   new Image("The Oath of Secrecy","detail","astra2.jpg"),	
   			   new Image("The Oath of Secrecy","detail","astra3.jpg"),
			   new Image("The Oath of Secrecy","detail","astra11.jpg"),
			   new Image("The Oath of Secrecy","detail","astra10.jpg"),
 			   new Image("The Oath of Secrecy","detail","zeneca.jpg",false),
                           new Image("Mounting glass in steel frame","detail","astrac.jpg",false),
                           new Image("Laminating glass","high pressure chamber","astrad.jpg",false),
                           new Image("Bronze casting details","KKV Malmö","astrae.jpg",false),
			   new Image("Edges of Despair, Geo-huset, Stockholms Universitet, 1997","perforated and painted mdf-board, engraved copper-plates and bronze objects","geohuset.jpg"),
                           new Image("Edges of Despair, detail","bronze","despair.jpg"),
			   new Image("Edges of Despair","bronze detail","despair1.jpg",false),
			   new Image("Edges of Despair, detail","perforated and painted mdf","despair21.jpg",false),
			   new Image("Edges of Despair, detail","perforated and painted mdf","despair22.jpg",false),
			   new Image("Worldview, Karlshamn City Hall 1996","Engraved and patinated copper plates","worldview1.jpg"),
                           new Image("Worldview","detail","worldview2.jpg"),
                           new Image("Worldview","patinating process outdoors","worldview3.jpg",false),
			   new Image("Icontainer, Solna Kommun 1993","bronce and steel, 150x70x50 cm","icontainer.jpg",false),
			   new Image("Icontainer","detail","icontainer2.jpg",false)
                           
                            );
function Image(p_sTitle,p_sText,p_sSrc,p_bW)
{
    if(p_bW==undefined){p_bW=true;};
    this.m_sTitle=p_sTitle;
    this.m_sText=p_sText;
    this.m_sSrc=p_sSrc;
    this.m_bW=p_bW;
};

function Init()
{
	var myWidth = 0, myHeight = 0;
	if(typeof(window.innerWidth) == 'number') 
	{
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else if(document.documentElement && document.documentElement.clientWidth)
	{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} 
	else if(document.body && document.body.clientWidth) 
	{
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	
	var hTitle=document.getElementById("pagetitle");
	var hMF=document.getElementById("mainframe");
	var hMenu=document.getElementById("menu");
	
	var iLeft=(myWidth-800)/2;
	hMF.style.left=iLeft + "px";
	hMenu.style.left=iLeft - 110 + "px";
	hTitle.style.left=iLeft - 65 + "px";
	
	g_xMenu = new Menu();
	g_xMenu.Init();
	
	g_xMF = new MainFrame();
	
	g_xBigImage = new BigImage();
	g_xMF.GetEl().appendChild(g_xBigImage.GetEl());
	
	g_xMF.Open("Home");
};

function Menu()
{
    this.m_xWnd=document.getElementById("menu");
    this.Init=function()
    {
        var i;
        for(i=0;i<g_axLinks.length;i++)
        {
            var xMenuItem = document.createElement("a");   
            xMenuItem.innerHTML=g_axLinks[i];
            
            xMenuItem.onclick=function()
            {
                g_xMF.Open(this.innerHTML);
            }
                    
            this.m_xWnd.appendChild(xMenuItem);
            
            var xBR=document.createElement("br");
            this.m_xWnd.appendChild(xBR);
        };
    };
};

function MainFrame()
{
    var xThis = this;
    this.m_xWnd=document.getElementById("mainframe");
    this.m_xWnd.style.height="600px";
    this.m_xTitle=document.createElement("h1");
    this.m_xWnd.appendChild(this.m_xTitle);
    
    this.m_iDefaultHeight=660;
    
    this.m_axThumbNails=new Array();
    
    this.m_iImgCounter=0;
    
    this.m_xNxtBtn=null;
    this.m_xPrevBtn=null;
    
    this.axImages=null;
    
    this.m_xNxtBtn = document.createElement("div");
    this.m_xNxtBtn.style.position="absolute";
    this.m_xNxtBtn.style.left="100px";
    this.m_xNxtBtn.style.top="510px";
    this.m_xNxtBtn.style.cursor="pointer";
    
    this.m_xNxtBtn.innerHTML=">";
    this.m_xNxtBtn.onclick=function()
    {
        xThis.m_iImgCounter++;
        if(xThis.m_iImgCounter>xThis.axImages.length)
        {
            xThis.m_iImgCounter=0;
        }
        if(xThis.m_iImgCounter<0)
        {
            xThis.m_iImgCounter=xThis.axImages.length;
        }
        g_xBigImage.Show(xThis.axImages[xThis.m_iImgCounter]);
    };
    
    this.m_xWnd.appendChild(this.m_xNxtBtn);
   
    this.m_xPrevBtn = document.createElement("div");
    this.m_xPrevBtn.style.position="absolute";
    this.m_xPrevBtn.style.left="20px";
    this.m_xPrevBtn.style.top="510px";
    this.m_xPrevBtn.style.cursor="pointer";
    
    this.m_xPrevBtn.innerHTML="< ";
    this.m_xPrevBtn.onclick=function()
    {
        xThis.m_iImgCounter--;
        if(xThis.m_iImgCounter>xThis.axImages.length)
        {
            xThis.m_iImgCounter=0;
        }
        if(xThis.m_iImgCounter<0)
        {
            xThis.m_iImgCounter=xThis.axImages.length;
        }
        g_xBigImage.Show(xThis.axImages[xThis.m_iImgCounter]);
    };
    
    this.m_xWnd.appendChild(this.m_xPrevBtn);
    
    this.m_xNxtBtn.style.visibility="hidden";
    this.m_xPrevBtn.style.visibility="hidden";
     
    this.Open=function(p_sPage)
    {
        this.m_xNxtBtn.style.visibility="hidden";
        this.m_xPrevBtn.style.visibility="hidden";
     
        this.m_iImgCounter=0;
        var xBody = document.getElementById("body");
        xBody.style.backgroundImage="";
            
        this.m_xTitle.innerHTML=p_sPage;
        this.m_xWnd.style.height=this.m_iDefaultHeight+"px";
        g_xBigImage.Hide();
        
        var i;
        for(i=0;i<this.m_axThumbNails.length;i++)
        {
            this.m_xWnd.removeChild(this.m_axThumbNails[i].GetEl());
        };
        this.m_axThumbNails = [];        
        
        var xContent=document.getElementById("content")
        if(xContent)
        {
            this.m_xWnd.removeChild(xContent);
        };
        
        var bImages=false;
        
        if(p_sPage=="Sculptures")
        {
            bImages=true;
            this.axImages = g_axSculptures;    
        } 
        else if(p_sPage=="Paintings")
        {
            bImages=true;
            this.axImages = g_axPaintings;    
        }
        else if(p_sPage=="Comissions")
        {
            bImages=true;
            this.axImages = g_axCommisions;    
        }
        else if(p_sPage=="Home")
        {
            g_xBigImage.Show(new Image("Studio Anders Kappel","ark.Lars Gezelius","fasad.png"));    
        }
        else if(p_sPage=="Txt")
        {
            this.m_xWnd.appendChild(Txt());
        };

        if(bImages)
        {    
            var iTop=550;
            for(i=0;i<this.axImages.length;i++)
            {
                var xT = new ThumbNail(this.axImages[i]);
                xT.m_iID=i;
                xT.GetEl().style.left=10 + i%6*130 + "px";
                xT.GetEl().style.top=iTop + "px";
                this.m_xWnd.appendChild(xT.GetEl());
                this.m_axThumbNails.push(xT);
                
                if(i%6==5)
                {
                    iTop+=130;
                };
            };
            this.m_xWnd.style.height=iTop+130+"px";
            g_xBigImage.Show(this.axImages[0]);
            this.m_xNxtBtn.style.visibility="visible";
            this.m_xPrevBtn.style.visibility="visible";
        }
        
        if(p_sPage=="CV")
        {
            this.m_xWnd.appendChild(CV());
            this.m_xWnd.style.height="1160px";
        };
        
        if(p_sPage=="Contact")
        {
            this.m_xWnd.appendChild(Contact());
        };
    };
    
    if(this.m_xCR)
    {
        this.m_xWnd.removeChild(this.m_xCR);
    }
    
    this.m_xCR = document.createElement("div");
    this.m_xCR.className="copyright";
    this.m_xCR.innerHTML="Allt bildmaterial © Anders Kappel.<br/>"+
                  "Konstverken är skyddade enligt upphovsrättslagen (SFS 1960:729).<br/>"+
                  "Kopiering och återgivning får inte ske utan upphovsmannens tillstånd.";

    this.m_xWnd.appendChild(this.m_xCR);
    
    this.GetEl=function()
    {
        return this.m_xWnd;
    };
};

function BigImage()
{
    this.m_xWnd=document.createElement("div");
    this.m_xWnd.className="bigimg";
    this.m_xImg=document.createElement("img");
    //this.m_xImg.style.height="400px";
    this.m_xWnd.appendChild(this.m_xImg);
    
    this.m_sText=document.createElement("p");
    this.m_sText.innerHTML="texta";
    
    this.m_sTitle=document.createElement("p");
    this.m_sTitle.className="text";
    this.m_sTitle.style.fontWeight="100";
    this.m_sTitle.innerHTML="Title";
    
    this.m_xWnd.appendChild(this.m_sTitle);
    this.m_xWnd.appendChild(this.m_sText);
        
    this.Hide=function()
    {   
        this.m_xWnd.style.visibility="hidden";
    };
    
    this.Show=function(p_xImgData)
    {
        this.m_xWnd.style.visibility="visible";
        this.m_xImg.src="images/"+p_xImgData.m_sSrc;
        this.m_sTitle.innerHTML=p_xImgData.m_sTitle;
        this.m_sText.innerHTML=p_xImgData.m_sText;
    };
    
    this.GetEl=function()
    {
        return this.m_xWnd;
    };
};

function ThumbNail(p_xImgData)
{
    var xThis=this;
    this.m_xImgData=p_xImgData;    
    this.m_xWnd = document.createElement("div");
    this.m_xWnd.className="thumbnail";
    this.m_xImg = document.createElement("img");
    this.m_xImg.src="images/"+p_xImgData.m_sSrc;
    
    if(this.m_xImgData.m_bW)
    {
        this.m_xImg.style.width="100px";
        this.m_xImg.style.height="auto";
        this.m_xImg.style.marginTop="25px";
    }
    else
    {
        this.m_xImg.style.width="auto";
        this.m_xImg.style.height="100px";
        this.m_xImg.style.marginTop="10px";
    }
    
    this.m_xImg.style.cursor="pointer";
    this.m_xWnd.appendChild(this.m_xImg);
    
    this.m_xWnd.onmousedown=function()
    {
		g_xMF.m_iImgCounter=xThis.m_iID;
        g_xBigImage.Show(xThis.m_xImgData);
    };
    
    this.GetEl=function()
    {
        return this.m_xWnd;
    };
};

function Txt()
{
    var xTxt=document.createElement("div");
    xTxt.className="txt";
    xTxt.id="content";
    
    var sHTML;
    sHTML="<p><a href=\"http://konsten.net/?p=3081\">\"Anders Kappel på Roger Björkholmen Galleri\" - Maria Johansson</a></p>";
    sHTML+="<p><a href=\"txt/text1.jpg\">\"Tungsten Tomb\" - Annie Bardon</a></p>";
    sHTML+="<p><a href=\"txt/text2.pdf\">090914 ZENIT kulturtidningen i väst - Anders Thuresson</a></p>";
    sHTML+="<p><a href=\"txt/text3.pdf\">Gertrud Sandqvist, SIKSI, 1988</a></p>";
    
   
    
    xTxt.innerHTML=sHTML;
    return xTxt;
};

function CV()
{
    var xCV =document.createElement("div");
    xCV.className="cv";
    xCV.id="content";
    
    var sHTML;

    sHTML="<p> Born 1956 in Karlskrona, Sweden. Lives and works in Degeberga, Sweden.</p>";
    sHTML+="<p>1982-87 Royal University College of Fine Arts, Stockholm<br>";
    sHTML+="1988-89 IASPIS-International Artists Studio Program in Sweden, Künstlerhaus Bethanien, Berlin</p>";

    
    
    
	
    sHTML+="<p><b>Solo Exhibitions selected:<br></b>";
    sHTML+="2010  <I>Groove</I>,Roger Björkholmen Galleri, Stockholm<br>";
    sHTML+="2009  <I>Diptyker</I>, Brösarps Konsthall/Galerie Leger<br>";
    sHTML+="2008  Galerie Leger, Malmö<br>";
    sHTML+="2007  <I>Backwoods</I>, Italienska Palatset, Växjö<br>";
    sHTML+="2007  <I>The Vicissitudes of Daily Life</I>, Roger Björkholmen Galleri, Stockholm<br>";
    sHTML+="2007  <I>Vicissitudes</I>, Konsthallen Kristianstad<br>";
    sHTML+="2005  Galleri Lindqvist, Arkelstorp<br>";
    sHTML+="2004  Roger Björkholmen Galleri, Stockholm<br>";
    sHTML+="2004  Galerie Hartwich, Sellin/ Germany<br>";
    sHTML+="2004  Konsthallen Hishult<br>";
    sHTML+="2004  Galerie Leger, Malmö<br>";
    sHTML+="2002  Sölvesborgs Konsthall, Galerie Leger, Malmö<br>";
    sHTML+="2001  Galleri Andersson/Sandström, Umeå<br>";
    sHTML+="2000  Galerie Hartwich, Sellin/Germany<br>";
    sHTML+="1996  Malmö Konsthall (Mellanrummet), Galerie Leger, Malmö<br>";
    sHTML+="1995  <I>Holkar och Skyltar</I>, Ronneby Kulturcentrum, Konsthallen Hishult<br>";
    sHTML+="1993  Olle Olsson-huset, Hagalund Stockholm<br>";
    sHTML+="1990  Galerie Periscope, Stockholm<br>";
    sHTML+="1989  <I>Peilen</I>, Künstlerhaus Bethanien, Berlin, Galleri Sten Eriksson, Stockholm<br>";
    sHTML+="1987  Galleri Bernhardsson, Malmö, Galleri 29, Växjö<br>";
    sHTML+="1986  Galleri Gunnar Olsson, Stockholm<br>";
    sHTML+="1984  Galleri Erichs, Malmö<br>";
    sHTML+="1983  Galleri Mejan, Stockholm, Galleri Nordqvist, Malmö<br>";
    sHTML+="1978  Galleri Ikaros, Kristianstad Läns Museum<br></p>";

    sHTML+="<p><b>Group Exhibitions selected:<br></b>";
    sHTML+="2009  <I>Anders Kappel och Åsa Lindsjö</I>, Degeberga Konsthall<br>";
    sHTML+="2009  <I>Touristen</I>, Galerie Hartwich Sellin/Germany<br>";
    sHTML+="2008  <I>By Light</I>, Slottsparken Malmö<br>";
    sHTML+="2007  <I>Alte Freunde - Neue Freunde</I>, Galerie Hartwich Sellin/Germany<br>";
    sHTML+="2006  <I>Klimat</I>, Linköpings Konsthall<br>";
    sHTML+="2005  <I>ART CPH</I>, Copenhagen (Roger Björkholmen Galleri)<br>";
    sHTML+="2005  <I>Zum Wasser - Ins Licht</I>, Stadtgeschichtlichen Museums Schabbellhaus, Wismar/Germany<br>";
    sHTML+="2004  <I>Seeblicke 2</I>,  Galerie Hartwich Sellin/Germany<br>";
    sHTML+="2001  <I>Shifte</I>, Malmö Konstmuseum<br>";
    sHTML+="2000  <I>Birds</I>, Borgholms Slottsruin<br>";
    sHTML+="2000  <I>Century of Innocence - The History of The White Monocrome</I>, Rooseum Center for Contemporary   Art, Liljevalchs Konsthall, Stockholm<br>";
    sHTML+="1999  <I>Valda verk 77-99</I>, Kulturhuset Valfisken, Simrishamn<br>";
    sHTML+="1999  <I>Contemporary Art of Southern Sweden</I>, Pusan Metropolitan Art Museum, Korea, The Edstrand Foundation Art Prize 1999, Rooseum Center for Contemporary Art, Malmö<br>";
    sHTML+="1992  <I>The Contemporary Art of Sweden</I>, Fukui, Iwaki, Gunma, Tokushima and Kamakura Museum of Modern Art, Japan<br>";
    sHTML+="1992  <I>80-tal</I>, Växjö Konsthall i samarbete med Galleri 29<br>";
    sHTML+="1991  <I>80 Zwischen 90</I>, Kampnagelfabrik, Hamburg,  <I>Svensk Samtid</I>, The National Museum for Contemporary Art, Oslo<br>";
    sHTML+="1990  <I>Nordic Art Exhibition</I>, Charlottenborg Copenhagen, Art Fair Frankfurt (Galleri Bengt Adlers, Malmö)<br>";
    sHTML+="1990  <I>Samtiden i en Spegel</I>,  Moderna Museet, Stockholm<br>";
    sHTML+="1989  <I>Aquarelle Arches</I>, Björn Olsson Gallery, Stockholm<br>";
    sHTML+="1988  Frankfurt Art Fair, ARCO Madrid<br>";
    sHTML+="1987  <I>Gränsvärden</I>, Heland Thordén Wetterling Gallery, Stockholm<br>";
    sHTML+="1987  <I>Monitor 87</I>, Frölunda Kulturhus, Galleri Bernhardsson, Malmö<br>";
    sHTML+="1987  <I>Sydnytt</I>, Malmö Konsthall, Aurora 2  Sveaborg/Helsinki<br>";
    sHTML+="1986  <I>Skulptur</I>, Liljevalchs Konsthall och Kulturhuset, Stockholm<br>";
    sHTML+="1986  <I>3 Blekingar på Mejan</I>, Sölvesborgs Konsthall<br>";
    sHTML+="1984  <I>Videokonst</I>, Kulturhuset Stockholm<br>";
    sHTML+="1983  <I>De Odödliga</I>, Föreningsgatan 3, Malmö<br>";
    sHTML+="1983  <I>Outdoor Art</I>, Galärvarvet, Stockholm<br>";
    sHTML+="1983  <I>Ungt måleri i Skåne</I>, Galleri Nordqvist Malmö<br>";
    sHTML+="1981  <I>Unga Tecknare</I>, Nationalmuseum, Stockholm<br>";
    sHTML+="1980  <I>Svart på Vitt</I>, Landskrona Konsthall<br></p>";
    sHTML+="<p><b>Comissions:<br></b>";
    sHTML+="University of Gothenburg(Media-huset) , Stockholm University(Geo-huset), Stockholms Läns Landsting (Södersjukhuset), Karlshamns Kommun (Rådhuset), Solna Kommun ,Växjö University<br>";
    sHTML+="Hansestadt Wismar/Germany, Solna Kommun, AstraZeneca Lund, Danderyds Sjukhus, MKB Malmö<br></p>";
    
    sHTML+="<p><b>Collections:<br></b>"; 
    sHTML+="Moderna Museet, Stockholm<br>";
    sHTML+="The National Public Art Council, Stockholm<br>";
    sHTML+="Malmö Art Museum<br>";
    sHTML+="Gothenburg Museum of Art<br>";
    sHTML+="Norrköping Art Museum<br>";
    sHTML+="Linköping Art Museum<br>";
    sHTML+="Kristianstad Museum<br>";
    sHTML+="Kalmar Art Museum<br>";
    sHTML+="Sammlung Grünke, Rügen Germany<br></p>";


    xCV.innerHTML=sHTML;
  
    return xCV;
};

function Contact()
{

    var xContact=document.createElement("div");
    xContact.className="contact";
    xContact.id="content";

    var sHTML;
    
    sHTML="<p>kappel_anders@hotmail.com<br>";
    sHTML+="+46 (0)702 191096<br><br></p>";

    sHTML+="<p><b>Roger Björkholmen Galleri, Stockholm<br></b>";
    sHTML+="info@rogerbjorkholmen.com<br>"; 
    sHTML+="<a href='http://www.rogerbjorkholmen.com/'>http://www.rogerbjorkholmen.com/</a><br></p>";

    sHTML+="<p><b>Galerie Leger, Malmö<br></b>";
    sHTML+="leger@galerie-leger.se<br>";
    sHTML+="<a href='http://www.galerie-leger.se'>http://www.galerie-leger.se</a><br></p>";

    sHTML+="<p><b>Galerie Hartwich<br></b>";
    sHTML+="info@galeriehartwich.de<br>";  
    sHTML+="Schulstraße 5<br>"
    sHTML+="18586 sellin auf rügen<br>";
    sHTML+="telefon/fax: +49 (0) 383 03 - 867 25<br>";
    sHTML+="<a href='http://www.galeriehartwich.de'>http://www.galeriehartwich.de</a><br></p>";

    xContact.innerHTML=sHTML;
    return xContact;
};