function changeborder(color, id){
	a = document.getElementById(id);
	a.style.borderColor = color;
	return;
}

function getitem(id){
 location.href = '/cat/front/item_info.asp' + id;
}

function getimage(afbeelding, f_afbeelding_big){
	a = document.getElementById('img_big');
	a.src = afbeelding;
	
	b	=	document.getElementById('img_big_link');
	b.href	=	"javascript:;";
	b.onclick = function() {popImage(f_afbeelding_big)};

	
	
	if (a.width > 200) a.width = 200;
	if (a.Height > 200) a.Height = 150;
}

function numbersonly(){
 if (event.keyCode<48||event.keyCode>57)
  return false
}

function checkSearch(){
 zoekwoord = document.search.search_field.value;
 zoekwoord = zoekwoord.replace('"','')
 zoekwoord = zoekwoord.replace('\'','')
 if (zoekwoord == ''){
  alert('U dient een geldig zoekwoord op te geven');
  return;
 }
 
 document.location.href = '/cat/front/items.asp?search=true&SValue=' + zoekwoord;
}

function popImage2(image){
	newwindow2=window.open('','name','height=620,width=600, scrollbars=no');
	var nu = new Date();
	var tijd = nu.getHours() +":" +nu.getMinutes() +":" +nu.getSeconds()
	var strHTML = "<html><head><title>Imageview</title></head>";
	strHTML += "<body leftmargin=0 rightmargin=0 topmargin=0 onblur=\"window.top.close();\">";
	strHTML += "<img src=\"" + image + "\">";
	strHTML += "</body>";
	strHTML += "</html>";
	newwindow2.document.write(strHTML);
	newwindow2.document.close();
	if (window.focus) {newwindow2.focus()}
	return false;
}


function popImage(image) {
/*
if (ifile == '') 
ifile = document.getElementById('img_big').src;	
*/
ifile = image;
ititle='MediSafe'


var win;
var sWidth;
var sHeight;
win = window.open("","imageviewer","width=100,height=100,scrollbars=no,status=no,resizable=yes");

win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("<script>");
win.document.write("function resize_window(){");
win.document.write("a=document.getElementById('imgbig');");
win.document.write("window.resizeTo(a.width+10,a.height+80); ");
win.document.write("}</script><style>BODY {margin:0px;}</style>");
win.document.write('</head><body onload="resize_window();">');
win.document.write('<img id="imgbig" src="'+ifile+'">');
win.document.write("</body></html>");

win.document.close();
}



function NeedExtraInfo() {
	alert("U dient voor dit artikel extra gegevens in te voeren.");

}