var adminwinvar filwinvar editwinvar bildwinvar nadafunction oppnaAdmin() {	if (adminwin!=nada && !adminwin.closed ) {		adminwin.close()	}	width = screen.width-100	height = screen.height	var postop = ( screen.height/2 ) - ( height/2 )	var posleft = ( screen.width/2 ) - ( width/2 )	height = height-135	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', menubar=no,location=yes,status=yes, scrollbars=yes"')	adminwin = window.open('', '', openstr)//	adminwin = openWindowCenter(width,height)	if ( document.forms[0].lang.value!=nada ) {		lang = document.forms[0].lang.value	} else {		lang = document.forms[0].sprak.value	}	adminsida = document.all ? 'admin.html' : 'admin01.html'	adminwin.location = replikaplats + adminsida + '?open&lang='+lang	adminwin.focus()}function bilderTillInfo( bildplats, nr ) {	//width = 510	width = 820	height = 300	var postop = ( screen.height/2 ) - ( height/2 )	var posleft = ( screen.width/2 ) - ( width/2 )	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', status=yes, scrollbars=no"')	if (editwin!=nada && !editwin.closed ) {		editwin.close()	}	editwin = window.open('','',openstr)	url = 'bilderTillInfo.html?open&lang='+document.forms[0].lang.value+'&sprak='+document.forms[0].sprak.value+'&nr='+nr+'&bildplats='+bildplats	editwin.location = url	editwin.focus()}function raderaMeta ( id ) {	if (editwin!=nada && !editwin.closed ) {		editwin.close()	}	var idn		if ( document.forms[0].sprakIDn.value.length>0 ) {		idn = document.forms[0].sprakIDn.value.substr(0, document.forms[0].sprakIDn.value.length-1)	} else {		idn = ""	}	if(document.forms[0].info !=nada && document.forms[0].info.value.length>0) {		kopplawin = openWindowCenter('400','250') //finns i fonsterOchDialoger.js		kopplawin.location = 'KopplatData.html?open&lang='+document.forms[0].lang.value+'&id='+document.forms[0].dataid.value+'&idlista='+document.forms[0].info.value		kopplawin.document.close()		kopplawin.focus()	}	else{		//Tomas nya rader slut 4 raqder under unremma		editwin = openWindowCenter('400','250') //finns i fonsterOchDialoger.js		editwin.location = 'metaTabort.html?open&lang='+document.forms[0].lang.value+'&defaultid='+id+'&idlista='+idn		editwin.document.close()		editwin.focus()	}	}function tabortFil ( id ) {	if (editwin!=nada && !editwin.closed ) {		editwin.close()	}	editwin = openWindowCenter('400','250')	editwin.location = 'bifogafilTabort.html?open&lang='+document.forms[0].lang.value+'&metaid='+id	editwin.focus()}function spelaUppMedia( id, fil ) {//Ta med filtyp f\u00F6r att kunna byta "spelare"	height = 330 //255	width = 480 //420	typ = rightBack(fil,'.')//	url = replikaplatsdata+'($all)/'+id+'/$file/'+escape(fil)	url = replikaplatsdata+'0/'+id+'/$file/'+escape(fil)//	url = '/com/lkab/lkwebb/portaldata.nsf/0/'+id+'/$file/'+escape(fil)	var postop = ( screen.height/2 ) - ( height/2 ) - 100	var posleft = ( screen.width/2 ) - ( width/2 )	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', resizable=yes, scrollbars=yes, status=no"')	if (filwin!=nada && !filwin.closed ) {		filwin.close()	}			filwin = window.open('','',openstr)	filwin.document.writeln('<HTML><HEAD>')	filwin.document.writeln('<TITLE>MEDIA</TITLE>')	filwin.document.writeln('<link rel="stylesheet"  href="'+replikaplats+'visa.css" type="text/css">')	filwin.document.writeln('<STYLE>')	filwin.document.writeln('BODY {margin: 0px 0px 0px 0px; }')	filwin.document.writeln('</STYLE>')	filwin.document.writeln('</HEAD><BODY><DIV ID="toppdel" STYLE="height: 100%; padding: 5px 5px 5px 5px">')	filwin.document.writeln('<CENTER>')	filwin.document.writeln('<TABLE HEIGHT="100%"><TR><TD>')	switch (typ) {		case 'swf':			filwin.document.write('<object width="400" height="310"')//			filwin.document.write('classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"')			filwin.document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#4,0,0,0">')			filwin.document.write('<param name="SRC" value="'+url+'">')//			filwin.document.write('<embed src="http://lkwebb.linnea.com'+url+'" width="400" height="310"/>')						filwin.document.write('<embed src="'+replikaplats+url+'" width="400" height="310"/>')						filwin.document.write('</object>')		break;		default:			if(document.all){				filwin.document.write('<OBJECT ID="MediaPlayer1" WIDTH=400 HEIGHT=310')				filwin.document.write(' CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"')				filwin.document.write(' STANDBY="Loading Windows Media Player components..."')				filwin.document.write(' TYPE="application/x-oleobject">')				filwin.document.write('<PARAM NAME="FileName" VALUE="'+url+'">')				filwin.document.write('<PARAM NAME="AutoStart" VALUE="true">')				filwin.document.write('<PARAM NAME="AutoRewind" VALUE="True">')				filwin.document.write('<param name="AnimationAtStart" value="true" />')				filwin.document.write('<param name="TransparentAtStart" value="false" />')				filwin.document.write('<PARAM NAME="ShowControls" VALUE="true">')				filwin.document.write('<param name="ShowPositionControls" value="false" />')				filwin.document.write('<param name="ShowStatusBar" value="true">')	    			filwin.document.write('<param name="ShowGoToBar" value="false" />')				filwin.document.write('<param name="ShowDisplay" value="false">')				filwin.document.write('<param name="DisplaySize" value="4" />')				filwin.document.write('<param name="BufferingTime" value="20" />')					filwin.document.write('</OBJECT>')					} else {				filwin.document.write('<object type="video/x-ms-wmv" id="MyWMPPlayer" width="320" height="260">')				filwin.document.write('<param name="uiMode" value="full" />')				filwin.document.write('<param name="autoStart" value="true" />')				filwin.document.write('<param name="URL" VALUE="'+url+'" />')//				filwin.document.write('<embed src="http://lkwebb.linnea.com'+url+'" width="400" height="310" autoStart="True" uiMode="full" volume="100" mute="false"/>')											filwin.document.write('<embed src="'+replikaplats+url+'" width="400" height="310" autoStart="True" uiMode="full" volume="100" mute="false"/>')				filwin.document.write('</object>')//				filwin.location = "http://lkwebb.linnea.com"+url//				filwin.location = replikaplats+url			}/*					filwin.document.write('<OBJECT ID="MediaPlayer1" WIDTH="400" HEIGHT="310"')			filwin.document.write(' CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"')			filwin.document.write('<param name="src" value="'+url+'">')			filwin.document.write('<param name="autoplay" value="true">')			filwin.document.write('<param name="controller" value="false">')			filwin.document.write('<embed src="'+url+'" width="400" height="310"')			filwin.document.write('autoplay="true" controller="false"/>')			filwin.document.write('</embed>')			filwin.document.write('</object>')			*/		break;	}	filwin.document.writeln('</TD></TR></TABLE>')	filwin.document.writeln('</CENTER>')	filwin.document.writeln('</DIV></BODY>')	filwin.document.writeln('</HTML>')	}function editeraFil( id ) {	height = 130	width = 310	var postop = ( screen.height/2 ) - ( height/2 ) - 100	var posleft = ( screen.width/2 ) - ( width/2 )	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', resizable=yes, scrollbars=yes, status=no"')	if (filwin!=nada && !filwin.closed ) {		filwin.close()	}	url = 'bifogafil.html?openform&id='+id+'&lang='+document.forms[0].lang.value	filwin = window.open('','',openstr)	filwin.location = url	}function hamtaFil( id, fil ) {	height = 100	width = 310	url = replikaplatsdata+'($all)/'+id+'/$file/'+escape(fil)	var postop = ( screen.height/2 ) - ( height/2 ) - 100	var posleft = ( screen.width/2 ) - ( width/2 )	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', resizable=yes, scrollbars=yes, status=no"')	if (filwin!=nada && !filwin.closed ) {		filwin.close()	}// SNYGGT MEN FUNKAR INTE :-(	editwin = window.open('filval?openform&id='+id+'&fil='+fil,'',openstr)	filwin = window.open('','',openstr)	filwin.document.writeln('<HTML><HEAD>')	filwin.document.writeln('<TITLE>'+fil+'</TITLE>')	filwin.document.writeln('<link rel="stylesheet"  href="'+replikaplats+'visa.css" type="text/css">')	filwin.document.writeln('<STYLE>')	filwin.document.writeln('BODY {margin: 0px 0px 0px 0px; }')	filwin.document.writeln('</STYLE>')	filwin.document.writeln('</HEAD><BODY><DIV ID="toppdel" STYLE="height: 100%; padding: 5px 5px 5px 5px">')	filwin.document.writeln('<CENTER>')		filwin.document.writeln('<DIV ID="topptext">'+textsida[3]+'</DIV>')		filwin.document.writeln('<BR><DIV ID="topptext"><A  HREF="'+url+'" onClick="opener.resizeFilWin()">'+fil+'</A></DIV>')//Kvar f\u00F6r att ha "ursprunget"//		filwin.document.writeln('<DIV>Do you want to view the page, click on the link ['+fil+'] below, otherwise right-click on the link below and chose Save target as...</DIV>')//		filwin.document.writeln('<BR><A HREF="'+url+'" onClick="opener.resizeFilWin()">'+fil+'</A>')	filwin.document.writeln('</CENTER>')	filwin.document.writeln('</DIV></BODY>')	filwin.document.writeln('</HTML>')}function resizeFilWin() {	intheight = screen.height-50	intwidth = intheight/1.3	intwidth = parseInt(intwidth);	intheight = parseInt(intheight);	if(intwidth>0 && intheight>0) {		filwin.moveTo(parseInt(intwidth)/2.8,0)		filwin.resizeTo(intwidth,intheight);	}}function visaBild( sokid ) {	if (bildwin!=nada && !bildwin.closed ) {		bildwin.close()	}	bildwin = openWindowCenter('450','175')	bildwin.location = replikaplats+'bilderTillInfoVisa.html?open&lang='+document.forms[0].lang.value+'&id='+sokid+'&sprak='+document.forms[0].sprak.value}function visaFil( id, fil ) {	height = screen.height-100	width = height/1.3	var postop = 0 //( screen.height/2 ) - ( height/2 ) - 100	var posleft = ( screen.width/2 ) - ( width/2 )	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', resizable=yes, status=yes, scrollbars=yes"')	if (editwin!=nada && !editwin.closed ) {		editwin.close()	}	editwin = window.open('','',openstr)	url='($all)/'+id+'/$file/'+fil	editwin.location = replikaplatsdata+url //'/andradata.html?open&'+obj		editwin.focus()}function laddaNerFil() {	var id = document.forms[0].dataid.value	location = 'nedladdning?openagent&id='+id //+'&replikaplatsdata='+replikaplatsdata}function bifogaFil( id ) {	if (editwin!=nada && !editwin.closed ) {		editwin.close()	}	editwin = openWindowCenter('300','150')	editwin.location = 'bifogafil.html?open&lang='+document.forms[0].lang.value+'&metaid='+id	editwin.focus()}function flytta( id, plats,position, efter ) {	width = 450	height = 300	var postop = ( screen.height/2 ) - ( height/2 )	var posleft = ( screen.width/2 ) - ( width/2 )	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', status=no, scrollbars=yes"')	if (editwin!=nada && !editwin.closed ) {		editWin.close()	}	editwin = window.open('','',openstr)	url=dbPath+'/platsinfo?openform&lang='+document.forms[0].lang.value+'&id='+id+'&status=flytta&typ=0&sprak='+document.forms[0].sprak.value+'&plats='+plats+'&position='+position+'&efter='+efter	editwin.location = url //'/andradata.html?open&'+obj		editwin.focus()}function lanka( id ) {	width = 450	height = 300	var postop = ( screen.height/2 ) - ( height/2 )	var posleft = ( screen.width/2 ) - ( width/2 )	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', status=no, scrollbars=yes"')	if (editwin!=nada && !editwin.closed ) {		editWin.close()	}	editwin = window.open('','',openstr)	url=dbPath+'/platsinfo?openform&lang='+document.forms[0].lang.value+'&id='+id+'&status=lank&typ=0&sprak='+document.forms[0].sprak.value	editwin.location = url //'/andradata.html?open&'+obj		editwin.focus()}function nyPlats( id ) {	width = 450	height = 300	var postop = ( screen.height/2 ) - ( height/2 )	var posleft = ( screen.width/2 ) - ( width/2 )	var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', status=no, scrollbars=yes"')	if (editwin!=nada && !editwin.closed ) {		editWin.close()	}	editwin = window.open('','',openstr)	plats = document.forms[0].plats.value	efter = plats	url=dbPath+'/platsinfo'+document.forms[0].typ.value+'?openform&lang='+document.forms[0].lang.value+'&id='+id+'&sprak='+document.forms[0].sprak.value+'&status=nyplats&typ='+document.forms[0].typ.value+'&sprak='+document.forms[0].sprak.value+'&plats='+plats+'&efter='+efter	editwin.location = url //'/andradata.html?open&'+obj		editwin.focus()}function taBort( id ) {	if ( confirm(popuptxt[12]) ) {		if (editwin==nada || editwin.closed ) {			width = 400			height = 200			var postop = ( screen.height/2 ) - ( height/2 )			var posleft = ( screen.width/2 ) - ( width/2 )			var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', status=no, scrollbars=no"')			editwin = window.open('','',openstr)			url=dbPath+'/tabortid?openform&lang='+document.forms[0].lang.value+'&id='+id			editwin.location = url //'/andradata.html?open&'+obj			}	}}function taBortStartsida( id ) {	if ( confirm(popuptxt[12]) ) {		if (editwin==nada || editwin.closed ) {			width = 400			height = 200			var postop = ( screen.height/2 ) - ( height/2 )			var posleft = ( screen.width/2 ) - ( width/2 )			var openstr = eval('"height='+height+',width='+width+', top='+postop+', left='+posleft+', status=no, scrollbars=no"')			editwin = window.open('','',openstr)			url=dbPath+'/taBortStartsida.html?openform&lang='+document.forms[0].lang.value+'&id='+id			editwin.location = url //'/andradata.html?open&'+obj			}	}}function spara( flagga ) {	var indataobj = document.getElementById('paragraph1')	var visningsobj = document.getElementById('editContent1')	var sparadata = document.forms[0].innehall	var sparavisning = document.forms[0].visning	sparadata.value = indataobj.innerHTML	sparavisning.value = visningsobj.innerHTML	var puffkoll //alert(visningsobj.innerHTML)//return false	if (document.forms[0].puffvisning!=nada) {		document.forms[0].puffvisning[0].disabled = false		document.forms[0].puffvisning[1].disabled = false	}	if (document.forms[0].puffrubrik!=nada) { //sida (typ=0), nyhet(typ=1)		puffkoll = doReplace(document.forms[0].puffrubrik.value, ' ', '')		if ( puffkoll=="" ){			alert(pufftxt[5])			puffedit('puffrubrik')			return false		}	}	if (document.forms[0].pufftext!=nada) { //sida (typ=0)  		puffkoll = doReplace(document.forms[0].pufftext.value, ' ', '')		if ( puffkoll=="" ){			alert(pufftxt[6])			puffedit('pufftext')			return false		}	}	if (document.forms[0].publiceratdatum!=nada) { //sida (typ=0)		puffkoll = doReplace(document.forms[0].publiceratdatum.value, ' ', '')		if ( puffkoll=="" ){			alert(pufftxt[7])			puffedit('publiceratdatum')			return false		}	}	if (document.forms[0].publicerat_tom!=nada) { //sida (typ=0)		puffkoll = doReplace(document.forms[0].publicerat_tom.value, ' ', '')		if ( puffkoll=="" ){			alert(pufftxt[8])			document.forms[0].publicerat_tom.focus()			return false		}	}	if ( flagga != nada) {		switch (flagga.toUpperCase()) {			case 'UTKAST':				document.forms[0].status.value = 'UTKAST'				break;		}	} else if ( document.forms[0].aktivitet!=nada) { //Detta kommer g\u00E4lla alla typ1		aktivitet = document.forms[0].aktivitet.value		//L\u00E5t statusen vara kvar, vi rensar bort den i sparaagenten med removeitem		if ( aktivitet.indexOf('BYTTILL')==0 ) {		} else {			document.forms[0].status.value = ''		}	} else {		document.forms[0].status.value = ''	}	document.forms[0].submit()}function gomTommaBilder() {	var bild1obj = document.getElementById('bildpos1')	var bild2obj = document.getElementById('bildpos2')	var bild3obj = document.getElementById('bildpos3')	var bild4obj = document.getElementById('bildpos4')	var bild5obj = document.getElementById('bildpos5')	var textobj = document.getElementById('paragraph1')	var innehall = document.getElementById('innehall')	var editobj = document.getElementById('editcontent1')	var printarea = document.getElementById('printarea')	if ( printarea == nada )		printarea = document.getElementById('PRINTAREA')	var pufftext = document.getElementById('pufftextvisa')	var puffrubrik = document.getElementById('puffrubrikvisa')	var arkiveringobj = document.getElementById('arkiveras')	var puffhojd = 0	if (pufftext!=nada){//		alert('pufftext ' + pufftext.scrollHeight)//		if ( document.all )//			puffhojd += pufftext.scrollHeight-3//		else//			puffhojd += pufftext.scrollHeight-5	}	if (puffrubrik!=nada) {//		alert('puffrubrik: ' + puffrubrik.scrollHeight)//		if ( document.all )//			puffhojd  += puffrubrik.scrollHeight-3//		else//			puffhojd  += puffrubrik.scrollHeight-5	}	if (printarea!=nada) {//		alert('printarea: '+printarea.scrollHeight)		puffhojd += printarea.scrollHeight	}	if(puffhojd < 5){		puffhojd = 5	}//	if ( !document.all )//		puffhojd += 7			//Flyttar bild och inneh\u00E5ll baserat p\u00E5 layout	if(textobj!=nada){		if (bild1obj!=nada && bild1obj.style.display != 'none') {			stdavst = -1			bild1obj.style.position = 'relative'			bild1obj.style.top = '-1px'/*			if (puffhojd > 0 && pufftext!=nada){				textobj.style.position='relative'				textobj.style.top = '-'+parseInt(textobj.scrollHeight+16+puffhojd)+'px'							}*/			if ( arkiveringobj!=nada) {//				puffhojd += arkiveringobj.scrollHeight+30				if ( !document.all ) {					stdavst += arkiveringobj.scrollHeight+35				} else {					stdavst += arkiveringobj.scrollHeight+28				}			} else {				if ( !document.all) {					stdavst += 6				} else {					stdavst += -2				}			}			if (pufftext!=nada) {				stdavst += pufftext.scrollHeight+puffrubrik.scrollHeight			} else {				if ( !document.all) {					stdavst += 32				} else {					stdavst += 35				}			}			bild3obj.style.position = 'relative'			bild4obj.style.position = 'relative'			bild5obj.style.position = 'relative'/*070426 ers\u00E4tts med direkt efterf\u00F6ljande kod						if ( !document.all ) {				bild3obj.style.top = '-'+parseInt(textobj.scrollHeight+15+puffhojd)+'px' //28				bild4obj.style.top = '-'+parseInt(textobj.scrollHeight+2+puffhojd)+'px' //15				bild5obj.style.top = '-'+parseInt(textobj.scrollHeight+-12+puffhojd)+'px'	//6			} else {				bild3obj.style.top = '-'+parseInt(textobj.scrollHeight+17+puffhojd)+'px' //28				bild4obj.style.top = '-'+parseInt(textobj.scrollHeight+3+puffhojd)+'px' //15				bild5obj.style.top = '-'+parseInt(textobj.scrollHeight+-10+puffhojd)+'px'	//6			}*///070426 start ers\u00E4ttning				testfall ? om sant : annars//				om MS ? SANT : FALSKT			//			bild2obj.style.top = '-'+parseInt(textobj.scrollHeight+stdavst)+'px' //38			document.all ? stdavst -= 13 : stdavst -= 11			bild3obj.style.top = '-'+parseInt(textobj.scrollHeight+stdavst)+'px' //28			document.all ? stdavst -= 14 : stdavst -= 12			bild4obj.style.top = '-'+parseInt(textobj.scrollHeight+stdavst)+'px' //15			document.all ? stdavst -= 13 : stdavst -= 11			bild5obj.style.top = '-'+parseInt(textobj.scrollHeight+stdavst)+'px'	//6//070426 slut ers\u00E4ttning/*			bild3obj.style.position = 'relative'			bild3obj.style.top = '-'+parseInt(textobj.scrollHeight+26+puffhojd)+'px'			bild4obj.style.position = 'relative'			bild4obj.style.top = '-'+parseInt(textobj.scrollHeight+13+puffhojd)+'px'			bild5obj.style.position = 'relative'			bild5obj.style.top = '-'+parseInt(textobj.scrollHeight+1+puffhojd)+'px'			*/		} else {			stdavst = -12			if ( arkiveringobj!=nada) {				puffhojd += arkiveringobj.scrollHeight+30				if ( !document.all ) {					stdavst += arkiveringobj.scrollHeight+35				} else {					stdavst += arkiveringobj.scrollHeight+29				}			} else if ( pufftext!=nada ) { //visning av nyhet/artikel/jobb				if ( !document.all ) {					stdavst += 4				} else {					stdavst += -1				}			} else { //visning av sida				if ( !document.all ) {					stdavst += 40				} else {					stdavst += 35				}			}			bild2obj.style.position = 'relative'			bild3obj.style.position = 'relative'			bild4obj.style.position = 'relative'			bild5obj.style.position = 'relative'//			if ( !document.all ) {//				stdavst = -7//			}//				bild2obj.style.top = '-'+parseInt(textobj.scrollHeight+29+puffhojd)+'px' //38//				bild3obj.style.top = '-'+parseInt(textobj.scrollHeight+15+puffhojd)+'px' //28//				bild4obj.style.top = '-'+parseInt(textobj.scrollHeight+2+puffhojd)+'px' //15//				bild5obj.style.top = '-'+parseInt(textobj.scrollHeight+-12+puffhojd)+'px'	//6//			} else {//				bild2obj.style.top = '-'+parseInt(textobj.scrollHeight+31+puffhojd)+'px' //38//				bild3obj.style.top = '-'+parseInt(textobj.scrollHeight+17+puffhojd)+'px' //28//				bild4obj.style.top = '-'+parseInt(textobj.scrollHeight+3+puffhojd)+'px' //15//				bild5obj.style.top = '-'+parseInt(textobj.scrollHeight+-10+puffhojd)+'px'	//6				if (pufftext!=nada) {					bild2obj.style.top = '-'+parseInt(textobj.scrollHeight+pufftext.scrollHeight+puffrubrik.scrollHeight+stdavst)+'px' //38//				testfall ? om sant : annars//				om MS ? SANT : FALSKT					document.all ? stdavst -= 13 : stdavst -= 11					bild3obj.style.top = '-'+parseInt(textobj.scrollHeight+pufftext.scrollHeight+puffrubrik.scrollHeight+stdavst)+'px' //28					document.all ? stdavst -= 14 : stdavst -= 12					bild4obj.style.top = '-'+parseInt(textobj.scrollHeight+pufftext.scrollHeight+puffrubrik.scrollHeight+stdavst)+'px' //15					document.all ? stdavst -= 13 : stdavst -= 11					bild5obj.style.top = '-'+parseInt(textobj.scrollHeight+pufftext.scrollHeight+puffrubrik.scrollHeight+stdavst)+'px'	//6				} else {//				testfall ? om sant : annars//				om MS ? SANT : FALSKT//					document.all ? stdavst += 0 : stdavst = 29					bild2obj.style.top = '-'+parseInt(textobj.scrollHeight+stdavst)+'px' //38					document.all ? stdavst -= 13 : stdavst -= 11					bild3obj.style.top = '-'+parseInt(textobj.scrollHeight+stdavst)+'px' //28					document.all ? stdavst -= 14 : stdavst -= 12					bild4obj.style.top = '-'+parseInt(textobj.scrollHeight+stdavst)+'px' //15					document.all ? stdavst -= 13 : stdavst -= 11					bild5obj.style.top = '-'+parseInt(textobj.scrollHeight+stdavst)+'px'	//6				}					//			}		}		if ( printarea!=nada ) {			var hojd = textobj.scrollHeight + printarea.scrollHeight			hojd +=puffhojd			if ( document.forms[0].layout.value == '3' ) {			} else if (bild1obj!=nada && bild1obj.style.display != 'none') {				if ( hojd < 317 )					innehall.style.overflow = 'hidden'			} else {				if ( hojd<395 )					innehall.style.overflow = 'hidden'			}		}	}		}function toggleLayout( L ) {	var utseendeobj = document.getElementById('editContent1')	var innehallobj = document.getElementById('paragraph1')	var bild1obj = document.getElementById('bildpos1')	var bild2obj = document.getElementById('bildpos2')	var bild3obj = document.getElementById('bildpos3')	var bild4obj = document.getElementById('bildpos4')	var bild5obj = document.getElementById('bildpos5')	var layoutobj = document.forms[0].layout	var editareaobj = document.getElementById('EDITAREA')	var puffrubrik = document.getElementById('puffrubrikvisa')	var pufftext = document.getElementById('pufftextvisa')	var arkiverasobj = document.getElementById('arkiverasvisa')		for ( var i=1; i <= 6; i++ ) {		el = 'L'+i		if ( parseInt(L)==i ) {			clickedL = document.getElementById(el.toString())			clickedL.style.borderColor = "red"		} else {			notClicked = document.getElementById(el.toString())			notClicked.style.borderColor = "white"		}	}	layoutobj.value = L	if ( L!=4 ) document.forms[0].datalank.value=""		if (L==1) {		utseende = '<DIV ID="bildpos1" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos1\', \'1\' )">'		if (bild1obj!=nada)			utseende+=bild1obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV CLASS="paragraph1L1" ID="paragraph1">'+innehallobj.innerHTML+'</DIV>'		utseende+= '<DIV ID="PRINTAREA"></DIV>'		utseende+= '<DIV STYLE="display: none" ID="bildpos2" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos2\', \'2\' )">'		if (bild2obj!=nada)			utseende+=bild2obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos3" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos3\', \'3\' )">'		if (bild3obj!=nada)			utseende+=bild3obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos4" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos4\', \'4\' )">'		if (bild4obj!=nada)			utseende+=bild4obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos5" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos5\', \'5\' )">'		if (bild5obj!=nada)			utseende+=bild5obj.innerHTML		utseende+= '</DIV>'		if ( document.forms[0].typ.value=="1" || document.forms[0].typ.value=="4" ){			puffrubrik.style.top = '100px'			pufftext.style.top = '100px'			if ( arkiverasobj!=nada )				arkiverasobj.style.top = '100px'		}	} else if (L==2) {		utseende= '<DIV CLASS="paragraph1L2" ID="paragraph1">'+innehallobj.innerHTML+'</DIV>'		utseende+= '<DIV ID="bildpos1" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos1\', \'1\' )">'		if (bild1obj!=nada)			utseende+=bild1obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="PRINTAREA"></DIV>'		utseende+= '<DIV ID="bildpos2" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos2\', \'2\' )">'		if (bild2obj!=nada)			utseende+=bild2obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos3" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos3\', \'3\' )">'		if (bild3obj!=nada)			utseende+=bild3obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos4" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos4\', \'4\' )">'		if (bild4obj!=nada)			utseende+=bild4obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos5" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos5\', \'5\' )">'		if (bild5obj!=nada)			utseende+=bild5obj.innerHTML		utseende+= '</DIV>'		if ( document.forms[0].typ.value=="1" || document.forms[0].typ.value=="4" ){			puffrubrik.style.top = '0px'			pufftext.style.top = '0px'			if ( arkiverasobj!=nada )				arkiverasobj.style.top = '0px'		}	}else if (L==3 || L==5 || L==6) {		utseende= '<DIV CLASS="paragraph" ID="paragraph1">'+innehallobj.innerHTML+'</DIV>'					utseende+= '<DIV ID="bildpos1" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos1\', \'1\' )">'		if (bild1obj!=nada)			utseende+=bild1obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="PRINTAREA"></DIV>'		utseende+= '<DIV ID="bildpos2" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos2\', \'2\' )">'		if (bild2obj!=nada)			utseende+=bild2obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos3" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos3\', \'3\' )">'		if (bild3obj!=nada)			utseende+=bild3obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos4" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos4\', \'4\' )">'		if (bild4obj!=nada)			utseende+=bild4obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos5" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos5\', \'5\' )">'		if (bild5obj!=nada)			utseende+=bild5obj.innerHTML		utseende+= '</DIV>'	}else if (L==4) {		utseende= '<DIV CLASS="paragraph" ID="paragraph1">'+innehallobj.innerHTML+'</DIV>'		utseende+= '<DIV ID="bildpos1" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos1\', \'1\' )">'		if (bild1obj!=nada)			utseende+=bild1obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="PRINTAREA"></DIV>'		utseende+= '<DIV ID="bildpos2" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos2\', \'2\' )">'		if (bild2obj!=nada)			utseende+=bild2obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos3" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos3\', \'3\' )">'		if (bild3obj!=nada)			utseende+=bild3obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos4" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos4\', \'4\' )">'		if (bild4obj!=nada)			utseende+=bild4obj.innerHTML		utseende+= '</DIV>'		utseende+= '<DIV ID="bildpos5" STYLE="display: none" onMouseOver="this.style.cursor=\'hand\'" onClick="bilderTillInfo( \'bildpos5\', \'5\' )">'		if (bild5obj!=nada)			utseende+=bild5obj.innerHTML		utseende+= '</DIV>'		//Pula med l\u00E4nkningen		lanka( document.forms[0].dataid.value )	}	utseendeobj.innerHTML = utseende}function andraData( obj ) {	if (editwin==nada || editwin.closed ) {		width = parseInt(innehallsBredd)+25		height = parseInt(innehallsHojd)		var postop = ( screen.height/2 ) - ( height/2 )		var posleft = ( screen.width/2 ) - ( width/2 )		var winheight = 130 + parseInt(height)		var winwidth = 650		if (innehallsBredd > 650){			winwidth = innehallsBredd		}		var openstr = eval('"height='+winheight+',width='+winwidth+', top='+postop+', left='+posleft+', status=no, scrollbars=no"')			objyta = document.getElementById(obj)		url=dbPath+'/andradataMCE.html?openform&yta='+obj+'&b='+width+'&h='+height+'&lang='+document.forms[0].lang.value		editwin = window.open('','',openstr)		editwin.location = url //'/andradata.html?open&'+obj	} else {		if ( obj != editwin.editobj ) {			if (confirm('Har du sparat \u00E4ndringarna i '+editwin.editobj+'?'))				editwin.location = 'andradataMCE.html?open&yta='+obj+'&lang='+document.forms[0].lang.value		} else {			if (!confirm(editwin.editobj+' \u00E4r redan \u00F6ppnat.\nVill du forts\u00E4tta med den redigeringen?')) {//				editwin.location = 'andradata.html?'+obj				editwin.focus()			}		}	}	editwin.focus()}
