<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function Plaatje(url){
	var w = 800, h = 400;
	
	if (document.all) {
   /* the following is only available after onLoad */
  	w = document.body.clientWidth;
  	h = document.body.clientHeight;
	}
	else if (document.layers) {
  	w = window.innerWidth;
 	h = window.innerHeight;
	}
	popW = 800;
	popH = 400;
	leftPos=(w)?(w-popW)/2:0;
	topPos=(h)?(h-popH)/2-130:0;

	window.open('popup.php?image='+url,'popup','width=500,height=400,left='+leftPos+',top='+topPos+',toolbar=no,resizable=no,scrollbars=yes')
}

function print_view() {

if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>3) {
	self.print();
} else if (navigator.appName=="Microsoft Internet Explorer" && parseInt(navigator.appVersion)>3) {
	if (navigator.appVersion.indexOf("MSIE 5.")>=0 || navigator.appVersion.indexOf("MSIE 6.")>=0) { 
		self.print(); 
	} else { 
		window.alert("Uw browser kan dit niet...\n\nGebruik CTRL+P");
	}
} else { 
	window.alert("Uw browser kan dit niet...\n\nGebruik CTRL+P");
}

}



function deleteProduct(id) {
	if (confirm('Product verwijderen?')) {
		window.location = 'winkelwagen.php?action=delete&id=' + id;
	}
}

function select(id, no, prod){
	//alert(pict);
	document.getElementById('kleur'+no).selectedIndex=prod;
	element = no+'color'+id;
	foto = document.getElementById(element).value;
	MM_swapImage('prodFoto'+no,'','thumb.php?image=uploads/'+foto,1);
	document.getElementById('product_id'+no).value = id;
	veldje = document.getElementById('product_id'+no).value;
	//alert(veldje);
}
function view(afb){

	window.open('popup.php?image='+afb+'?w=400&h=600','popup','width=450,height=650,toolbar=no,resizable=yes,scrollbars=yes')
}

function viewpic(afb){

	window.open('popup.php?image=klanten/'+afb+'?w=400&h=600','popup','width=450,height=650,toolbar=no,resizable=yes,scrollbars=yes')
}

function selectbox(id, no){
	//alert(id);
	element = no+'color'+id;
	foto = document.getElementById(element).value;
	//alert(foto);
	MM_swapImage('prodFoto'+no,'','thumb.php?image=uploads/'+foto,1);
	document.getElementById('product_id'+no).value = id;
	veldje = document.getElementById('product_id'+no).value;
	//alert(veldje);
}

var AutoPrint = true; // Indien 'false' wordt de pagina niet automatisch uitgeprint 

function printDiv(){ 
if (document.getElementById != null){ 
var html = '<HTML>\n<HEAD>\n'; 
//if (document.getElementsByTagName != null){ 
//var headTags = document.getElementsByTagName("head"); 
//if (headTags.length > 0) 
//html += headTags[0].innerHTML;} 
html += '\n<title>Mijnbedel.nl</title>\n<link href="../styles/style.css" rel="stylesheet" type="text/css">\n<style type="text/css"><!-- body { font-family: Arial; font-size: 12px; margin: 20px; overflow:auto;background-image:none; background-color:#FFFFFF;} td {font-family: Arial; font-size: 12px;} .kopActive, .kop {font-family: Arial; font-size: 18px;font-weight:bold;} .print img {display:none;} .kalTabel {border-left:solid 1px #999999;border-top:solid 1px #999999;width:648px;} .kalTabel td {border-right:solid 1px #999999;border-bottom:solid 1px #999999;padding:2px;font-size: 11px;} --></style>\n</HE' + 'AD>\n<BODY scroll="yes">\n<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="top" height="130" bgcolor="#FFFFFF"><img src="../images/logo.jpg" /></td></tr></table>'; 
var PrintKlaarElem = document.getElementById("print"); 
if (PrintKlaarElem != null){ 
html += PrintKlaarElem.innerHTML;} 
html += '\n</BO' + 'DY>\n</HT' + 'ML>'; 
var printWin = window.open("","PrintPagina"); 
printWin.document.open(); 
printWin.document.write(html); 
printWin.document.close(); 
if (AutoPrint)printWin.print();}} 


function getDimensions() {
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	
	return {x: x, y:y};
}

var testDiv;

window.onload = function() {
	var dims = getDimensions();
	document.getElementById("topheader").style.height = dims.y;
}

window.onresize = function() {
	var dims = getDimensions();
	document.getElementById("topheader").style.height = dims.y;
}

//-->
