function changeProvider() {
	var contract_id;
	var product_id;
	var special_id;
	var b_edit;
	var GET;

	if(document.getElementById('contract_id')) {
		contract_id  = document.getElementById('contract_id').value;
	} else {
		contract_id = 0;
	}
	
	product_id  = document.getElementById('product_id').value;
	
	if(document.getElementById('special_id')) {
		special_id  = document.getElementById('special_id').value;
	} else {
		special_id = 0;
	}
	
	if(document.getElementById('b_edit')) {
		b_edit  = document.getElementById('b_edit').value;
	} else {
		b_edit = false;
	}
	
	GET = '?product_id=' + product_id + '&contract_id=' + contract_id + '&special_id=' + special_id + '&b_edit=' + b_edit;
	
	$('#featureBox').fadeIn(1000).html ($.ajax ({url: 'http://www.planetgsm.nl/backend/ajax/featureBox.php' + GET + "&" + $("#bundelForm").serialize().replace(/%5B/g, '[').replace(/%5D/g, ']') , async: false}).responseText);
	$('#price').fadeIn(1000).html ($.ajax ({url: 'http://www.planetgsm.nl/backend/ajax/price.php' + GET + "&" + $("#bundelForm").serialize().replace(/%5B/g, '[').replace(/%5D/g, ']') , async: false}).responseText);
}

function changeBundels() {
	var contract_id;
	var product_id;
	var special_id;
	var GET;

	product_id  = document.getElementById('product_id').value;
	
	if(document.getElementById('contract_id')) {
		contract_id  = document.getElementById('contract_id').value;
	} else {
		contract_id = 0;
	}
	
	if(document.getElementById('special_id')) {
		special_id  = document.getElementById('special_id').value;
	} else {
		special_id = 0;
	}
	
	if(document.getElementById('b_edit')) {
		b_edit  = document.getElementById('b_edit').value;
	} else {
		b_edit = false;
	}

	GET = '?product_id=' + product_id + '&contract_id=' + contract_id + '&special_id=' + special_id + '&b_edit=' + b_edit;

	$('#price').fadeIn(1000).html ($.ajax ({url: 'http://www.planetgsm.nl/backend/ajax/price.php' + GET + "&" + $("#bundelForm").serialize().replace(/%5B/g, '[').replace(/%5D/g, ']') , async: false}).responseText);
}

function changeTabs(tab,subtab) {
	var productnaam;
	var menu;
	var fabrikantnaam;
	var product_id;
	var special_id;
	var GET;
	var gift_id;
	var b_edit;
	
	product_id  = document.getElementById('product_id').value;
	if(document.getElementById('special_id')) {
		special_id  = document.getElementById('special_id').value;
	} else {
		special_id = 0;
	}
	
	if(document.getElementById('menu')) {
		menu  = document.getElementById('menu').value;
	} else {
		menu = 0;
	}
	
	if(document.getElementById('gift_id')) {
		gift_id  = document.getElementById('gift_id').value;
	} else {
		gift_id = 0;
	}	
	
	if(document.getElementById('fabrikantnaam')) {
		fabrikantnaam  = document.getElementById('fabrikantnaam').value;
	} else {
		fabrikantnaam = 0;
	}
	
	if(document.getElementById('productnaam')) {
		productnaam  = document.getElementById('productnaam').value;
	} else {
		productnaam = 0;
	}
	
	if(document.getElementById('b_edit')) {
		b_edit  = document.getElementById('b_edit').value;
	} else {
		b_edit = false;
	}

	GET = '?product_id=' + product_id + '&tab=' + tab + '&subtab=' + subtab + '&special_id=' + special_id + '&productnaam=' + productnaam + '&fabrikantnaam=' + fabrikantnaam + '&menu=' + menu + '&gift_id=' + gift_id + '&b_edit=' + b_edit ;

	$('#tabBox').fadeIn(1000).html ($.ajax ({url: 'http://www.planetgsm.nl/backend/ajax/content.desc.php' + GET , async: false}).responseText);
	return false;
}

function changeProduct(product_id) {
	var contract_id;
	var GET;
	
	if(document.getElementById('contract_id')) {
		contract_id  = document.getElementById('contract_id').value;
	} else {
		contract_id = 0;
	}

	GET = '?pb=true&product_id=' + product_id + '&contract_id=' + contract_id;

	$('#price').fadeIn(1000).html ($.ajax ({url: 'http://www.planetgsm.nl/backend/ajax/price.php' + GET + "&" + $("#bundelForm").serialize().replace(/%5B/g, '[').replace(/%5D/g, ']') , async: false}).responseText);
}

