﻿TextColor1 = "#ffffff";


BackColor1 = "#3eaee2";


BackColor2 = "#ffffff";


Text1 = "Echt de hele bestellijst maken?";


Text2 = "Verwijder";



hrij=new Array(); arij=new Array(); trij=new Array(); var h = "1"; var a = ""; var t = ""; var verloop = new Date(); verloop.setTime(verloop.getTime() + 3600000);





function order(a,p){ if (DD(a)) { if (Cl("h")) h=Cl("h")+";1"; else h=1+";"; if (Cl("a")) a=


Cl("a")+";"+a; else a=a+";"; if (Cl("t")) t=Cl("t")+";"+p; else t=p+";"; C2("h", h, verloop); C2("a", a, verloop); C2("t", t, verloop)} ww=window.open("Windowshop.html","ww","width=387,height=300,scrollbars=1,toolbar=0,directories=0,resizable=0,dependent=0,titlebar=0,personalbar=0,menubar=0,status=0,screenX=0,screenY=0,top=0,left=0")}



function DD(n) { KR(); for(var f = 0; f < arij.length; f++) if (n == arij[f]) return false; return true }



function KR() { if (Cl("h")) h=Cl("h"); if (Cl("a")) a=Cl("a"); if (Cl("t")) t=Cl("t"); hrij = h.split(";"); arij = a.split(";"); trij = t.split(";") }



function RK() { C3("h"); C3("a"); C3("t"); h=hrij.join(";"); a=arij.join(";"); t=trij.join(";"); C2("h", h, verloop); C2("a", a, verloop); C2("t", t, verloop) }



function Dl(n){ KR(); if (window.confirm(Text2 + "\n\n" + arij[n] + "?    \n\n")){ hrij[n] = 0; arij[n] = 0;trij[n] = 0;RK(); document.location.replace("Windowshop.html") }}



function X(n,n2){ KR(); dpl = eval(trij[n]); dp2 = eval(hrij[n]); dp3 = dpl/dp2; if (n2 > 0) hrij[n]=n2; if (hrij[n] > 0) { trij[n] = dp3 * hrij[n]; RK(); document.location.replace("Windowshop.html") }; if (n2 == 0) Dl(n) }



function DlAlle(){ KR(); if (window.confirm("   " + Text1 + "  \n")){ C3("h"); C3("a"); C3("t"); for(var f = 0; f < arij.length; f++) { hrij[f] = 0; arij[f] = 0; trij[f] = 0}; window.opener.document.location.reload() ; window.close() }}



function D2Alle(){ KR(); C3("h"); C3("a"); C3("t"); for(var f = 0; f < arij.length; f++) { hrij[f] = 0; arij[f] = 0; trij[f] = 0}; window.close() }



function K(n) { cent=n*100; cent=Math.round(cent); CS= "" + cent; len = CS.length; return CS.substring(0, len - 2) + "," + CS.substring(len -2,len); }



function FRMl() { KR(); SW= ""; FRM2 = ""; ST = 0; for(var f = 0; f < arij.length; f++) { if (arij[f] != "" && arij[f] != "0"){ if (BackColor2 == "#FFFFFF") { BackColor2="#EEEEEE"} else {BackColor2="#FFFFFF"}; SW = SW + "<tr><td align='right' valign='top' bgcolor='" + BackColor2 + "'><font FACE='Verdana' SIZE=2 color='#c30000'>" + hrij[f] + "&nbsp;x&nbsp;</td><td width=220 valign='top' bgcolor='" + BackColor2 + "'><font FACE='Verdana' SIZE=2 color='#c30000'>" + arij[f] + "</td><td valign='bottom' align='right' bgcolor='" + BackColor2 + "'><font FACE='Verdana' SIZE=2 color='#c30000'>" + K(trij[f]) + "</TD></tr>"; FRM2 = FRM2 + hrij[f] + " x " + arij[f] + " (" + K(trij[f]) + ")\n"; ST = ST + eval(trij[f])}}; schrijfEUR = ST; ST = K(ST) }



function Cl(n){ var cn = n + "="; var dc = document.cookie; if (dc.length > 0) { begin = dc.indexOf(cn); if (begin != -1) { begin += cn.length; end = dc.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin, end)) }}; return null }



function C2(n,v,e) { document.cookie = n + "=" + escape(v) + ((e == null) ? "" : "; path=/ ; expires=" + e.toGMTString())}



function C3(n) { if (Cl(n)) document.cookie = n + "=" + "; path=/ ; expires=Thu, 01-Jan-70 00:00:01 GMT" }



function Schrijf(){


	KR();


	totaal = 0;


	for(var f = 0; f < arij.length; f++) { 


		if (trij[f] != "") totaal = eval(totaal) + eval(trij[f]);


	}


	document.writeln('<STYLE>');


	document.writeln('<!--');


	document.writeln('a:link {text-decoration: none;}');


	document.writeln('a:visited {text-decoration: none;}');


	document.writeln('a:hover {background-color: #eeeeee; text-decoration: none; color: #000000;}');


	document.writeln('-->');


	document.writeln('</STYLE>');


	document.writeln('<FONT size=4 face="Verdana" color="#000000">');


	document.writeln('<b>Bestellijst</b><p>');


	document.writeln('</FONT>');


	document.writeln('<table width=350 border=0 cellspacing=0 cellpadding=2>');


	document.writeln('<tr><td colspan=2 bgcolor="'+BackColor1+'">');


	document.writeln('<FONT size=2 face="Verdana" color="'+TextColor1+'">');


	document.writeln('&nbsp;<B>Aantal</B></FONT></td>');


	document.writeln('<td width=220 bgcolor="'+BackColor1+'">');


	document.writeln('<font size=2 face="Verdana" color="'+TextColor1+'">');


	document.writeln('<B>Artikel</B></td><td align="right" bgcolor="'+BackColor1+'">');


	document.writeln('<font size=2 face="Verdana" color="'+TextColor1+'"><B>Prijs</B>&nbsp;</td></tr>');






	for(var f = 0; f < arij.length; f++) {


	if (arij[f] != ""  && arij[f] != "0") {


	if (BackColor2 == "#FFFFFF") { BackColor2="#EEEEEE"}



			else {BackColor2="#FFFFFF"}


			document.writeln('<form onSubmit="X('+f+',textaantal.value)" >');


			document.writeln('<tr><td valign=top bgColor='+BackColor2+'>');


			document.writeln('<INPUT onChange="X('+f+',this.value)" TYPE="text" NAME="textaantal" SIZE=2 value="'+hrij[f]+'">');


			document.writeln('</td>');


			document.writeln('<td valign="center" align=left style="cursor:hand" TITLE="Klik op de prullenmand om dit artikel te verwijderen" bgColor='+BackColor2+'>');


			document.writeln('<a href="javascript:Dl('+f+')">');


			document.writeln('<IMG SRC="images/Windowshopweg.gif" width=14 height=17 BORDER=0 ALT="Artikel verwijderen"></a></td>');


			document.writeln('<td bgColor="'+BackColor2+'">');


			document.writeln('<font FACE="Verdana" SIZE=2 color="#000000">'+arij[f]+'</font></td>');


			document.writeln('<td valign=bottom align=right bgColor="'+BackColor2+'">');



			document.writeln('<font FACE="Verdana" SIZE=2  color="#000000">'+K(trij[f])+'</FONT></td></tr>');



			document.writeln('</form>');


		}


	}





	if (totaal == 0) {



	document.writeln('<tr><td valign=top bgColor='+BackColor2+' colspan=4>');


	document.writeln('<font FACE="Verdana" SIZE=2 color="#000000">');



	document.writeln('Uw bestellijst is leeg.<BR>Kunt u geen producten toevoegen, dan accepteert uw browser geen cookies. Verander uw instellingen (zie bestelhulp), of bestel telefonisch of via e-mail.</td>');



	document.writeln('</FONT></td></tr>');



			}




	if (totaal < 100)
	    { 
    	document.write('<tr>');
    	document.write('<td colspan="3" align="left" bgcolor="#EDCCBF">');
    	document.write('<font size=2 face="Verdana" color="#000000">');
    	document.write('Administratiekosten<br>(bestelling onder &euro; 100)')
	document.write('</td>');
 	document.write('<td  align="right" bgcolor="#EDCCBF">');     
	document.write(K(7.50))
    	document.write('</td></tr>');
    	totaal=totaal+7.50;
    	}

	document.write('<tr>');



	document.write('<td colspan="4" align="right" bgcolor="'+BackColor1+'">');


	document.write('<font size=2 face="Verdana" color="'+TextColor1+'">&nbsp;');


	if (totaal != 0)  document.write('<B>Totaal&nbsp;&nbsp;') 


	if (totaal != 0)  document.write(K(totaal)) 


	document.write('</B></td></tr>');


	document.write('</table><p>');


	document.write('[<a href="javascript:nieuwvenster()">');


	document.write('<font size=2 face="Verdana" color="#000000">');


	document.write('Bestelhulp</FONT></a>]');


	document.write('&nbsp;[<a href="javascript:parent.close()">');


	document.write('<font size=2 face="Verdana" color="#000000">');


	document.write('Verder winkelen</FONT></a>]');



	if (totaal != 0) {


		document.write('<font size=2 face="Verdana" color="#000000">');


		document.write('&nbsp;[<a href="Windowshopform.html">');


		document.write('Bestellen</FONT></a>]');
		

		document.write('&nbsp;<br>[<a href="javascript:DlAlle()">');


		document.write('<font size=2 face="Verdana" color="#000000">');


		document.write('Leeg bestellijst</FONT></a>]');



			}





		document.write('<BR><BR><a href="http://www.windowshop.nl/windowshop/versie2.html"><font size=1 face="Verdana" color="#404040">')




	document.write('&copy; Bookman Windowshop</FONT></a></body></html>')





}