/**
* @author Tommy Cheung
* 11-02-2008
* Functies m.b.t. Gepea Admin productendatabase
**/

function ConfirmAlert(artikelcode)
{
	return confirm('Weet u zeker dat u '+ artikelcode +' wilt verwijderen?');
}

function ConfirmDelImage()
{
	return confirm('Weet u zeker dat u de afbeelding wilt verwijderen?');
}

function ConfirmDelCatKoppel(){
	return confirm('Weet u zeker dat u deze categorie wilt ontkoppelen?');
}

function ConfirmDelSubCatKoppel(){
	return confirm('Weet u zeker dat u deze subcategorie wilt ontkoppelen?');
}

function ConfirmAlertEng(artikelcode)
{
	return confirm('Are you sure you wanna delete '+ artikelcode +'?');
}

var win=null;
function printIt(printThis)
{
	win = window.open();
	self.focus();
	win.document.open();
	win.document.write('<'+'html'+'><'+'head'+'><'+'style'+'>');
	win.document.write('body, td { font-family: Arial; font-size: 10pt;}');
	win.document.write('<'+'/'+'style'+'><'+'/'+'head'+'><'+'body'+'>');
	win.document.write(printThis);
	win.document.write('<'+'/'+'body'+'><'+'/'+'html'+'>');
	win.document.close();
	win.print();
	win.close();
}

function PrintContent()
{
    var content_value = document.getElementById("printContent").innerHTML;
    var docprint = window.open("","","toolbar=yes,location=no,directories=yes,menubar=yes,scrollbars=yes,width=750, height=700, left=100, top=25");
    docprint.document.open();
    docprint.document.write('<html><head><title>DeCadeauLijst.nl</title><link rel="stylesheet" href="http://www.decadeaulijst.nl/admin/style/print.css" type="text/css" /></head><body onLoad="self.print();" id="printwindow"><div>' + content_value + '</div></body></html>');
    docprint.document.close();
    docprint.focus();
}

function PrintContentLijst()
{
    var content_value = document.getElementById("printContent").innerHTML;
    var docprint = window.open("","","toolbar=yes,location=no,directories=yes,menubar=yes,scrollbars=yes,width=780, height=700, left=100, top=25");
    docprint.document.open();
    docprint.document.write('<html><head><title>DeCadeauLijst.nl</title><link rel="stylesheet" href="http://www.decadeaulijst.nl/admin/style/print.css" type="text/css" /></head><body onLoad="self.print();" id="printwindow"><div>' + content_value + '</div></body></html>');
    docprint.document.close();
    docprint.focus();
}

function selectNL(){
	/*Als je de optie "Nederland" kiest dan kun je via de winkel betalen en anders niet*/
	if(document.getElementById('land').value == 'NL'){
		var formObj = document.forms['formulier']; // your form
		formObj.betaling.options[0] = new Option('Kies uw betaalmethode', '');
		formObj.betaling.options[1] = new Option('Direct (online) betaling', 'online');
		formObj.betaling.options[2] = new Option('Betaling via de winkel(alleen in Nederland)', 'winkel');
	}else{
		var formObj = document.forms['formulier']; // your form
		formObj.betaling.options[2] = null; // remove the option
	}
}

function selectEN(){
	/*Als je de optie "Nederland" kiest dan kun je via de winkel betalen en anders niet*/
	if(document.getElementById('land').value == 'NL'){
		var formObj = document.forms['formulier']; // your form
		formObj.betaling.options[0] = new Option('Choose your payment method', '');
		formObj.betaling.options[1] = new Option('Direct (online) payment', 'online');
		formObj.betaling.options[2] = new Option('Payment in the shop(only in the Netherlands)', 'winkel');
	}else{
		var formObj = document.forms['formulier']; // your form
		formObj.betaling.options[2] = null; // remove the option
	}
}
