function over(vilken) {
    if (document.images)
        document.images[vilken].src = "bilder/" + vilken +"_on.gif";
}

function out(vilken) {
    if (document.images)
        document.images[vilken].src = "bilder/" + vilken + "_out.gif";
}


function CheckLen(antal) {
	if (document.form.text.value.length > antal)
		document.form.text.value = document.form.text.value.substr(0,antal);
	document.form.Count.value = antal - document.form.text.value.length;
}


function radera(id) {
var koll = confirm("Vill du verkligen RADERA\n" +  id + " ?");

    if(koll) {
	return true;
    }

    if(!koll) {
	return false;
    }
}


function kolla() {
	var koll = confirm("Är alla uppgifter korrekt ifyllda ?!");

	    if(koll) {
		return true;
	    }

	    if(!koll) {
		return false;
	    }
}






// All-in-one Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use

//Enter domain of site to search.
var domainroot="www.bilbilagan.se"

var searchaction=[ //form action for the 3 search engines
"http://www.google.com/search",
"http://search.yahoo.com/search",
"http://search.msn.com/results.aspx"
]

var queryfieldname=["q","p","q"] //name of hidden query form for the 3 search engines

function switchaction(cur, index){
cur.form.action=searchaction[index]
document.getElementById("hiddenquery").name=queryfieldname[index]
}

function jksitesearch(curobj){
for (i=0; i< document.jksearch.se.length; i++){ //loop through radio to see which is checked
if (document.jksearch.se[i].checked==true)
switchaction(document.jksearch.se[i], i)
}
document.getElementById("hiddenquery").value="site:"+domainroot+" "+curobj.qfront.value
}


function openWin(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

