// Javscript som används på Hembiobutiken.se

// Variabler
var iLast = "0";

//Hajlajta inputfälten OnMouseover (ändrar bakgrundsfärgen)
function hiLight(a, changeTo) {
	a.style.backgroundColor = changeTo;
}

//Visa och dölj lager
function showHide(who, ans, quest)
{
	if (document.getElementById(who).style.display=='none') {
		document.getElementById(iLast).style.display='none';
		document.getElementById(who).style.display='block';
		iLast = who;
	}
	else	{
		document.getElementById(who).style.display='none';
	}
}

function openHref(id) {
	document.location='produkt.asp?pid=' + id;
}

function openHrefB(pid) {
	document.location='film.asp?pid=' + pid;
}

function erase(){
document.formsearch.modell.value = '';
}

function visainfo(sTextID) {
open("visainfo.asp?id=" + sTextID + "" , "infowin" , "toolbar=no,width=300,height=450");
}

function visaavbet(pris) {
open("visaavbet.asp?pris=" + pris + "" , "avbetwin" , "toolbar=no,width=300,height=450");
}

function visaavbet12(pris) {
open("visaavbet12.asp?pris=" + pris + "" , "avbetwin12" , "toolbar=no,width=300,height=450");
}

function visaavbet36(pris) {
open("visaavbet36.asp?pris=" + pris + "" , "avbetwin36" , "toolbar=no,width=300,height=450");
}

function visatillbehor() {
open("visatillbehor.asp" , "tillbehorwin" , "toolbar=no,width=400,height=150");
}

function visakassan3(sTextID) {
open("visainfo_kassan3.asp?id=" + sTextID + "" , "infowin2" , "toolbar=no,width=450,height=350");
}

function disableForm(theform) {
	if (document.all || document.getElementById) {
		for (i = 0; i < theform.length; i++) {
			var tempobj = theform.elements[i];
			if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
			tempobj.disabled = true;
      }
    }
  }