uit=0; gakas=0; msok=0; expir=""; big=0; kedo=0; bx0=""; mailtxt="";
if (taal=="ned")
	{
	txt0="zkassa.htm"; txt1="Er zijn geen artikelen toegevoegd omdat er geen getal is ingevuld bij een maat/kleur combinatie.";
	txt2="paar"; txt3="het"; txt4="een"; txt5="Klik op "; txt6=" vakje en U kunt het aantal "; txt7=" invullen.";
	txt8="<br>U kunt meerdere combinaties tegelijk opgeven<br>en alles dan met 1 klik in het mandje plaatsen.";
	txt9="Aantal 1 = 1 paar."; txt10="Aantal 1 = Set van "; txt11="Artikel(en) toevoegen aan mandje ?";
	txt12="data/neeverder.gif"; txt13="data/javerder.gif"; txt14="data/jabestel.gif"; txt15="data/sluitwin.gif";
	txt16="Uw winkelmandje wordt onthouden op 2 manieren, en 1 ervan is een cookie die zojuist geblokt is";
	txt17=" door de privacy setting in Uw browser. Er kan nu een privacy symbool in Uw statusbalk staan.<br><br>";
	txt18="";
	txt19="Onze 2e methode is normaal gesproken succesvol als het cookie faalt, maar als dat niet zo is dan is een cookie nodig.";
	txt20="<br><br>Klik alstublieft op de 'bekijk mandje' knop om te zien of er iets in Uw mandje zit. Als het leeg is dan is de 2e methode ook mislukt";
	txt21=" en adviseren we U om de cookie instelling lager te zetten, of om www.sokkenkraam.nl aan het lijstje met sites toe te voegen waar U cookies van toestaat.";
	txt22="<br><br>Een cookie bestaat uit tekst, kan GEEN code uitvoeren, en wordt alleen door ons gebruikt om";
	txt23=" informatie in Uw browser te bewaren die nodig is voor Uw bestelling.";
	txt24="Toegevoegd."; txt25="<br><br>Na het toevoegen van volgende artikelen komt er alleen een venster met het woord 'toegevoegd' in beeld dat verdwijnt binnen 1 seconde,";
	txt26=" zodat U dan niet meer op 'ok' hoeft te klikken."; txt27="Er zitten nog artikelen in Uw mandje van Uw vorige bezoek.";
	txt28="Bezig verbinding te maken met "; txt29="Een email sturen met een vraag of opmerking.";
	txt30="De email versturen?"; txt31="Uw heeft Uw email-adres niet ingevuld."; txt32="Er is niets te versturen.";
	txt33="Als U liever een gewoon email venster gebruikt, klik dan alstublieft hier: "; txt34="";
	txt35="Uw email adres"; txt36="Uw bericht"; txt37="data/nee.gif"; txt38="data/ok.gif";
	txt39="Linker muisknop is +1, rechterknop is -1"; txt40="Pagina bijgewerkt, "; txt41=" artikelen gevonden.";
	}
	else
	{
	txt0="zekassa.htm"; txt1="No items are added because no quantity is filled in at any size/color combination."; txt2="pair";
	txt3="the"; txt4="an"; txt5="Click on "; txt6=" input field to fill in the number of "; txt7=".";
	txt8="<br>You can fill in more than one combination,<br>and then put them all in your basket with one click.";
	txt9="Quantity of 1 = 1 pair."; txt10="Quantity of 1 = Set of "; txt11="Add item(s) to basket ?";
	txt12="data/nocontinue.gif"; txt13="data/yescontinue.gif"; txt14="data/yesorder.gif"; txt15="data/closewin.gif";
	txt16="Your shopping cart is stored in 2 ways, and 1 of them is a cookie which";
	txt17=" just got blocked by your browser's privacy setting. A privacy symbol may";
	txt18=" have appeared in your status bar.<br><br>";
	txt19="Usually our 2nd method succeeds when the cookie fails, but if it doesn't, then a cookie is needed.";
	txt20="<br><br>Please click the 'view basket' button to check if your item is saved by our 2nd method. If it's empty then that failed as well and you are";
	txt21=" advised to lower your cookie setting or to add www.socksfromholland.com to the list of sites that you allow to set cookies.";
	txt22="<br><br>A cookie is just text, can NOT execute pieces of code, and is only used by us to store information";
	txt23=" in your browser that is needed for your order.";
	txt24="Added."; txt25="<br><br>After adding any next items just a window with the word 'added' is displayed which will disappear in less than 1 second,";
	txt26=" so you don't have to click 'ok' anymore."; txt27="There are still items in your basket from your last visit.";
	txt28="Trying to connect to "; txt29="Send us an email with a question or remark.";
	txt30="Send the email?"; txt31="You didn't fill in your email-address."; txt32="There is nothing to send.";
	txt33="If you prefer a normal mail window, then please click here: "; txt34="";
	txt35="Your email address"; txt36="Your message"; txt37="data/no.gif"; txt38="data/ok.gif";
	txt39="Left mouse button is +1, right button is -1"; txt40="Page updated, "; txt41=" items found.";
	}
function boff(doc){if (uit>-1){doc.style.background='#ecf2fc';};}
function bon(doc){if (uit>-1){doc.style.background='#ffffff'};}
function boff2(doc){doc.style.background='#ecf2fc';}
function bon2(doc){doc.style.background='#ffffff';}
function boffv(doc){doc.style.background='#dfffdf';}
function bonv(doc){doc.style.background='#efffef';}

function mc(){window.location=txt0;}
function mdat()
	{
	ws();mtaa=0;mpaar=0;mtot=0;x=0;xx=0;xxx="";
	for (t=0;t<taa;t++)
		{
		mtaa+=parseInt($ag[t][4]);
		x=$ag[t][1].indexOf("(");
		if (x>-1)
		{
		x=$ag[t][1].slice(x-7,x-1); xxx=x.slice(x.length-4,x.length);
		if (xxx=="paar" || xxx=="pair")
			{
			x=parseInt(x.slice(0,2)); x=x*$ag[t][4];
			}
		}
		if (!parseInt(x)){x=1;}
		if ($ag[t][4]==0){x=0;}
		mpaar+=x;
		mtot+=$ag[t][2]*$ag[t][4];
		}
	mtot=curr(mtot);
	//if (taal=="ned"){minfo.innerHTML="Artikelen: "+mtaa+" &nbsp; "+mpaar+" paar &nbsp; Subtotaal: "+mtot;}
	//if (taal=="eng"){minfo.innerHTML="Items: "+mtaa+" &nbsp; "+mpaar+" pairs &nbsp; Subtotal: "+mtot;}
	if (taal=="ned"){minfo.innerHTML="Mandje Subtotaal: € "+mtot;}
	if (taal=="eng"){minfo.innerHTML="Basket Subtotal: € "+mtot;}
	}

function curr(fc)
   {
   fc=parseInt((fc*100.0)+.5); fc=parseInt(fc)+""; if (fc==NaN || fc=="0") {fc="0.00";}
   fcdum=fc.substring(0,fc.length-2)+"."; fcdum=fcdum+fc.substring(fc.length-2,fc.length);
   if (fcdum=="0..00"){fcdum="0.00";}
   return fcdum;
   }

function mop(tekst)
	{
	xs=0; wijd="50%"; hoog="100px"; hoog2=100; if (big==1){wijd="50%";hoog="300px"; hoog2=300;}
	if (document.body.scrollTop>60){xs=-40;}
	ht='<div class="msgtext"><br>'+tekst+'</div>';
	ht=ht+'<div id="top7">';
	ht=ht+'<img class="but5" onclick="mcl()" onmouseover="bon2(this)" onmouseout="boff2(this)" src="data/ok.gif" alt=""></div>';
	test2.innerHTML=ht;
	test2.style.left=+document.body.scrollLeft+(document.body.clientWidth/4);
	test2.style.top=+document.body.scrollTop+xs+((document.body.clientHeight-hoog2)/2);
	test2.style.width=wijd; test2.style.height=hoog; test2.style.border="2px solid #ff0000";
	test2.style.padding.left="10%"; test2.style.padding.right="10%"; uit=-1;
	}
function mop2(tekst)
	{
	xs=0; if (document.body.scrollTop>60){xs=-40;}
	if (msok!=1)
		{
		wijd="50%"; hoog="80px"; hoog2=80; slu=750; if (msok==2){slu=1000; msok=0;}
		ht='<div class="msgtext" align="center"><br><br>'+tekst+'</div>';
		if (msok==0)
			{
			setTimeout("sluit()",slu);
			if (gakas==2){setTimeout("window.location=txt0",slu);}
			}
		}
	if (msok==1)
		{
		wijd="50%"; hoog="150px"; hoog2=150; tekst+=txt25+txt26; msok=0;
		ht='<div class="msgtext"><br>'+tekst+'</div>';
		ht=ht+'<div id="top7">';
		ht=ht+'<img class="but5" onclick="sluit()" onmouseover="bon2(this)" onmouseout="boff2(this)" src="data/ok.gif" alt=""></div>';
		}
	test2.innerHTML=ht;
	test2.style.left=+document.body.scrollLeft+(document.body.clientWidth/4);
	test2.style.top=+document.body.scrollTop+xs+((document.body.clientHeight-hoog2)/2);
	test2.style.width=wijd; test2.style.height=hoog; test2.style.border="2px solid #005500";
	test2.style.padding.left="10%"; test2.style.padding.right="10%"; uit=-1;
	}
function mcl()
	{
	document.cookie="chk=1"; test2.innerHTML=""; test2.style.width="0px"; test2.style.height="0px"; test2.style.border="0px"; uit=0;
	if (big==1){big=0; sluit2();}
	if (gakas==2){gakas=0; window.location=txt0;}
	}

function clrmand()
	{
	window.name=""; document.cookie="cst=''"; document.cookie="ctaa=''";
	document.cookie="ctgw=''"; document.cookie="cag=''";
	for (t=0;t<8;t++) {user[t]=user[t].replace(/,/g,"###");}
	user[10]=0; user[11]=0; user[12]=0; user[13]=0; user[15]=0; user[18]=0; user[19]=0;
	window.name="'','','',"+escape(user)+","+"sokkenkraam";
	eindop(365); document.cookie="cuser="+escape(user+"")+expir;
	document.cookie="idee=''"; for (t=0;t<8;t++) {user[t]=user[t].replace(/###/g,",");}
	}

function ws()
{
//clrmand();
dummie=new Array();
dummie[0]=getc("cst");
dummie[1]=getc("ctaa");
dummie[2]=getc("ctgw");
dummie[3]=getc("cag");
dummie[4]=getc("cuser");
dummie[5]=getc("idee");
dummie[6]=getc("chk");
dummie[7]=getc("rf");
if (!document.cookie || dummie[3]=="overflow")
	{
	dummie=window.name.split(","); dummie[6]="1"; if (dummie[5]!="sokkenkraam"){dummie[4]="";}
	}
if (dummie[5]!="sokkenkraam"){window.name=""; for (i=0;i<4;i++){dummie[i]="";};}
$scroll=unescape(dummie[0]); scrol=parseInt($scroll); if ($scroll==null || $scroll==""){scrol=0;}
$taa=unescape(dummie[1]); taa=parseInt($taa); if ($taa==null || $taa==""){taa=0;}
$tgw=unescape(dummie[2]); tgw=parseInt($tgw); if ($tgw==null || $tgw==""){tgw=0;}
$ag=unescape(dummie[3]); if ($ag==null || $ag==""){$ag=",";}
$user=unescape(dummie[4]); if ($user==null || $user==""){$user=",";}
$chk=unescape(dummie[6]); chksess=parseInt($chk); if ($chk==null || $chk==""){chksess=0;}
$dreff=unescape(dummie[7]); dreff=$dreff; if ($dreff==null || $dreff==""){dreff="";}
//window.scroll(0,scrol);
istring=$ag.split(",");
$ag=new Array();

for (i=0;i<taa;i++)
    {
    $ag[i]=new Array();
    for (ii=0;ii<6;ii++)
        {
        $ag[i][ii]=istring[(i*6)+ii];
        }
    }
	
istring=$user.split(",");
user=new Array();
for (i=0;i<21;i++)
    {
	user[i]=istring[i]; if (!user[i]){user[i]=0;}
	if (i<8 && user[i]==0){user[i]="";}
	if (user[14]==0){user[14]="";}
    }
for (i=0;i<8;i++) {user[i]=user[i].replace(/###/g,",");}
while (user[8]>10){user[8]=user[8]-10;}
if (user[8]>3){user[8]=0;}
// user[0] data=naam, [1]=adres, [2]=postcode, [3]=plaats, [4]=land, [5]=email, [6]=tel, [7]=remark, [8]=betaalwijze
// user[9] data=landnr, [10]=stapri, [11]=ulp, [12]=letpak, [13]=tw, [14]=yc, [15]=gtot, [16]=betaalwijze-naam, [17]=taal
// user[18]=ordernr, user[19]=info, user[20]=temp
}

function eindop(dagen)
	{
	date=new Date();
	date.setTime(date.getTime()+(dagen*24*60*60*1000));
	expir="; expires="+date.toGMTString();
	}
function dsave()
	{
	for (i=0;i<8;i++) {user[i]=user[i].replace(/,/g,"###");}
	window.name=escape(document.body.scrollTop)+","+escape(taa)+","+escape(tgw)+","+escape($ag)+","+escape(user)+","+"sokkenkraam"+","+escape(dreff);
	eindop(365); document.cookie="cuser="+escape(user+"")+expir;
	document.cookie="idee=sokkenkraam"+expir;
	eindop(1); document.cookie="cst="+escape(document.body.scrollTop)+expir;
	document.cookie="ctaa="+escape(taa)+expir;
	document.cookie="ctgw="+escape(tgw)+expir;
	document.cookie="cag="+escape($ag)+expir;
	if (escape($ag).length>3500){document.cookie="cag=overflow"+expir;}
	reltel=0; oldc=document.cookie; oldc2=window.name;
	for (i=0;i<8;i++) {user[i]=user[i].replace(/###/g,",");}
	}
function check(mode)
	{
	if (mode==1)
		{
		if (dreff==""){dreff=document.referrer; document.cookie="rf="+escape(dreff);}
		mdat();
		}
	if (mode==0 && (oldc!=document.cookie || oldc2!=window.name))
		{
		window.location.reload();
		}
	if (chksess==0 && taa>0){chksess=1; mop(txt27);}
	}
function check2()
	{
	if (document.body.clientWidth!=scc)
		{
		scc=document.body.clientWidth; window.location.reload();
		}
	}
	
function getc(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return document.cookie.substring(c_start,c_end);
    } 
  }
return "";
}

function sluit(){mcl(); sluit2();}
function sluit2(){test.innerHTML=""; test.style.width="0px"; test.style.height="0px"; test.style.border="0px"; test.style.padding="0px";}

function addmkl()
	{
	if (taa==0){msok=1;}
    if (totaal==-1){totaal=taa*tgw;}
	for (t=0;t<kleuren2.length;t++)
		{
		for (tt=0;tt<maten2.length;tt++)
    		{
         	if (aan[t][tt]>0)
            	{
            	dum=maten2[tt].split(" "); dum2=kleuren2[t].split(" ");
            	oms=doms+' ('+dum[0]+')'; msel=tt; while (msel.length<2) {msel='0'+msel;}   
            	oms=oms+' ('+dum2[0]+')'; ksel=t; while (ksel.length<2) {ksel='0'+ksel;}
            	dumag[0]=nr+msel+ksel; dumag[1]=oms; dumag[2]=pri; dumag[3]=photo+".jpg";
				dumag[4]=aan[t][tt]; dumag[5]=gew;
				reken();
				}
         	}
      	}
   if (totaal==taa*tgw){gakas=1; mop(txt1); return;}
   if (gakas==1){dsave(); cmsg(); mdat();}
   if (gakas==2){dsave(); cmsg();}
   }

function cmsg ()
	{
	if (dummie[5]!="sokkenkraam" && !document.cookie && msok==1)
		{
		user[19]="Cookies uit"; dsave(); big=1; mop(txt16+txt17+txt18+txt19+txt20+txt21+txt22+txt23);
		}
	else
		{
		mop2(txt24);
		}
	}
		
function reken ()
	{
	if (taa==0){$ag=new Array();}
    nw=taa;
    for (i=0;i<taa;i++)
    	{
        if (i==taa) {break;}
        if ($ag[i][0]==dumag[0])
        	{
            tgw=parseInt(tgw-(parseInt($ag[i][5])*$ag[i][4])); nw=i;
            if ($ag[i][4]!="0"){dumag[4]=parseInt(dumag[4])+parseInt($ag[i][4]);}
            for (ii=0;ii<6;ii++){$ag[i][ii]=dumag[ii];}
            taa--; break;
            }
        }
	if (i==taa)
        {
        $ag[taa]=new Array();
		for (i=0;i<6;i++) {$ag[taa][i]=dumag[i];}
        }
    if ($ag[nw][4]>0) {tgw=parseInt(tgw+(parseInt($ag[nw][5])*$ag[nw][4]));}
    taa++
    $ag.sort(function(a,b){  if (a[1] > b[1]) return 1; if (a[1] < b[1]) return -1; return 0;})
	}


function mkwin(tt)
	{
	bulk=document.getElementById(tt).value;
	bulk=bulk.split(","); for (t=0;t<bulk.length;t++){bulk[t]=unescape(bulk[t]);}
	nr=bulk[0]; photo=bulk[1]; cat=bulk[2]; oms1=bulk[3]; oms2=bulk[4]; pair=bulk[5]; pri=bulk[6]; maten=bulk[7];
	kleuren=bulk[8]; gew=bulk[9];
	gakas=0; oms=cat+" - "+oms1; if (pair==0){pair="";}
	spatie=""; sets=txt2; if (pair!="") {spatie=" "; sets=" sets"}
	maten2=new Array(); maten2=maten.split(","); dumag=new Array(5);
	kleuren2=new Array(); kleuren2=kleuren.split(","); totaal=-1;
	aan=new Array(kleuren2.length);
	for (t=0;t<kleuren2.length;t++)
   		{
   		aan[t]=new Array(maten2.length);
   		for (tt=0;tt<maten2.length;tt++)
      		{
      		aan[t][tt]="";
      		}
		}
	hi="";
	hi=hi+'<form name="smakl">';
	hi=hi+'<div class="mkmain">'; //
	hi=hi+'<div id="mkwheadhold"><div class="mkwhead">'+oms+' &nbsp; '+pair+spatie+'<small>€&nbsp;</small>'+pri+'</div>';
	hi=hi+'<div class="top6"><img class="but5" onclick="sluit()" onmouseover="bon(this)" onmouseout="boff(this)" src="'+txt15+'" alt=""></div>';
	hi=hi+'<div class="omsb2">'+oms2+'</div></div>';
	
	hi=hi+'<div class="mkwmid">'; ///
	hi=hi+'<div class="prow1a"><img src="socks/big/'+photo+'.jpg" alt="" width="384">';
	hi=hi+'<p class="imgborder4"</p></div>';
	
	doms=oms; if (pair!="") {doms=oms+" - "+pair;}
	paar=txt3; if ((maten2.length>1 || kleuren2.length>1)){paar=txt4;}
	paar=txt5+paar+txt6+sets+txt7;
	if ((maten2.length>1 || kleuren2.length>1)){paar=paar+txt8;}

	hi=hi+'<div class="mkwtab"><table class="mkwtab2" align="center"><tr><td>'; ////
	spatie=""; if (kleuren2.length<10){hi=hi+'<p class="apaar">'+paar+'</p><hr>';}else{spatie="0";}
	hi=hi+'<table class="mkgrid" align="center">';
	for (t=-1;t<kleuren2.length;t++)
		{
   		hi=hi+'<tr>';
		if (t==-1)
			if (maten2[0].indexOf("|")>-1)
				{
				hi=hi+'<td align="right" class="kassmall7">E.U.<br>U.K.</td>';
				}
				else
				{
				hi=hi+'<td></td>';
				}
   		if (t>-1)
			{
			dum=kleuren2[t].split(" (");
			if (dum.length==2 && kleuren2[t].indexOf("(#")==-1){dum[0]=kleuren2[t];}
			if (dum.length==3){dum[0]=dum[0]+" ("+dum[2];}
			hi=hi+'<td align="right">'+dum[0]+'</td>';
			}
		for (tt=-1;tt<maten2.length;tt++)
			{
			if (t==-1)
				{
				if (tt>-1)
					{
					dum2=""; dum=maten2[tt].split("|");
					if (dum.length==2)
					{
					dum[0]=dum[0]; dum2=dum[0].slice(0,1); if (dum2=="eu"){dum[0]=dum[0].slice(2);}
					dum[1]=dum[1]; dum2=dum[1].slice(0,2); if (dum2=="uk"){dum[1]=dum[1].slice(2);}
					dum2=""; dum2="<br>&nbsp;"+dum[1];
					}
					hi=hi+'<td align="center" class="kassmall6">&nbsp;'+dum[0]+dum2+'</td>';
					}
				}
			if (t>-1)
				{
				if (tt>-1)
					{
					hi=hi+'<td align="center" oncontextmenu="return false;" onselectstart="return false" title="'+txt39+'">'; dum=maten2[tt].split("|"); dum[0]=dum[0].toUpperCase();
					dum2=dum[0].slice(0,1); if (dum2=="eu"){dum[0]=dum[0].slice(2);}
					if (kleuren2[t].toUpperCase().indexOf(dum[0])==-1)
						{
						hi=hi+'&nbsp;<input type="text" name="a'+t+'a'+tt+'" value="" maxlength="4" size="1" onmouseup="afill(event,this); aan['+t+']['+tt+']=this.value" onkeyup="chknum(this,'+t+','+tt+'); aan['+t+']['+tt+']=this.value">';
						}
					hi=hi+'</td>';
					}
				}
			}
		hi=hi+'</tr>';
		}
	hi=hi+'</table>';
	paar=txt9; if (pair!=""){paar=txt10+pair+".";}
	hi=hi+'<hr><p class="apaar">'+paar+'</p>';
	hi=hi+'</td></tr></table></div>'; ////
	hi=hi+'</div>'; ///
	if (kleuren2.length<9 || spatie=="0"){spatie="<br>";}
	hi=hi+'<div class="mkwbot">'+spatie+txt11+'</div>';
	hi=hi+'<div class="mkwbuts">'; //*
	hi=hi+'<div class="top4a"><img class="buta" onclick="sluit()" onmouseover="bon(this)" onmouseout="boff(this)" src='+txt12+' alt=""></div>';
	hi=hi+'<div class="top4a"><img class="buta" onclick="gakas=1;addmkl()" onmouseover="bon(this)" onmouseout="boff(this)" src='+txt13+' alt=""></div>';
	hi=hi+'<div class="top4a"><img class="buta" onclick="gakas=2;addmkl()" onmouseover="bon(this)" onmouseout="boff(this)" src='+txt14+' alt=""></div>';
	hi=hi+'</div>';//*
	hi=hi+'</div>'; //
	hi=hi+'</form>';
	test.innerHTML=hi;
	test.style.width="780px"; test.style.height="450px";
	test.style.paddingLeft=10; test.style.paddingRight=10;
	x=document.body.clientWidth; xx=document.body.clientHeight;
	x=(x-800)/2; xx=(xx-450)/2;
	//xs=0; if (document.body.scrollTop<50){xs=0-document.body.scrollTop;} else {xs=-50;}
	test.style.left=x+document.body.scrollLeft; test.style.top=xx+document.body.scrollTop;
	test.style.border="2px solid #336699";
	}
function afill(e,a)
	{
	but=e.button; but2=-1; if (navigator.appName!='Microsoft Internet Explorer'){but2=e.button;}
	if ((but==1 || but2==0) && (a.value<10000 || a.value==""))
		{
		a.value=(a.value-0)+1;
		}
	if ((but==2 || but2==1) && a.value>0)
		{
		a.value=(a.value-0)-1; if (a.value==0){a.value="";}
		}
	movec(a);
	}
function chknum(a)
	{
	but=a.value.charCodeAt(a.value.length-1);
	if (but<48 || but>57){a.value=a.value.substr(0,a.value.length-1);}
	if (a.value==0){a.value="";}
	return(a.value);
	}

function movec(a)
	{
	if(a.setSelectionRange)
		{a.setSelectionRange(a.value.length, a.value.length);}
	else if (a.createTextRange) {range = a.createTextRange(); range.moveStart('character', a.value.length); range.select();}
	}

function zenden()
 {
 if (!user[18] || user[18]==0)
    {
    bdatum=new Date(); mil=""+bdatum.getMilliseconds(); mil=mil.substring(0,1);
    user[18]=""+(bdatum.getMonth()+1)+bdatum.getDate()+bdatum.getHours()+bdatum.getMinutes()+mil;
    }
 for (t=0;t<6;t++) {if (user[t]==""){mop(bdo[t]+tx38); return false;};}
 if (user[8]=="" || user[8]=="0"){mop(bdo[8]+tx38); return false;}
 user[17]=taal; if (user[19]=="0"){user[19]="";}
 if (dreff!="")
	{
	t=dreff.split("/"); tt="";
	for (i=0;i<t.length;i++)
		{
		if (t[i]==null){t[i]="";}
		if (i==t.length-1 && t[i]==""){break;}
		tt=tt+t[i]+"/";
		if (i>2){break;}
		}
	if (user[19].indexOf("Ref=")==-1)
		{
		i=tt.indexOf("?"); ii=tt.indexOf("q=");
		if (i>0 && ii>i)
			{
			x=tt.substr(i,ii-i); tt=tt.replace(x,""); i=tt.indexOf("&");
			if (i>0){tt=tt.substr(0,i);}
			}
		user[19]=user[19]+" Ref= "+tt+" Res= "+screen.width+'x'+screen.height;
		}
	}
 for (t=0;t<20;t++) {document.kaspdata.elements[t].value=user[t];}
 taatest=0;
 for (t=0;t<taa;t++)
     {
     agdum=""; komma=",";
	 taatest=taatest+$ag[t][4];
     for (tt=0;tt<6;tt++)
         {
		 if (tt==5){komma="";}
         agdum=agdum+escape($ag[t][tt])+komma;
         }
	 document.kaspdata.elements[t+20].value=agdum;
     }
 if (taatest==0){mop(tx39); return false;}
 i=parseInt(user[8]); if (i>1){user[8]=i+10;}
 if (user[8]>20){user[8]=user[8]-10;}
 document.kaspdata.elements[8].value=user[8];
 calc(0); if (user[8]>1){msok=2; mop2(txt28+user[16]+"..."); msok=0;}
 if (i>1)
	{
	setTimeout("document.kaspdata.submit()",750);
	}
	else
	{
	document.kaspdata.submit();
	}
 return false;
}
 
function isn(tt,t)
	{
	chknum(tt);
	if (tt.value==""){tt.value=0;}
	xxx=parseInt(tt.value); if(xxx>10000){xxx=10000;}
	tt.value=xxx; if (kedo==1 && xxx==0){tt.value="";}
	kedo=0;
	tgw=parseInt(tgw-($ag[t][5]*$ag[t][4])); $ag[t][4]=xxx;
	tgw=parseInt(tgw+($ag[t][5]*$ag[t][4]));
	calc(1);
	}

function calc(back)
	{
	if (back!=-107 && back!=-7)
		{
		if (back==-4 && (user[9]==3 || user[9]==5)) {user[14]=user[4];}
		user[16]=bnaam[user[8]-1]; if (user[8]>3){user[16]=bnaam[user[8]-11];}
		dsave(); if (back>0){lc(); dsave();}
		mdat(); mcl();
		}
	else
		{
		if (back==-107){x=user[7].split("##@jw@##"); if (mailtxt!=""){user[7]=x[0]+"##@jw@##"+mailtxt;}else{user[7]=x[0]+"";};}
		if (back==-7){x=user[7].split("##@jw@##"); if (x.length==2){user[7]=mailtxt+"##@jw@##"+x[1];}else{user[7]=mailtxt+"";};}
		dsave();
		}
	}
function mail()
	{
	mailtxt=""; x=user[7].split("##@jw@##"); if (x.length==2){mailtxt=x[1];}
	hi='<div class="mkmain">';
	hi=hi+'<div id="mkwheadhold"><div class="mkwhead">'+txt29+'</div>';
	hi=hi+'<div class="top6"><img class="but5" onclick="sluit2()" onmouseover="bon(this)" onmouseout="boff(this)" src="'+txt15+'" alt=""></div>';
	xx=bx0.toUpperCase();
	hi=hi+'<div style="clear:both; text-align:left;" class="apaar">'+txt33+'<a href="javascript:smail2()">'+xx+'</a></div>';
	hi=hi+'</div>';
	hi=hi+'<form name="maildata" method="POST" action="zsmail.asp">';
	hi=hi+'<br><div class="mailh">'+txt35+'<br>';
	hi=hi+'<input class="udata" type="text" size="50" name="0" value="'+user[5]+'" onblur="user[5]=this.value; dsave()">';
	hi=hi+'</div>';
	hi=hi+'<div width=90% class="mailh"><br>'+txt36+'<br>';
	hi=hi+'<textarea rows=15 cols=123 name="1" value="'+mailtxt+'" onblur="mailtxt=this.value; calc(-107)">'+mailtxt;
	hi=hi+'</textarea><br>&nbsp;</div>';
	hi=hi+'<div class="mkwbot">'+txt30+'</div>';
	hi=hi+'<div class="mkwbuts2">'; //*
	hi=hi+'<div class="top4a"><img class="buta" onclick="sluit2()" onmouseover="bon(this)" onmouseout="boff(this)" src='+txt12+' alt=""></div>';
	hi=hi+'<div class="top6a"><img class="but4" onclick="smail()" onmouseover="bon(this)" onmouseout="boff(this)" src='+txt38+' alt=""></div>';
	hi=hi+'</div><form>';//*
	hi=hi+'</div>';

	test.innerHTML=hi;
	test.style.width="780px"; test.style.height="450px";
	test.style.paddingLeft=10; test.style.paddingRight=10;
	x=document.body.clientWidth; xx=document.body.clientHeight;
	x=(x-800)/2; xx=(xx-450)/2;
	//xs=0; if (document.body.scrollTop<50){xs=0-document.body.scrollTop;} else {xs=-50;}
	test.style.left=x+document.body.scrollLeft; test.style.top=xx+document.body.scrollTop;
	test.style.border="2px solid #336699";
	}
function smail()
	{
	if (user[5]==""){mop(txt31); return false;}
	if (mailtxt==""){mop(txt32); return false;}
	user[17]=taal; x=user[7].split("##@jw@##"); user[7]=x[0]; if (x.length==1){user[7]="";}
	dsave(); document.maildata.submit();
	}
function smail2()
	{
	xx=mailtxt; x=user[7].split("##@jw@##"); user[7]=x[0]; if (x.length==1){user[7]="";}
	dsave(); sluit2(); window.location="mailto:"+bx0+"?body="+escape(xx);
	}
function msort()
	{
	if (ilist2.innerHTML.length<10){ilist2.innerHTML=ilist.innerHTML;}
	smaat=document.getElementById("mjw").value; dum=ilist2.innerHTML; defpage=dum; hi=""; teller=0;
	x=dum.indexOf("<DIV"); nox=0; if (x==-1){nox=1;}
	maattxt=" maat "; if (taal=="eng"){maattxt=" size ";}
	while (1<2)
		{
		x=dum.indexOf("<DIV class=irow"); if (nox==1){x=dum.indexOf('<div class="irow');}
		if (x==-1){nox=2; x=dum.indexOf('<DIV class="irow');}
		if (hi=="")
			{
			hi=dum.substr(0,x-1);
			if (smaat!=0 && (nox==0 || nox==2)){dumx=hi.split("</H1>"); hi=dumx[0]+maattxt+xm[smaat]+"</H1>"+dumx[1];}
			if (smaat!=0 && nox==1){dumx=hi.split("</h1>"); hi=dumx[0]+maattxt+xm[smaat]+"</h1>"+dumx[1];}
			if (nox==0)
				{
				hi=hi.replace(" selected",""); hi=hi.replace(" class=sel","");
				hi=hi.replace("ON value="+smaat,"ON value="+smaat+" selected class=sel");
				}
			else
				{
				hi=hi.replace(" selected",""); hi=hi.replace(' class="sel"',"");
				hi=hi.replace('on value="'+smaat+'"','on value="'+smaat+'" selected class="sel"');
				}
			}
		if (x>-1)
			{
			if (nox==0){xx=dum.indexOf("value=",x); xxx=dum.indexOf(">",xx); i=dum.substr(xx+6,(xxx-xx)-6);}
			if (nox>0){xx=dum.indexOf("value=",x); xxx=dum.indexOf(">",xx); i=dum.substr(xx+7,(xxx-xx)-7);}
			bulk=i.split(","); maten=unescape(bulk[7]); maten2=new Array(); maten2=maten.split(","); ok=0;
			for (t=0;t<maten2.length;t++)
				{
				y=new Array(); y=maten2[t].split("-");
				if (y[1])
					{
						yy=y[1].indexOf("|");
						if (yy>-1){y[1]=y[1].substr(0,yy);}
					}
				if (y.length==1){y[1]=y[0];}
				if (smaat==0 || maten.indexOf("maat")>-1 || maten.indexOf("size")>-1){ok=1; break;}
				if (smaat-0>=y[0]-0 && smaat<=y[1]-0){ok=1; break;}
				}
			if (nox==0){xx=dum.indexOf("<DIV class=irow",x+1);}
			if (nox==1){xx=dum.indexOf('<div class="irow',x+1);}
			if (nox==2){xx=dum.indexOf('<DIV class="irow',x+1);}
			xxe=xx; if (xx==-1){xxe=dum.length;}
			if (ok==1){teller++; hi=hi+dum.substr(x,(xxe-x)-1);}
			if (xx==-1){break;}
			dum=dum.substr(xxe-1);
			}
		else
			{
			break;
			}
		}
		ilist.innerHTML=hi+"</form>"; butchk(defpage); msok=2; mop2(txt40+teller+txt41);
	}
function butchk(dum)
	{
	if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){return;}
	x=dum.indexOf("<DIV id=totop"); if (x==-1){x=dum.indexOf('<div id="totop');}
	if (x==-1){x=dum.indexOf('<DIV id="totop');}
	if (x==-1){return;}
	xx=dum.lastIndexOf(">",x); hi2=dum.substr(x,xx);
	dum=ilist.innerHTML; x=dum.indexOf("<DIV id=totop"); if (x==-1){x=dum.indexOf('<div id="totop');}
	if (x==-1){x=dum.indexOf('<DIV id="totop');}
	if (x==-1){x=dum.length+1;}
	hi=dum.substr(0,x-1);
	if (document.body.scrollHeight<document.body.clientHeight+240){hi2="";}
	ilist.innerHTML=hi+hi2;
	if (document.getElementById("bott")){bott.style.top=55; bott.style.top=(document.body.scrollHeight-bott.offsetTop);}
	//irow=120px high
	}
