
function toprad(txt)
{
        document.write("<DIV id=\"top\">")
        document.write("<H1>"+txt+"</H1>")
        document.write("</DIV>")
}

function rubrikrad()
{
        document.write("<DIV id=\"nav\">")
	document.write("<UL id=\"linklist\">")
           document.write("<LI><A href=\"index.htm\" title=\"Lilla Hallvards\">Start</A></LI>")
           document.write("<LI><A href=\"hantverk.htm\" title=\"Lilla Hallvards/Hantverk\">Hantverk</A></LI>")
           document.write("<LI><A href=\"far.htm\" title=\"Lilla Hallvards/Får\">F&aring;r</A></LI>")
           document.write("<LI><A href=\"lank1.htm\" title=\"Lilla Hallvards/Länkar\">L&auml;nkar</A></LI>")
           document.write("<LI><A href=\"kontakt.htm\" title=\"Lilla Hallvards/Kontakt\">Kontakt</A></LI>")
        document.write("</UL>")
        document.write("</DIV>")
}

function underrad(txt)
{
        document.write("<DIV id=\"nav\">")
        document.write("<UL id=\"linklist\">")

	if (txt=="Hantverk")
	{
           document.write("<LI><A href=\"kvilt.htm\" title=\"Lilla Hallvards/Kviltar\">Kviltar</A></LI>")
	   document.write("<LI><A href=\"skinn.htm\" title=\"Lilla Hallvards/Lammskinn\">Lammskinn</A></LI")
           document.write("<LI><A href=\"annat.htm\" title=\"Lilla Hallvards/Annat\">Annat</A></LI>")
	}

        document.write("</UL>")
        document.write("</DIV>")

}

function valsida(txt)
{
        document.write("<DIV id=\"nav\">")
	document.write("<UL id=\"linklist\">")

	if (txt=="Kviltar")
	{
           document.write("<LI><A href=\"kvilt5.htm\" title=\"Lilla Hallvards/Kviltar/Filtkvilt\"><img src=\"/images/Filt4b.jpg\" border=\"0\"></A></LI>")
           document.write("<LI><A href=\"kvilt2.htm\" title=\"Lilla Hallvards/Kviltar/Fårkudde\"><img src=\"/images/kuddefarb.jpg\" border=\"0\"></A></LI>")
           document.write("<LI><A href=\"kvilt3.htm\" title=\"Lilla Hallvards/Kviltar/Staffankvilt\"><img src=\"/images/Staffan2b.JPG\" border=\"0\"></A></LI>")
           document.write("<LI><A href=\"kvilt1.htm\" title=\"Lilla Hallvards/Kviltar/Kviltkudde\"><img src=\"/images/kudde1b.jpg\" border=\"0\"></A></LI>")
	}

	if (txt=="Lammskinn")
	{
           document.write("<LI><A href=\"skinn1.htm\" title=\"Lilla Hallvards/Lammskinn/Dynor\"><img src=\"/images/dyna1b.jpg\" border=\"0\"></A></LI>")
           document.write("<LI><A href=\"lammskinn1.htm\" title=\"Lilla Hallvards/Lammskinn/Lammskinn\"><img src=\"/images/S2b.jpg\" border=\"0\"></A></LI>")
	}

        document.write("</UL>")
        document.write("</DIV>")
}

function karnsida(vanster,vansterpil,mitt,hoger,hogerpil)
{
        document.write("<DIV id=\"content\">")
        document.write("<table width=\"750\">")
        document.write("<tr><td width=\"20%\" valign=\"top\">")
	if (vanster=="blank")
	{
		document.write("<br>")
	}
	else
	{
	        document.write("<a href="+ vanster +"><img src="+ vansterpil +" border=\"0\"></a>")
	}
        document.write("</td><td>")
	if (mitt=="blank")
	{
		document.write("<br>")
	}
	else
	{
		document.write("<img src="+ mitt +">")
	}
        document.write("</td>")
        document.write("<td width=\"20%\" valign=\"top\" halign=\"right\">")
	if (hoger=="blank")
	{
		document.write("<br>")
	}
	else
	{
        	document.write("<a href="+ hoger  +"><img src="+ hogerpil +" border=\"0\" align=\"right\"></a>")
        }
	document.write("</td></tr></table>")
        document.write("</DIV>")
}


function karnsidatext(vanster,vansterpil,textv,mitt,hoger,hogerpil,texth)
{
        document.write("<DIV id=\"content\">")
        document.write("<table width=\"750\">")
        document.write("<tr><td width=\"20%\" valign=\"top\">")
	if (vanster=="blank")
	{
		document.write("<br>")
	}
	else
	{
	        document.write("<a href="+ vanster +"><img src="+ vansterpil +" border=\"0\"></a>")
	}
	document.write("<p>"+textv+"</p>")
        document.write("</td><td>")
	if (mitt=="blank")
	{
		document.write("<br>")
	}
	else
	{
		document.write("<img src="+ mitt +">")
	}
        document.write("</td>")
        document.write("<td width=\"20%\" valign=\"top\" halign=\"right\">")
	if (hoger=="blank")
	{
		document.write("<br>")
	}
	else
	{
        	document.write("<a href="+ hoger  +"><img src="+ hogerpil +" border=\"0\" align=\"right\"></a>")
        }
	document.write("<br><p>"+texth+"</p>")
	document.write("</td></tr></table>")
        document.write("</DIV>")
}


function textsida(vanster,vansterpil,mitt,hoger,hogerpil)
{
        document.write("<DIV id=\"content\">")
        document.write("<table width=\"750\">")
        document.write("<tr><td width=\"20%\" valign=\"top\">")
	if (vanster=="blank")
	{
		document.write("<br>")
	}
	else
	{
	        document.write("<a href="+ vanster +"><img src="+ vansterpil +" border=\"0\"></a>")
	}
        document.write("</td><td>")
	if (mitt=="blank")
	{
		document.write("<br>")
	}
	else
	{
		document.write("<iframe src=" + mitt + " width=\"600\" height=\"440\" frameborder=\"0\"></iframe>")
	}
        document.write("</td>")
        document.write("<td width=\"20%\" valign=\"top\" halign=\"right\">")
	if (hoger=="blank")
	{
		document.write("<br>")
	}
	else
	{
        	document.write("<a href="+ hoger  +"><img src="+ hogerpil +" border=\"0\" align=\"right\"></a>")
        }
	document.write("</td></tr></table>")
        document.write("</DIV>")
}


function fotradstart(datum)
{
	document.write("<DIV id=\"footer\">")
        document.write("<UL id=\"footlist\">")
           document.write("<LI>Uppdaterad " + datum + "</LI>")
           document.write("<LI><a href=\"mailto:info@lillahallvards.se\">info@lillahallvards.se</a></LI>")
}

function radend()
{
        document.write("</UL>")
	document.write("</DIV>")
}


function fotrad(datum)
{
	fotradstart(datum)
	radend()
}

function fotradindex(datum)
{
	fotradstart(datum)
           document.write("<LI><a href=\"http://jigsaw.w3.org/css-validator/\">")
             document.write("<img style=\"border:0;width:88px;height:31px\" ")
             document.write("src=\"http://jigsaw.w3.org/css-validator/images/vcss\" ")
             document.write("alt=\"Valid CSS!\" halign=\"right\">")
        document.write("</a></LI>")
        radend()
}


function validate_email(field,alerttxt)
{
	with (field)
	{
	apos=value.indexOf("@")
	dotpos=value.lastIndexOf(".")
	if (apos<1||dotpos-apos<2) 
  		{alert(alerttxt);return false}
		else {alert("OK");return true}
	}
}

function validate_required(field,alerttxt)
{
	with (field)
	{
	if (value==null||value=="Anna")
  	{alert(alerttxt);return false}
	else {return true}
	}
}

function validate_form(thisform)
{
	with (thisform)
	{
	if (validate_required(namn,"Namn saknas!")==false)
	  {text.focus();return false}
	}
}

