// JavaScript Document

$(document).ready(function() {

	$(".product_block .button, .product_block .addToo").hover(
		function() {
			$(this).addClass('active');
		},
		function() {
			$(this).removeClass('active');
		}
	);

	$(".block_tab_nav li").click(
		function() {
			//reset all tabs / content
			$(".block_tab_nav li").each(function() {
				$(this).removeClass('active');
				var curId = $(this).attr("id");
				$('#' + curId + '_items').css("display", "none");
			});

			//activate current tab / content
			$(this).addClass('active');
			var curId = $(this).attr("id");
			$('#' + curId + '_items').css("display", "block");
		}
	);

	$('.domiciliering .radio-item .radio').click(function() {
		if ($(this).attr('checked') == true && $(this).val() == '1') {
			var data = $('#cont-domiciliering').html();
			$('#cont-domiciliering').slideDown().show(function() {
				$(this).html(data);
				fillBankAccount()
			});

		} else {
			$('#cont-domiciliering').slideUp();
			$('#domiciliationCheckbox').attr('checked', '');
		}
	});

	$("INPUT[name='abo']").click(function() {
		var articlePrice = new Number($("#article_price").val().replace(",", "."));
		var aboMonthlyPrice = new Number($(this).attr("monthlyprice").replace(",", "."));
		var aboDiscountPrice = new Number($(this).attr("discountprice").replace(",", "."));
		var currencySymbol = $("#currencySymbol").val();

		$(this).closest("tr").find("td:last").html(currencySymbol + " " + aboMonthlyPrice.toFixed(2).replace(".", ","));
		$("#abo_discount").html(currencySymbol + " " + aboDiscountPrice.toFixed(2).replace(".", ","));
		$("#abo_total").html(currencySymbol + " " + (articlePrice - aboDiscountPrice).toFixed(2).replace(".", ","));
	});

	hs.Expander.prototype.onAfterExpand = function(sender) {
		if (sender['contentId'] != undefined && sender['contentId'] != '') {
			if (sender['contentId'] == 'addedToShoppingcart') {
				// Add to shoppingbag
				$.ajax({
					type: "GET",
					url: PATH_LANG + "xml/ReturnGenericAjaxView",
					async: false,
					success: function(data) {
						$("#cartContents").html(data);

						// Resize highslide
						hs.Expander.reflow();
					}
				});
			}
		}
	}

});

function fillBankAccount() {
	$('#domiciliationBankAccount1, #domiciliationBankAccount2, #domiciliationBankAccount3').blur(function() {
		var val1 = $('#domiciliationBankAccount1').val();
		var val2 = $('#domiciliationBankAccount2').val();
		var val3 = $('#domiciliationBankAccount3').val();
		$('#domiciliationBankAccount').attr('value', val1 + '' + val2 + '' + val3)
	})
}

function setOrdered(id) {
	//order button
	$('#'+ id).find('.price').css('display','none');
	$('#'+ id).find('.buy').css('display','none');
	$('#'+ id).find('.added').css('display','inline');
}

function resetOrdered(id){
	$('#'+ id).find('.price').css('display','inline');
	$('#'+ id).find('.buy').css('display','inline');
	$('#'+ id).find('.added').css('display','none');
}

function ShowMailaFriend() {AnimateThis('mailafriend')}

function AnimateThis(id) {
	if(!IE){ //werkt niet in IE ???
		$('#' + id).animate({opacity: 0}, 1).animate({opacity: 1}, 500);
	}
}

function showMessage(id){
	display('item-'+ id +'-ok','item-'+ id);
	setTimeout("display('item-"+ id +"','item-"+ id +"-ok')",3000);
}

function ShowShoppingcart() {
    /*
    $('#shoppingcart').animate({
        opacity: 0
    }, 1);
    $('#shoppingcart').animate({
        opacity: 1
    }, 500);
    */
}

function changeAmount(textid) {
	var formId = textid.replace('amount','form');
	document.getElementById(formId).click();
}

function increaseAmount(textid) {
    if (isNaN($('#' + textid).val())) {
        $('#' + textid).val(1);
    } else {
        if (eval($('#' + textid).val()) < 99) {
            $('#' + textid).val(eval($('#' + textid).val()) + 1);
        }
    }
    return true;
}

function decreaseAmount(textid) {
    if (isNaN($('#' + textid).val())) {
        $('#' + textid).val(1);
    } else {
        if (eval($('#' + textid).val()) > 1) {
            $('#' + textid).val(eval($('#' + textid).val()) - 1);
        }
    }
    return true;
}

function mOn(obj){
	var imgsrc = $(obj).attr("src")
	if(imgsrc.indexOf('_o.gif')==-1 && imgsrc.indexOf('_a.gif')==-1){
		imgsrc = imgsrc.replace('.gif','_o.gif');
		$(obj).attr('src',imgsrc);
	}
}
function mAn(obj){
	var imgsrc = $(obj).attr("src")
	if(imgsrc.indexOf('_a.gif')==-1){
		imgsrc = imgsrc.replace('_o.gif','.gif');
		imgsrc = imgsrc.replace('.gif','_a.gif');
		$(obj).attr('src',imgsrc);
	}
}

function mOut(obj){
	var thisclass = $(obj).attr("class")
	if(thisclass){
		if(thisclass.indexOf('active')==-1){
			var imgsrc = $(obj).attr("src").replace('_o.gif','.gif');
			imgsrc = imgsrc.replace('_a.gif','.gif');
			$(obj).attr('src',imgsrc);
		}
	}
}

function expandFlash(bool){
	if(bool){
		$('#container_info').css('display','none')
		$('#container_image').attr('class','images_wide')
	}else{
		$('#container_image').attr('class','images')
		$('#container_info').css('display','block')
	}
}


// Versie 1.2 (WdS)
function submitNewletterForm(inputId,trueCont,falseCont,wrongCont,path) {
	$("#newsletter_conversion").html('');
	if(isEmail($('#' + inputId).attr('value')) && $('#left_input_newsletter').val()=='true'){
		$('#' + wrongCont).css("display", "none");
    $.ajax({
        type: "POST",
        url: path + "xml/SubscribeNewsletter?mail=" + $('#' + inputId).attr('value'),
        dataType: "html",
				data: "{}",
        success: function(txt) {            
            if (txt.substring(0,4).toUpperCase() == 'TRUE') {
				txt = txt.toUpperCase().replace('TRUE', '');
				$('#' + wrongCont).css("display", "none");
                $('#' + trueCont).css("display","block");
				$('#' + falseCont).css("display","none");

				var google_conversion_id = 1013822084;
				var google_conversion_language = "nl";
				var google_conversion_format = "2";
				var google_conversion_color = "ffffff";
				var google_conversion_label = "r9PMCJSc3wEQhOW24wM";
				var google_conversion_value = 0;
				txt = '<scr' + 'ipt type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"></script>' + txt ;
				$("#newsletter_conversion").html(txt);
            }
            else {
				
				$('#' + wrongCont).css("display", "none");
                $('#' + trueCont).css("display", "none");
                $('#' + falseCont).css("display", "block");                
            }
        }
    });
	}else{
		$('#' + wrongCont).css("display", "block");
		$('#' + trueCont).css("display", "none");
    		$('#' + falseCont).css("display", "none");
	}
}


//functie voor setten van 1 checkbox, geen komma's in value
//v = waarde true
//w = waarde false
function checkThis(v, w, id, input) {
	var obj = document.getElementById(input)
	if(obj.value.indexOf(v)==-1){
		obj.value=v;
		document.getElementById(id).src = document.getElementById(id).src.replace('.gif','_o.gif')
	}else{
		obj.value=w;
		document.getElementById(id).src = document.getElementById(id).src.replace('_o.gif','.gif')
	}
}

// Versie 1.2 (WdS)
function updateArticleDetail(articleId, orgSpec1, orgSpec2, htmlCont, path) {
    var selectedSpec01, selectedSpec02, printing
    if (document.getElementById(orgSpec1)) {
        selectedSpec01 = document.getElementById(orgSpec1).options[document.getElementById(orgSpec1).selectedIndex].value
    } else {
        selectedSpec01 = 0
    }
    if (document.getElementById(orgSpec2)) {
        selectedSpec02 = document.getElementById(orgSpec2).options[document.getElementById(orgSpec2).selectedIndex].value
    } else {
        selectedSpec02 = 0
    }
		if(!printing) printing = 0
    $.ajax({
        type: "POST",
        url: path + 'xml/UpdateArticleDetail?Id=' + articleId + '&spec01Id=' + selectedSpec01 + '&spec02Id=' + selectedSpec02,
        dataType: "html",
				data: "{}",
        success: function(html) {
					document.getElementById(htmlCont).innerHTML = html;
					initializePricelisting();
        }
    });
}

// Versie 1.3.2 (JS)
function updateArticleFromAddToOrder(articleId, orgSpec1, orgSpec2, htmlCont, path) {
    var selectedSpec01, selectedSpec02
    if (document.getElementById(orgSpec1)) {
        selectedSpec01 = document.getElementById(orgSpec1).options[document.getElementById(orgSpec1).selectedIndex].value
    } else {
        selectedSpec01 = 0
    }
    if (document.getElementById(orgSpec2)) {
        selectedSpec02 = document.getElementById(orgSpec2).options[document.getElementById(orgSpec2).selectedIndex].value
    } else {
        selectedSpec02 = 0
    }
    $.ajax({
        type: "POST",
        url: path + 'xml/UpdateArticleDetail?Id=' + articleId + '&spec01Id=' + selectedSpec01 + '&spec02Id=' + selectedSpec02 + '&viewName=ArticleAddToOrder',
        data: {},
        dataType: "html",
        success: function(html) {            
            $('#' + htmlCont).html(html);
        }
    });
   }

function openShoppingcartPopup(o, path, checkout_url, related, isAbo) {
   	// Voeg het artikel toe aan de winkelwagen
	AddRelatedArticlesToOrder(path, checkout_url, related, isAbo);

	// Toon winkelwagen in popup na het toevoegen van een artikel
	hs.htmlExpand(o, { contentId: 'addedToShoppingcart', objectType: 'html', width: 650, height: 500, outlineType: 'telesat-grey', dimmingOpacity: '0.4', preserveContent: false });
   	return false;
}

// Versie 1.4 (GPS) speciaal voor Telesat, werkt met plaatjes ipv checkboxes
function AddRelatedArticlesToOrder(path, checkout_url, related, isAbo) {
	try {
		var timeout = 0;
		var id = 0;
		var tmpStr = '';
		var newCart = '';

		//gegevens van hoofdartikel
		var articleId = $('#articleId').val();
		var articleSpecId = $('#specId').val();
		var articleAmount = $('#amount-' + articleId).val();
		var articlePrintingText = $('#printingText').val();
		if (!articlePrintingText) articlePrintingText = '';
		var priceType = $('#priceType').val();
		var CreateNewSequence = $('#CreateNewSequence').val();

		// Indien geen error, dan alle (eventueel) aangevinkte artikelen aan winkelwagen toevoegen.
		display('item-' + articleId + '-ok-text', 'item-' + articleId + '-ok-error');

		var result = '';
		var tmpResult = '';

		//Haal ook de gegevens op van het huidige product
		timeout += 800;
		$.ajax({
		    type: 'GET',
		    url: path + 'xml/AddToShoppingCart',
		    data: 'articleId=' + articleId + '&amount=' + articleAmount + '&specId=' + articleSpecId + '&sequenceMain=True&priceType=' + priceType + '&isAbbo=False&isCheckout=0&CreateNewSequence=' + CreateNewSequence,
		    async: false,
		    success: function(html) {

		        tmpResult = html;

		        $("INPUT[type='radio'][name='abo']:checked").each(function() {
		            if ($(this).val() != '') {
		                var aboId = $(this).val();

		                timeout += 800;
		                $.ajax({
		                    type: 'GET',
		                    url: path + 'xml/AddToShoppingCart',
		                    data: 'articleId=' + aboId + '&amount=' + articleAmount + '&specId=0&sequenceMain=False&priceType=PERIOD&isAbbo=True&isCheckout=0&refArticleId=' + articleId + '&CreateNewSequence=True',
		                    async: false,
		                    success: function(html) {
		                        
		                        result = html;
		                    }
		                });
		            }
		        });

                
		        if (result == '') {
		            result = tmpResult;
		        }


		    }
		});

		if (result != '') {
		    document.getElementById('shoppingcart').innerHTML = result;
		}
		
		//einde ophalen gegevens van het huidige product
		display('item-' + articleId + '-ok', 'item-' + articleId);
	} catch (err) {
		alert("Er is iets foutgegaan. Probeer het opnieuw door deze pagina te herladen. " + err.message);
	}
}

function addToRelatedList(id, clear){
	if(!clear){
		setOrdered('related-'+id);
		$('#amount-'+id).val(1);
		$('#addToOrder_'+id).val('1');
	}else{
		resetOrdered('related-'+id);
		$('#addToOrder_'+id).val('');
	}
}

function openBig(url){
	if(url!='') $('#bigimage').attr('href',url);
	document.getElementById('bigimage').onclick();
}


// Versie 1.7 (JS)
function addCouponCode(val, path) {
	$('#error-coupon').hide();
	$.ajax({
		type: "POST",
		url: path + 'xml/AddCouponCode?typeid=10&code=' + val,
		data: {},
		cache: false,
		dataType: "html",
		success: function(html) {
			if (html == 'True') {
				location.reload(true);
			} else {
				$('#error-coupon').show();
			}
		}
	});
}

// Versie 1.7 (JS)
function removeCouponCode(val, path) {
	$('#error-coupon').hide();
	$.ajax({
		type: "POST",
		url: path + 'xml/RemoveCouponCode?code=' + val,
		data: {},
		cache: false,
		dataType: "html",
		success: function(html) {
			if (html == 'True') {
				location.reload(true);
				
			} else {
				$('#error-coupon').show();
			}
		}
	});
}

function setAddress(strStreet, strCity, strBigCity, type) {
    if (strStreet != '-1' && strStreet != '-2') {
        //Checkout 1 profiel
        if (type == 'p') {
            if ($('#street').size() > 0) { $('#street').val(strStreet); }
            if ($('#city').size() > 0) { $('#city').val(strCity); }
            if ($('#municipality').size() > 0) { $('#municipality').val(strBigCity); }

            $('#street').attr('readonly', 'readonly');
            $('#street').addClass('readonly');
            $('#city').attr('readonly', 'readonly');
            $('#city').addClass('readonly');
            $('#municipality').attr('readonly', 'readonly');
            $('#municipality').addClass('readonly');
        }

        if (type == 'd') {

            //Checkout 1 dominciliëring
            if ($('#domiciliationStreet').size() > 0) { $('#domiciliationStreet').val(strStreet); }
            //if ($('#domiciliationCity').size() > 0) { $('#city').val(strCity); }
            if ($('#domiciliationCity').size() > 0) { $('#domiciliationCity').val(strBigCity); }

            $('#domiciliationStreet').attr('readonly', 'readonly');
            $('#domiciliationStreet').addClass('readonly');
            $('#domiciliationCity').attr('readonly', 'readonly');
            $('#domiciliationCity').addClass('readonly');
        }
    }
    else {
        if (type == 'p') {
            $('#street').attr('readonly', false);
            $('#street').removeClass('readonly');
            $('#city').attr('readonly', false);
            $('#city').removeClass('readonly');
            $('#municipality').attr('readonly', false);
            $('#municipality').removeClass('readonly');
        }

        if (type == 'd') {
            $('#domiciliationstreet').attr('readonly', false);
            $('#domiciliationstreet').removeClass('readonly');
            $('#domiciliationcity').attr('readonly', false);
            $('#domiciliationcity').removeClass('readonly');
            $('#domiciliationmunicipality').attr('readonly', false);
            $('#domiciliationmunicipality').removeClass('readonly');
        }
    }
}

function openAddresOverlay(zipcode, type) {
    if (zipcode.length == 4) {
        $('#checkAddress').attr('href', PROJECT_URL + 'shared/getAddresses.aspx?zipcode=' + zipcode + '&type=' + type);
        $('#checkAddress').click();
    }
}

function doADSLCheck() {
    if (submit_onclick('frmCheckout1', false)) { //Alleen wanneer het formulier verder correct is ingevuld.
        var PI_name = escape($('#lastName').val());
        var PI_firstname = escape($('#firstName').val());
        var PI_street = escape($('#street').val());
        var PI_streetnumber = escape($('#houseNumber').val());
        var PI_box = escape($('#houseNumberExtra').val());
        var PI_postalcode = escape($('#zipcode').val());
        var PI_city = escape($('#city').val());
		
		var urlBTC = '';
		if (PROJECT_URL.indexOf('TVVLAANDERENSHOP') > -1 || PROJECT_URL.indexOf('tvvlaanderenshop') > -1) {
			urlBTC = 'https://www.belgian-telecom.be/MyDualPlay/DSLflowM7/NL/indexTEST.aspx?PI_name=' + PI_name + '&PI_firstname=' + PI_firstname + '&PI_street=' + PI_street + '&PI_streetnumber=' + PI_streetnumber + '&PI_box=' + PI_box + '&PI_postalcode=' + PI_postalcode + '&PI_city=' + PI_city;
		}else{
			urlBTC = 'https://www.belgian-telecom.be/MyDualPlay/DSLflowM7/NL/index.aspx?PI_name=' + PI_name + '&PI_firstname=' + PI_firstname + '&PI_street=' + PI_street + '&PI_streetnumber=' + PI_streetnumber + '&PI_box=' + PI_box + '&PI_postalcode=' + PI_postalcode + '&PI_city=' + PI_city;
		}
		//var 
        //urlBTC = 'http://server01/tvvlaanderenshop/Views/TVVlaanderen/Shared/test.html'
        $('#checkBTC').attr('href', urlBTC);
        $('#checkBTC').click();
    }
}

function _updateParameters(DSLI_street, DSLI_streetnumber, DSLI_box, DSLI_postalcode, DSLI_city, Modem_company, Modem_name, Modem_firstname, Modem_street, Modem_streetnumber, Modem_box, Modem_postalcode, Modem_city, Modem_product, DSLS_lexcheck, DSLS_fixedline, DSLS_fixedlinenumber, DSLS_linetype, Porting_RequestType, Porting_number, Porting_Wp, BTC_SessionId, PI_PartnerId, PI_PartnerCMRRef, PI_ID, PI_IdexpDate, PI_VAT, DSLS_Appartment, DSLS_Phoneplug, DSLS_ADSL, DSLS_ADSLOperator, DSLS_GBCCMRNR, DSLS_MaxSpeed, Porting_Donor, Porting_Name, Porting_Firstname, Porting_Street, Porting_Streetnumber, Porting_Box, Porting_Postalcode, Porting_City, Porting_VAT, Porting_LOADate, DateIn, Partner, IPAdres, RegistratieDatum, DSLS_cid, DSLS_duedate,result) {    
	if(result == 'shop'){		
		setTimeout("window.history.go(-1)",300);
		hs.close();
		
	}else{
		if ($('#custom_option_DSLI_street').size() > 0) { $('#custom_option_DSLI_street').val(DSLI_street); }
		if ($('#custom_option_DSLI_streetnumber').size() > 0) { $('#custom_option_DSLI_streetnumber').val(DSLI_streetnumber); }
		if ($('#custom_option_DSLI_box').size() > 0) { $('#custom_option_DSLI_box').val(DSLI_box); }
		if ($('#custom_option_DSLI_postalcode').size() > 0) { $('#custom_option_DSLI_postalcode').val(DSLI_postalcode); }
		if ($('#custom_option_DSLI_city').size() > 0) { $('#custom_option_DSLI_city').val(DSLI_city); }
		if ($('#custom_option_Modem_company').size() > 0) { $('#custom_option_Modem_company').val(Modem_company); }
		if ($('#custom_option_Modem_name').size() > 0) { $('#custom_option_Modem_name').val(Modem_name); }
		if ($('#custom_option_Modem_firstname').size() > 0) { $('#custom_option_Modem_firstname').val(Modem_firstname); }
		if ($('#custom_option_Modem_street').size() > 0) { $('#custom_option_Modem_street').val(Modem_street); }
		if ($('#custom_option_Modem_streetnumber').size() > 0) { $('#custom_option_Modem_streetnumber').val(Modem_streetnumber); }
		if ($('#custom_option_Modem_box').size() > 0) { $('#custom_option_Modem_box').val(Modem_box); }
		if ($('#custom_option_Modem_postalcode').size() > 0) { $('#custom_option_Modem_postalcode').val(Modem_postalcode); }
		if ($('#custom_option_Modem_city').size() > 0) { $('#custom_option_Modem_city').val(Modem_city); }
		if ($('#custom_option_Modem_product').size() > 0) { $('#custom_option_Modem_product').val(Modem_product); }
		if ($('#custom_option_DSLS_lexcheck').size() > 0) { $('#custom_option_DSLS_lexcheck').val(DSLS_lexcheck); }
		if ($('#custom_option_DSLS_fixedline').size() > 0) { $('#custom_option_DSLS_fixedline').val(DSLS_fixedline); }
		if ($('#custom_option_DSLS_fixedlinenumber').size() > 0) { $('#custom_option_DSLS_fixedlinenumber').val(DSLS_fixedlinenumber); }
		if ($('#custom_option_DSLS_linetype').size() > 0) { $('#custom_option_DSLS_linetype').val(DSLS_linetype); }
		if ($('#custom_option_Porting_RequestType').size() > 0) { $('#custom_option_Porting_RequestType').val(Porting_RequestType); }
		if ($('#custom_option_Porting_number').size() > 0) { $('#custom_option_Porting_number').val(Porting_number); }
		if ($('#custom_option_Porting_Wp').size() > 0) { $('#custom_option_Porting_Wp').val(Porting_Wp); }
		if ($('#custom_option_BTC_SessionId').size() > 0) { $('#custom_option_BTC_SessionId').val(BTC_SessionId); }
		if ($('#custom_option_PI_PartnerId').size() > 0) { $('#custom_option_PI_PartnerId').val(PI_PartnerId); }
		if ($('#custom_option_PI_PartnerCMRRef').size() > 0) { $('#custom_option_PI_PartnerCMRRef').val(PI_PartnerCMRRef); }
		if ($('#custom_option_PI_ID').size() > 0) { $('#custom_option_PI_ID').val(PI_ID); }
		if ($('#custom_option_PI_IdexpDate').size() > 0) { $('#custom_option_PI_IdexpDate').val(PI_IdexpDate); }
		if ($('#custom_option_PI_VAT').size() > 0) { $('#custom_option_PI_VAT').val(PI_VAT); }
		if ($('#custom_option_DSLS_Appartment').size() > 0) { $('#custom_option_DSLS_Appartment').val(DSLS_Appartment); }
		if ($('#custom_option_DSLS_Phoneplug').size() > 0) { $('#custom_option_DSLS_Phoneplug').val(DSLS_Phoneplug); }
		if ($('#custom_option_DSLS_ADSL').size() > 0) { $('#custom_option_DSLS_ADSL').val(DSLS_ADSL); }
		if ($('#custom_option_DSLS_ADSLOperator').size() > 0) { $('#custom_option_DSLS_ADSLOperator').val(DSLS_ADSLOperator); }
		if ($('#custom_option_DSLS_GBCCMRNR').size() > 0) { $('#custom_option_DSLS_GBCCMRNR').val(DSLS_GBCCMRNR); }
		if ($('#custom_option_DSLS_MaxSpeed').size() > 0) { $('#custom_option_DSLS_MaxSpeed').val(DSLS_MaxSpeed); }
		if ($('#custom_option_Porting_Donor').size() > 0) { $('#custom_option_Porting_Donor').val(Porting_Donor); }
		if ($('#custom_option_Porting_Name').size() > 0) { $('#custom_option_Porting_Name').val(Porting_Name); }
		if ($('#custom_option_Porting_Firstname').size() > 0) { $('#custom_option_Porting_Firstname').val(Porting_Firstname); }
		if ($('#custom_option_Porting_Street').size() > 0) { $('#custom_option_Porting_Street').val(Porting_Street); }
		if ($('#custom_option_Porting_Streetnumber').size() > 0) { $('#custom_option_Porting_Streetnumber').val(Porting_Streetnumber); }
		if ($('#custom_option_Porting_Box').size() > 0) { $('#custom_option_Porting_Box').val(Porting_Box); }
		if ($('#custom_option_Porting_Postalcode').size() > 0) { $('#custom_option_Porting_Postalcode').val(Porting_Postalcode); }
		if ($('#custom_option_Porting_City').size() > 0) { $('#custom_option_Porting_City').val(Porting_City); }
		if ($('#custom_option_Porting_VAT').size() > 0) { $('#custom_option_Porting_VAT').val(Porting_VAT); }
		if ($('#custom_option_Porting_LOADate').size() > 0) { $('#custom_option_Porting_LOADate').val(Porting_LOADate); }
		if ($('#custom_option_DateIn').size() > 0) { $('#custom_option_DateIn').val(DateIn); }
		if ($('#custom_option_Partner').size() > 0) { $('#custom_option_Partner').val(Partner); }
		if ($('#custom_option_IPAdres').size() > 0) { $('#custom_option_IPAdres').val(IPAdres); }
		if ($('#custom_option_RegistratieDatum').size() > 0) { $('#custom_option_RegistratieDatum').val(RegistratieDatum); }
		if ($('#custom_option_DSLS_cid').size() > 0) { $('#custom_option_DSLS_cid').val(DSLS_cid); }
		if ($('#custom_option_DSLS_duedate').size() > 0) { $('#custom_option_DSLS_duedate').val(DSLS_duedate); }

		hs.close();
		return submit_onclick('frmCheckout1', true);
	}
}

