//****************************************
//copyright I Ljungström, www.flowsim.o.se
//****************************************

function iljmmake()
{
if(document.iljform.iljtext1.value>0)
{

parent.iljupper.document.antal=document.iljform.iljtext1.value
if(parent.iljupper.document.antal>6){parent.iljupper.document.antal=6}
//parent.iljupper.document.startpict=document.iljform.iljtext2.value
//if(parent.iljupper.document.startpict<1){parent.iljupper.document.startpict=1}
parent.iljupper.document.mbredd=document.iljform.iljmbredd.value
parent.iljupper.document.mhojd=document.iljform.iljmhojd.value
parent.iljupper.document.bilda= new Array()
parent.iljupper.document.bildb= new Array()
parent.iljupper.document.adress= new Array()
parent.iljupper.document.targ= new Array()
parent.iljupper.document.alt=new Array()

parent.iljupper.document.bilda[0]=document.iljform.bild1a.value
parent.iljupper.document.bildb[0]=document.iljform.bild1b.value
parent.iljupper.document.adress[0]=document.iljform.adress1.value
parent.iljupper.document.alt[0]=document.iljform.alt1.value
if(document.iljform.targ1[0].checked=="1")
{parent.iljupper.document.targ[0]="_blank"}
if(document.iljform.targ1[1].checked=="1")
{parent.iljupper.document.targ[0]="_top"}
if(document.iljform.targ1[2].checked=="1")
{parent.iljupper.document.targ[0]=document.iljform.frame1.value}

if(parent.iljupper.document.antal>1)
{
parent.iljupper.document.bilda[1]=document.iljform.bild2a.value
parent.iljupper.document.bildb[1]=document.iljform.bild2b.value
parent.iljupper.document.adress[1]=document.iljform.adress2.value
parent.iljupper.document.alt[1]=document.iljform.alt2.value
if(document.iljform.targ2[0].checked=="1")
{parent.iljupper.document.targ[1]="_blank"}
if(document.iljform.targ2[1].checked=="1")
{parent.iljupper.document.targ[1]="_top"}
if(document.iljform.targ2[2].checked=="1")
{parent.iljupper.document.targ[1]=document.iljform.frame2.value}
}
if(parent.iljupper.document.antal>2)
{
parent.iljupper.document.bilda[2]=document.iljform.bild3a.value
parent.iljupper.document.bildb[2]=document.iljform.bild3b.value
parent.iljupper.document.adress[2]=document.iljform.adress3.value
parent.iljupper.document.alt[2]=document.iljform.alt3.value
if(document.iljform.targ3[0].checked=="1")
{parent.iljupper.document.targ[2]="_blank"}
if(document.iljform.targ3[1].checked=="1")
{parent.iljupper.document.targ[2]="_top"}
if(document.iljform.targ3[2].checked=="1")
{parent.iljupper.document.targ[2]=document.iljform.frame3.value}
}
if(parent.iljupper.document.antal>3)
{
parent.iljupper.document.bilda[3]=document.iljform.bild4a.value
parent.iljupper.document.bildb[3]=document.iljform.bild4b.value
parent.iljupper.document.adress[3]=document.iljform.adress4.value
parent.iljupper.document.alt[3]=document.iljform.alt4.value
if(document.iljform.targ4[0].checked=="1")
{parent.iljupper.document.targ[3]="_blank"}
if(document.iljform.targ4[1].checked=="1")
{parent.iljupper.document.targ[3]="_top"}
if(document.iljform.targ4[2].checked=="1")
{parent.iljupper.document.targ[3]=document.iljform.frame4.value}
}
if(parent.iljupper.document.antal>4)
{
parent.iljupper.document.bilda[4]=document.iljform.bild5a.value
parent.iljupper.document.bildb[4]=document.iljform.bild5b.value
parent.iljupper.document.adress[4]=document.iljform.adress5.value
parent.iljupper.document.alt[4]=document.iljform.alt5.value
if(document.iljform.targ5[0].checked=="1")
{parent.iljupper.document.targ[4]="_blank"}
if(document.iljform.targ5[1].checked=="1")
{parent.iljupper.document.targ[4]="_top"}
if(document.iljform.targ5[2].checked=="1")
{parent.iljupper.document.targ[4]=document.iljform.frame5.value}
}
if(parent.iljupper.document.antal>5)
{
parent.iljupper.document.bilda[5]=document.iljform.bild6a.value
parent.iljupper.document.bildb[5]=document.iljform.bild6b.value
parent.iljupper.document.adress[5]=document.iljform.adress6.value
parent.iljupper.document.alt[5]=document.iljform.alt6.value
if(document.iljform.targ6[0].checked=="1")
{parent.iljupper.document.targ[5]="_blank"}
if(document.iljform.targ6[1].checked=="1")
{parent.iljupper.document.targ[5]="_top"}
if(document.iljform.targ6[2].checked=="1")
{parent.iljupper.document.targ[5]=document.iljform.frame6.value}
}


document.writeln('<HTML><BODY BGCOLOR="white"><FONT FACE="Arial,Helvetica"COLOR="black"SIZE="2">')
document.writeln('<CENTER><TABLE WIDTH="390"><TD BGCOLOR="white">')
document.writeln('<FONT FACE="Arial,Helvetica"COLOR="black"SIZE="2">')
document.writeln('<BR><BR>')
document.writeln('&#60;SCRIPT LANGUAGE="JavaScript">//<BR>')
document.writeln('&#60;!--//<BR>')

document.writeln('if(document.images)//<BR>')
document.writeln('{//<BR>')
document.writeln('bild = new Array()//<BR>')
for(i=0;i<parent.iljupper.document.antal*2;i++)
{
document.writeln('bild['+i+']= new Image()//<BR>')
}
document.writeln('bild[0].src="'+parent.iljupper.document.bilda[0]+'"//<BR>')
document.writeln('bild[1].src="'+parent.iljupper.document.bildb[0]+'"//<BR>')
if(parent.iljupper.document.antal>1)
{
document.writeln('bild[2].src="'+parent.iljupper.document.bilda[1]+'"//<BR>')
document.writeln('bild[3].src="'+parent.iljupper.document.bildb[1]+'"//<BR>')}
if(parent.iljupper.document.antal>2)
{
document.writeln('bild[4].src="'+parent.iljupper.document.bilda[2]+'"//<BR>')
document.writeln('bild[5].src="'+parent.iljupper.document.bildb[2]+'"//<BR>')}
if(parent.iljupper.document.antal>3)
{
document.writeln('bild[6].src="'+parent.iljupper.document.bilda[3]+'"//<BR>')
document.writeln('bild[7].src="'+parent.iljupper.document.bildb[3]+'"//<BR>')}
if(parent.iljupper.document.antal>4)
{
document.writeln('bild[8].src="'+parent.iljupper.document.bilda[4]+'"//<BR>')
document.writeln('bild[9].src="'+parent.iljupper.document.bildb[4]+'"//<BR>')}
if(parent.iljupper.document.antal>5)
{
document.writeln('bild[10].src="'+parent.iljupper.document.bilda[5]+'"//<BR>')
document.writeln('bild[11].src="'+parent.iljupper.document.bildb[5]+'"//<BR>')
}
document.writeln('}//<BR>')



document.writeln('function iljswitch(bildplats,bildfil)//<BR>')
document.writeln('{//<BR>')
document.writeln('if(document.images)//<BR>')
document.writeln('{//<BR>')
document.writeln('document.images[bildplats].src = bild[bildfil].src //<BR>')
document.writeln('}//<BR>')
document.writeln('}//<BR>')
 
document.writeln('&#47;&#47;-->//<BR>')
document.writeln('&#60;/SCRIPT><BR><BR>')
document.writeln('&#60;!---//<BR>')
document.writeln('Se till så att alla tecken kommer med!<br>')
document.writeln('Bilderna hamnar i en lodr&auml;t rad.<BR>')
document.writeln('Ta bort BR-taggarna om bilderna ska ligga horisontellt.<BR>')
document.writeln('--><BR><BR>')


for(i=0;i<parent.iljupper.document.antal;i++)
{
document.write("&#60;A HREF='"+parent.iljupper.document.adress[i]+"'")
adr=parent.iljupper.document.adress[i]
if(adr.indexOf("@")==-1)
document.write(" TARGET='"+parent.iljupper.document.targ[i]+ "'")
document.write(" ONMOUSEOVER='iljswitch(\"b"+i+"\","+(i+1+i)+")'")
document.write(" ONMOUSEOUT='iljswitch(\"b"+i+"\","+(i+1*i)+")'>")
document.write("&#60;IMG SRC='"+parent.iljupper.document.bilda[i]+"'")
document.write(" ALT='"+parent.iljupper.document.alt[i]+ "'")
document.write(" NAME='b"+i+"'")
document.write(" WIDTH='"+ parent.iljupper.document.mbredd+ "'")
document.write(" HEIGHT='"+parent.iljupper.document.mhojd+ "'")
document.write(" BORDER='0'>")
document.write("&#60;/A>")
document.writeln("<BR><B>&#60;BR&#62;</B><BR>")
}

document.writeln('</TABLE>')
document.close()
}
}
