function ShowImage(pic, width, height, varenr, text) {
	width = new Number(width);
	height = new Number(height);
	width = width + 10;
	height = height + 105;
	html =  '<html><head><title>Varenummer: ' + varenr + '</title></head>' +
	'<body topmargin=0 leftmargin=0 onClick=\'self.close()\' onLoad="focus();resizeTo('+width+','+height+')">' +
	'<img src="webshop/images/upload/' + pic + '"><br><font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="1"><div align="center">' + text + '</div></font></body></html>';
	
	if (height > 800) {
		width = width + 50;
		var settings = 'width=' + width + ',height=' + height + ',scrollbars=yes,status=no,location=no,resizable=yes,menubar=no';
	} 
	else {
		var settings = 'width=' + width + ',height=' + height + ',scrollbars=no,status=no,location=no,resizable=yes,menubar=no';
	}
	   
	var imgWin = window.open('', 'imgWindow', settings);

	imgWin.document.open();
	imgWin.document.write(html);
	imgWin.document.close();
}

function showBasket(){
    xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null){
	    alert ("The browser doesn't support HTTP Requests");
		return;
    }
	
    param = "loadbasket=1";	
				  						
    var url="webshop/_include/addToBasket.asp" + "?" + param;
    xmlHttp.onreadystatechange=function() { fillBasket() };
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
}	

function fillBasket(){
    if (xmlHttp.readyState == 1){
        document.getElementById("basket").innerHTML = '<div style="padding:10px; margin:0 auto; text-align:center;"><img src="images/loading.gif"></div>';
    }   
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){         
        document.getElementById("basket").innerHTML = xmlHttp.responseText;	    
    } 		
}

