//  2004©sldesign, script er laget av Sondre Larssen. sondre@slproduksjon.no)

var enPix = "<img border=\"0\" src=\"hovbild/pix.gif\" width=\"1\" height=\"1\">"
function tdFarge(f) {
	var tdf = "<td bgcolor=\"" + f + "\" width=\"1\"><img src=\"hovbild/pix.gif\" width=\"1\" height=\"1\"></td>"
	return tdf
}
	
function lagPix(w,h) {
	var pixBild = "<img border=\"0\" src=\"../hovbild/pix.gif\" width=\"" +w+ "\" height=\"" +h+ "\">"
	return pixBild
}

function lagBak(nr, antall) {
	var boks=""
	boks += "<table width=\""+(menyTing[nr].bredde+3)+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>"
	boks += "<td bgcolor=\"#000C4E\" width=\"1\">" + enPix + "</td>"
	boks += "<td><table width=\""+menyTing[nr].bredde+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
	for (i=0; i<antall; i++) {
		boks += "<tr><td><img src=\"knapps/bakkn_u.gif\" width=\""+menyTing[nr].bredde+"\" height=\"18\" name=\"bakkn" + i + "\"></td></tr>"
	}
	boks += "</table></td>"
	boks += tdFarge("#000C4E")
	boks += tdFarge("#4E6E6E")
	boks += "</tr><tr>"
	boks += tdFarge("#000C4E")
	boks += "<td bgcolor=\"#000C4E\">"+enPix+"</td>"
	boks += tdFarge("#000C4E")
	boks += tdFarge("#4E6E6E")
	boks += "</tr><tr>"
	boks += "<td width=\"1\">"+enPix+"</td>"
	boks += "<td bgcolor=\"#4E6E6E\">"+enPix+"</td>"
	boks += tdFarge("#4E6E6E")
	boks += tdFarge("#4E6E6E")
	boks += "</tr></table>"
	return boks  
}

function lagDekk(nr, antall) {
	var dekk=""
	dekk += "<table width=\""+(menyTing[nr].bredde+3)+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
	for (i=0; i<antall; i++) {
		dekk += "<tr><td><a href=\"" + menyTing[nr].linker[i] + "\" onMouseOver=\"byttMarkBak(" + nr + ", " + i + "); return settStatus('"+menyTing[nr].tekst[i]+"')\" onMouseOut=\"byttUtBak(" + nr + ", " + i + "); return settStatus('')\"><img src=\"hovbild/pix.gif\" width=\""+(menyTing[nr].bredde+3)+"\" height=\"18\" border=\"0\"></a></td></tr>"
	}	
	dekk += "</table>"
	return dekk
}

function lagTekst(nr, antall) {
	var tek = ""
	tek += "<table width=\""+menyTing[nr].bredde+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
	for (i=0; i<antall; i++) {
		tek += "<tr><td width=\"10\"><img src=\"hovbild/pix.gif\" width=\"10\" height=\"18\"></td><td width=\""+(menyTing[nr].bredde-10)+"\" class=\"hvit\">"
		if (menyTing[nr].aktiv[i]) tek += "<b>"
		tek += menyTing[nr].tekst[i]
		if (menyTing[nr].aktiv[i]) tek += "</b>"
		tek += "</td></tr>"
	}	
	tek += "</table>"
	return tek
}