﻿var MOUSEOVER_CLASS = "over";
var MOUSEOVER_OUT = "out";

function SwapImageOver(veld, waarde, folder) {
	if (waarde != 1) {
		document.getElementById(veld.id).src = "../" + folder + "/menu/" + veld.id + "_sel.jpg";
	}
}

function SwapImageOut(veld, waarde, folder) {
	if (waarde != 1) {
		document.getElementById(veld.id).src = "../" + folder + "/menu/" + veld.id + ".jpg";
	}
}

function SwapImageOverG(veld, waarde, folder) {
	if (waarde != 1) {
		document.getElementById(veld.id).src = "../" + folder + "/catalogus/" + veld.id + "_sel.jpg";
	}
}

function SwapImageOutG(veld, waarde, folder) {
	if (waarde != 1) {
		document.getElementById(veld.id).src = "../" + folder + "/catalogus/" + veld.id + ".jpg";
	}
}

function gotoHome() {
	window.parent.location = "../index2.php";
}

function gotoBedrijf() {
	window.parent.location = "../bedrijf.php";
}

function gotoNieuws() {
	window.parent.location = "../nieuws.php";
}

function gotoMerken() {
	window.parent.location = "../merken.php";
}

function gotoJobs() {
  window.parent.location = "../jobs.php";
}

function gotoContact() {
	window.parent.location = "../contactgeg.php";
}

function gotoSite() {
	window.parent.location = "../site.php";
}

function gotoCat(hoofdgroep, groep) {
	window.parent.location = "catalogus.php?HG=" + hoofdgroep + "&GR=" + groep + "&SG=0&AC=4&start=0";
}

function gotoSearch(hoofdgroep, groep, artRef, artOms) {
	window.parent.location = "catalogus.php?HG=" + hoofdgroep + "&GR=" + groep + "&SG=0&artRef=" + artRef + "&artOms=" + artOms;
}

function navigate(actie, hoofdgroep, groep, artRef, artOms, artStart) {
	window.parent.location = "catalogus.php?HG=" + hoofdgroep + "&GR=" + groep + "&SG=0&AC=" + actie + "&artRef=" + artRef + "&artOms=" + artOms + "&start=" + artStart;
}

function gotoOffer(actie, hoofdgroep, groep, subgroep, artRef, artOms) {
	window.parent.location = "offerte.php?HG=" + hoofdgroep + "&GR=" + groep + "&SG=" + subgroep + "&AC=" + actie + "&artRef=" + artRef + "&artOms=" + artOms;
}

function addtoOffer(actie, hoofdgroep, groep, subgroep, art, artRef, artOms, artStart) {
	window.parent.location = "catalogus.php?HG=" + hoofdgroep + "&GR=" + groep + "&SG=" + subgroep + "&AC=" + actie + "&art=" + art + "&artRef=" + artRef + "&artOms=" + artOms + "&start=" + artStart;

}

function updOffer(actie) {
	document.getElementById("artactie").value= actie;
	document.getElementById("offerte").submit();
}

function gotoDetail(artRef) {
	window.parent.location = "detail.php?artClu=" + artRef;
}

function changeArtFoto(IdFoto, foto) {
	var veldwaarde = document.getElementById(IdFoto);
	veldwaarde.style.backgroundImage = 'url(' + foto + ')';
}

var isShift=null; 
var isNN = (navigator.appName.indexOf("Netscape")!=-1); 
var OP = (navigator.appName.indexOf("Opera")!=-1); 
if(OP)isNN=true; 
var key; 

function shift(event){ 
key = (isNN) ? event.which : event.keyCode; 
if (key==16)isShift=1; 
} 

function process(event){ 
key = (isNN) ? event.which : event.keyCode; 

if(document.layers&&event.modifiers==4){ 
isShift=1; 
} 

if (key==13&&isShift!=1){ 
	gotoSearch(6, 0, document.getElementById('txtref').value, document.getElementById('txtart').value);
} 

if (key!=16)isShift=null; 
} 


