//fanshop - © creativeresults.nl 2005

var doel = ''
var prijs = 0,prijs1 = 0,prijs2 = 0,prijs3 = 0,prijs4 = 0,prijs5 = 0,prijs6 = 0,prijs7 = 0,prijs8 = 0,prijs9 = 0,prijs10 = 0,prijs11 = 0,prijs13 = 0,prijs14 = 0,prijs15 = 0,prijs16 = 0,prijs17 = 0, prijs18 = 0, prijs19 = 0, prijsb = 0;



function openvoorwaarden(){
myWin = open('', 'voorwaarden','width=400,height=300,status=no,toolbar=no,menubar=no');
myWin.document.open();
myWin.document.write('<html><head>');
myWin.document.write('<body bgcolor="#FFFBF0"><font face="Arial" size="2" color="#000000">');
myWin.document.write('<b>Leveringsvoorwaarden clubartikelen</b><br><br>');
myWin.document.write('<img border="0" src="graphics/vierkantje2.gif" width="8" height="8"> De artikelen worden in zeer beperkte oplage uitgegeven.<br>');
myWin.document.write('<img border="0" src="graphics/vierkantje2.gif" width="8" height="8"> Aan de bestellingen of het bestelformulier kunnen geen rechten worden ontleent.<br>');
myWin.document.write('<img border="0" src="graphics/vierkantje2.gif" width="8" height="8"> De artikelen worden toegekend bij inschrijving op volgorde van binnenkomst.<br>');
myWin.document.write('<img border="0" src="graphics/vierkantje2.gif" width="8" height="8"> De bestellingen kunnen op zaterdag na 11.00 uur opgehaald worden bij het secretariaat, tegen contante betaling.<br>');
myWin.document.write('<img border="0" src="graphics/vierkantje2.gif" width="8" height="8"> Voor bestelling buiten Rijnsburg berekent Rijnsburgse Boys bezorgkosten.<br>');
myWin.document.write('<img border="0" src="graphics/vierkantje2.gif" width="8" height="8"> De bestellingen buiten de gemeente Rijnsburg dienen bij vooruit betaling te worden voldaan.<br>');
myWin.document.write('<img border="0" src="graphics/vierkantje2.gif" width="8" height="8"> Rijnsburgse Boys geeft de club artikelen uit in eigen beheer.<br>');
myWin.document.write('<img border="0" src="graphics/vierkantje2.gif" width="8" height="8"> Rijnsburgse Boys bezit het copyright op de uitgegeven artikelen en staat namaken in welke vorm dan ook niet toe zonder uitdrukkelijke toestemming van haar bestuur.<br>');
myWin.document.write('</form></font></center></body></html>');
myWin.document.close();

}


function openvenster(){
if (prijs == 0){ alert('U heeft nog niets ingevuld'); return }
if (prijs == 550 && document.fanshop.bestelvorm.selectedIndex == 1){alert('U heeft nog niets ingevuld'); return }
myWin = open('', 'gegevens','width=400,height=350,status=no,toolbar=no,menubar=no');
myWin.document.open();
myWin.document.write('<html><head>');
myWin.document.write('<body bgcolor="#FFFBF0"><font face="Arial" size="2" color="#000000">');
myWin.document.write('U heeft het volgende ingevuld:<br><br>');
if (document.fanshop.sweaterkids.selectedIndex >= 1) myWin.document.write(document.fanshop.sweaterkids.selectedIndex + 'x Sweater Kids &#225; &#8364; 20,00 = ' + document.fanshop.totaalsweaterkids.value + '<br>');
if (document.fanshop.sweatervol.selectedIndex >= 1) myWin.document.write(document.fanshop.sweatervol.selectedIndex + 'x Sweater Volwassen &#225; &#8364; 25,00 = ' + document.fanshop.totaalsweatervol.value + '<br>');
if (document.fanshop.capgeel.selectedIndex >= 1) myWin.document.write(document.fanshop.capgeel.selectedIndex + 'x capgeel &#225; &#8364; 12,50 = ' + document.fanshop.totaalcapgeel.value + '<br>');
if (document.fanshop.capzwart.selectedIndex >= 1) myWin.document.write(document.fanshop.capzwart.selectedIndex + 'x capzwart &#225; &#8364; 12,50 = ' + document.fanshop.totaalcapzwart.value + '<br>');
if (document.fanshop.shawl.selectedIndex >= 1) myWin.document.write(document.fanshop.shawl.selectedIndex + 'x shawl &#225; &#8364; 12,50 = ' + document.fanshop.totaalshawl.value + '<br>');
if (document.fanshop.minikit.selectedIndex >= 1) myWin.document.write(document.fanshop.minikit.selectedIndex + 'x minikit &#225; &#8364; 10,00 = ' + document.fanshop.totaalminikit.value + '<br>');
if (document.fanshop.sleutelhanger.selectedIndex >= 1) myWin.document.write(document.fanshop.sleutelhanger.selectedIndex + 'x sleutelhanger &#225; &#8364; 5,00 = ' + document.fanshop.totaalsleutelhanger.value + '<br>');
if (document.fanshop.paraplu.selectedIndex >= 1) myWin.document.write(document.fanshop.paraplu.selectedIndex + 'x paraplu &#225; &#8364; 15,00 = ' + document.fanshop.totaalparaplu.value + '<br>');
if (document.fanshop.supporterskit.selectedIndex >= 1) myWin.document.write(document.fanshop.supporterskit.selectedIndex + 'x supporterskit &#225; &#8364; 50,00 = ' + document.fanshop.totaalsupporterskit.value + '<br>');
if (document.fanshop.jubileumboek.selectedIndex >= 1) myWin.document.write(document.fanshop.jubileumboek.selectedIndex + 'x jubileumboek &#225; &#8364; 20,00 = ' + document.fanshop.totaaljubileumboek.value + '<br>');
if (document.fanshop.kalender.selectedIndex >= 1) myWin.document.write(document.fanshop.kalender.selectedIndex + 'x Verjaardagskalender &#225; &#8364; 20,00 = ' + document.fanshop.totaalkalender.value + '<br>');
if (document.fanshop.dvd.selectedIndex >= 1) myWin.document.write(document.fanshop.dvd.selectedIndex + 'x dvd &#225; &#8364; 10,00 = ' + document.fanshop.totaaldvd.value + '<br>');
if (document.fanshop.muts.selectedIndex >= 1) myWin.document.write(document.fanshop.muts.selectedIndex + 'x IJsmuts &#225; &#8364; 12,50 = ' + document.fanshop.totaalmuts.value + '<br>');
if (document.fanshop.uienpet.selectedIndex >= 1) myWin.document.write(document.fanshop.uienpet.selectedIndex + 'x Uieeeehhh-pet &#225; &#8364; 10,00 = ' + document.fanshop.totaaluienpet.value + '<br>');
if (document.fanshop.autosjaal.selectedIndex >= 1) myWin.document.write(document.fanshop.autosjaal.selectedIndex + 'x Autosjaal &#225; &#8364; 10,00 = ' + document.fanshop.totaalautosjaal.value + '<br>');
myWin.document.write('<br>Voor een totaalbedrag van : &#8364; ' + document.fanshop.eindtotaal.value);
myWin.document.write('</form></font></center></body></html>');
myWin.document.close();

}

function controleer()
{
if (prijs == 0){ alert('U heeft nog geen artikel ingevuld'); return }
if (prijs == 550 && document.fanshop.bestelvorm.selectedIndex == 1){alert('U heeft nog geen artikel ingevuld'); return }
if (document.fanshop.sweaterkids.selectedIndex >= 1 && document.fanshop.maatsweaterkids.selectedIndex == 0) { alert('U heeft geen maat sweater opgegeven'); return; }
if (document.fanshop.sweatervol.selectedIndex >= 1 && document.fanshop.maatsweatervol.selectedIndex == 0) { alert('U heeft geen maat sweater opgegeven'); return; }
var teller = 0
if (document.fanshop.naam.value == false) { document.getElementById('naamvak').className='bgformerror'; teller++ }
if (document.fanshop.telefoonnr.value == false) { document.getElementById('telefoonvak').className='bgformerror'; teller++ }
if (document.fanshop.email.value == false || ((document.fanshop.email.value.indexOf('@',0) == -1) || (document.fanshop.email.value.indexOf('.',0) == -1))) { document.getElementById('emailvak').className='bgformerror'; teller++ }
if (teller > 0) alert('Uw invoer is niet correct \nVul de rood gekleurde vakken in');
else {
document.fanshop.submit();
}
}

function totaal(){
prijs = prijs1 + prijs2 + prijs3 + prijs4 + prijs5 + prijs6 + prijs7 + prijs8 + prijs9 + prijs10 + prijs11 + prijs13 + prijs14 + prijs15 + prijs16 + prijs17 + prijs18 + prijs19 + prijsb;
prijs = prijs.toString()
var lengte = prijs.length ;
var over = lengte - 2 ;
var eerstedeel = prijs.substring(0, over);
var tweededeel = prijs.substring(lengte, (lengte - 2));
var a = eerstedeel + ',' + tweededeel;
if (a == ',0') a = 0;
document.fanshop.eindtotaal.value = a ;
} 

function bereken(doel){
prijs = prijs.toString()
var lengte = prijs.length ;
var over = lengte - 2 ;
var eerstedeel = prijs.substring(0, over);
var tweededeel = prijs.substring(lengte, (lengte - 2));
var a = eerstedeel + ',' + tweededeel;
if (a == ',0') a = 0;
if (doel == 4) document.fanshop.totaalcapgeel.value = a ;
if (doel == 5) document.fanshop.totaalcapzwart.value = a ;
if (doel == 6) document.fanshop.totaalshawl.value = a ;
if (doel == 7) document.fanshop.totaalsweaterkids.value = a ;
if (doel == 8) document.fanshop.totaalsweatervol.value = a ;
if (doel == 9) document.fanshop.totaalminikit.value = a ;
if (doel == 10) document.fanshop.totaalsleutelhanger.value = a ;
if (doel == 11) document.fanshop.totaalparaplu.value = a ;
if (doel == 13) document.fanshop.totaalsupporterskit.value = a ;
if (doel == 14) document.fanshop.totaaljubileumboek.value = a ;
if (doel == 15) document.fanshop.totaalkalender.value = a ;
if (doel == 16) document.fanshop.totaaldvd.value = a ;
if (doel == 17) document.fanshop.totaalmuts.value = a ;
if (doel == 18) document.fanshop.totaaluienpet.value = a ;
if (doel == 19) document.fanshop.totaalautosjaal.value = a ;
totaal()
}

