function preload()
{
    if (document.images)
    {
      imageObject = new Image();
      
      // URL
      imageURL = new Array();
      imageURL[0] = "/images/logo.jpg";
      imageURL[1] = "/images/footerbg.png";
      imageURL[2] = "/images/menuheader.png";
      imageURL[3] = "/images/background.png";
      imageURL[4] = "/images/pageline.png";
      imageURL[5] = "/images/textdivider.png";
      
       var i = 0;
       for(i=0; i<=6; i++) 
       {
         imageObject.src = imageURL[i];
       }
    }
}

function trappedInFrames()
{
	if (window!= top)
	{
		top.location.href = location.href;
	}
}

function DisableButton(button)
{
      button.disabled = true;
      button.value = 'Skickar...';
      button.form.submit();
}

var highlightcolor="#960"

var netscape6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which)
{
	if (which.style&&intended.test(which.tagName))
	{
		if (netscape6&&eventobj.nodeType==3)
		eventobj=eventobj.parentNode.parentNode
		return true
	}
	else
		return false;
}

//Function to highlight form element
function highlight(e)
{
	eventobj=netscape6? e.target : event.srcElement
	if (previous!='')
	{
		if (checkel(previous))
		{
		previous.style.borderColor=''
		}
		previous=eventobj
		if (checkel(eventobj))
		{
		eventobj.style.borderColor=highlightcolor
		}
	}
	else
	{
		if (checkel(eventobj))
		{
			eventobj.style.borderColor=highlightcolor
		}
		previous=eventobj
	}
}
/*SLUT AKTUELLT FORMULÄRFÄLT*/



