function popup(url) {
	popupWindow = window.open(
		url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=yes')
}


function distributorApplicationForm() {
	document.getElementById('GSTNumber').style.display = 'none';
	document.getElementById('Form_distributorApplicationForm_GSTNumber').value = 'N/A';
	document.getElementById('Form_distributorApplicationForm_GSTRegistered_True').onclick = function() {	
		document.getElementById('Form_distributorApplicationForm_GSTNumber').value = '';
		document.getElementById('GSTNumber').style.display = 'block';
	}
	document.getElementById('Form_distributorApplicationForm_GSTRegistered_False').onclick = function() {	
		document.getElementById('GSTNumber').style.display = 'none';
		document.getElementById('Form_distributorApplicationForm_GSTNumber').value = 'N/A';
	}
	
	document.getElementById('SpecifyDistributeRegions').style.display = 'none';
	document.getElementById('Form_distributorApplicationForm_DistributeRegions_Specificgeographicalregions').onclick = function() {	
		document.getElementById('SpecifyDistributeRegions').style.display = 'block';
	}
	document.getElementById('Form_distributorApplicationForm_DistributeRegions_WholeofNewZealand').onclick = function() {	
		document.getElementById('SpecifyDistributeRegions').style.display = 'none';		
	}
	
	document.getElementById('Form_distributorApplicationForm_PaymentDetails_DirecttoSupplier').onclick = function() {	
		document.getElementById('DistributorTermsConditions').style.display = 'none';
 		document.getElementById('StandardTerms').style.display = 'block';		
	}	
	
	
	document.getElementById('Form_distributorApplicationForm_PaymentDetails_OnAccount').onclick = function() {	
		document.getElementById('DistributorTermsConditions').style.display = 'block';
 		document.getElementById('StandardTerms').style.display = 'none';		
	}		
	
	document.getElementById('DistributorTermsConditions').style.display = 'none';
	
	document.getElementById('Form_distributorApplicationForm_StandardTerms_No').onclick = function() {	
		document.getElementById('DistributorTermsConditions').style.display = 'block';
	}	

	document.getElementById('Form_distributorApplicationForm_StandardTerms_Yes').onclick = function() {	
		document.getElementById('DistributorTermsConditions').style.display = 'none';
	}	
}



function sellerForm() {

  var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;

  IE6 = false;

  if(!IE6) {
	
	////////////////////////
	//REGISTER AS A SELLER//
	////////////////////////

	//Type of tourism service offered
	document.getElementById('Form_SellerForm_NumberOfRooms').value = '';
	document.getElementById('Form_SellerForm_NumberOfTours').value = 'N/A';
	document.getElementById('NumberOfTours').style.display = 'none';

	document.getElementById('Form_SellerForm_TypeOfService').onchange = function() {

		if(document.getElementById('Form_SellerForm_TypeOfService').selectedIndex == 0) {
			document.getElementById('NumberOfTours').style.display = 'none';
			document.getElementById('Form_SellerForm_NumberOfTours').value = 'N/A';
			document.getElementById('Form_SellerForm_NumberOfRooms').value = '';
			document.getElementById('NumberOfRooms').style.display = 'block';
		}
		else if(document.getElementById('Form_SellerForm_TypeOfService').selectedIndex == 1) {
			document.getElementById('NumberOfRooms').style.display = 'none';
			document.getElementById('Form_SellerForm_NumberOfRooms').value = 'N/A';
			document.getElementById('Form_SellerForm_NumberOfTours').value = '';
			document.getElementById('NumberOfTours').style.display = 'block';
		}
		else if(document.getElementById('Form_SellerForm_TypeOfService').selectedIndex == 2) {
			document.getElementById('NumberOfTours').style.display = 'none';
			document.getElementById('NumberOfRooms').style.display = 'none';
			document.getElementById('Form_SellerForm_NumberOfRooms').value = 'N/A';
			document.getElementById('Form_SellerForm_NumberOfTours').value = 'N/A';
		}
	
	}



	//website
	document.getElementById('Website').style.display='none';
	document.getElementById('Form_SellerForm_Website').value='N/A';

	document.getElementById('Form_SellerForm_HaveWebsite_True').onclick = function() {
		document.getElementById('Form_SellerForm_Website').value='';
		document.getElementById('Website').style.display='block';		
	}

	document.getElementById('Form_SellerForm_HaveWebsite_False').onclick = function() {
		document.getElementById('Website').style.display='none';		
		document.getElementById('Form_SellerForm_Website').value='N/A';
	}




	//Booking management system
	document.getElementById('BookingManagementSystemName').style.display = 'none';
	document.getElementById('BookingManagementSystemType').style.display = 'none';
	document.getElementById('Form_SellerForm_BookingManagementSystemName').value = 'N/A';
	document.getElementById('Form_SellerForm_HaveBookingManagementSystem_False').onclick = function() {
		document.getElementById('BookingManagementSystemName').style.display = 'none';
		document.getElementById('Form_SellerForm_BookingManagementSystemName').value = 'N/A';
		document.getElementById('BookingManagementSystemType').style.display = 'none';
		document.getElementById('BookingManagementSystemTypeOtherDetails').style.display = 'none';
		document.getElementById('Form_SellerForm_BookingManagementSystemTypeOtherDetails').value = 'N/A';
		document.getElementById('Form_SellerForm_BookingManagementSystemType_LiveInventory').checked = 'true';
	}
	document.getElementById('Form_SellerForm_HaveBookingManagementSystem_True').onclick = function() {
		document.getElementById('Form_SellerForm_BookingManagementSystemName').value = '';
		document.getElementById('BookingManagementSystemName').style.display = 'block';
		document.getElementById('BookingManagementSystemType').style.display = 'block';
	}


	//Live inventory, allotment, both or other
	document.getElementById('BookingManagementSystemTypeOtherDetails').style.display = 'none';
	document.getElementById('Form_SellerForm_BookingManagementSystemTypeOtherDetails').value = 'N/A';
	
	document.getElementById('Form_SellerForm_BookingManagementSystemType_LiveInventory').onclick = function() {
		document.getElementById('BookingManagementSystemTypeOtherDetails').style.display = 'none';
		document.getElementById('Form_SellerForm_BookingManagementSystemTypeOtherDetails').value = 'N/A';
	}

	document.getElementById('Form_SellerForm_BookingManagementSystemType_AllotmentSystem').onclick = function() {
		document.getElementById('BookingManagementSystemTypeOtherDetails').style.display = 'none';
		document.getElementById('Form_SellerForm_BookingManagementSystemTypeOtherDetails').value = 'N/A';
	}

	document.getElementById('Form_SellerForm_BookingManagementSystemType_Combination').onclick = function() {
		document.getElementById('BookingManagementSystemTypeOtherDetails').style.display = 'none';
		document.getElementById('Form_SellerForm_BookingManagementSystemTypeOtherDetails').value = 'N/A';
	}

	document.getElementById('Form_SellerForm_BookingManagementSystemType_Other').onclick = function() {
		document.getElementById('Form_SellerForm_BookingManagementSystemTypeOtherDetails').value = '';
		document.getElementById('BookingManagementSystemTypeOtherDetails').style.display = 'block';
	}
   }

}


function buyerForm() {

	///////////////////////
	//REGISTER AS A BUYER//
	///////////////////////


  var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;

  IE6 = false;

  if(!IE6) {

	document.getElementById('NumberOfRetailStores').style.display = 'none';
	document.getElementById('NumberOfConsultants').style.display = 'none';
	document.getElementById('RetailDistributionSystemName').style.display = 'none';
	document.getElementById('OtherGlobalDistributionSystemName').style.display = 'none';
	document.getElementById('GlobalDistributionSystemName').style.display = 'none';



	//do you have a retail store
	document.getElementById('Form_BuyerForm_NumberOfRetailStores').value = 'N/A';
	document.getElementById('Form_BuyerForm_NumberOfConsultants').value = 'N/A';
	document.getElementById('Form_BuyerForm_HaveRetailStore_True').onclick = function() {
		document.getElementById('Form_BuyerForm_NumberOfRetailStores').value = '';
		document.getElementById('Form_BuyerForm_NumberOfConsultants').value = '';
		document.getElementById('NumberOfRetailStores').style.display = 'block';
		document.getElementById('NumberOfConsultants').style.display = 'block';
	}
	document.getElementById('Form_BuyerForm_HaveRetailStore_False').onclick = function() {
		document.getElementById('NumberOfRetailStores').style.display = 'none';
		document.getElementById('NumberOfConsultants').style.display = 'none';
		document.getElementById('Form_BuyerForm_NumberOfRetailStores').value = 'N/A';
		document.getElementById('Form_BuyerForm_NumberOfConsultants').value = 'N/A';
	}

	//do you have a retail operating system
	document.getElementById('Form_BuyerForm_RetailDistributionSystemName').value = 'N/A';
	document.getElementById('Form_BuyerForm_HaveRetailDistributionSystem_True').onclick = function() {
		document.getElementById('Form_BuyerForm_RetailDistributionSystemName').value = '';
		document.getElementById('RetailDistributionSystemName').style.display = 'block';
	}
	document.getElementById('Form_BuyerForm_HaveRetailDistributionSystem_False').onclick = function() {
		document.getElementById('RetailDistributionSystemName').style.display = 'none';
		document.getElementById('Form_BuyerForm_RetailDistributionSystemName').value = 'N/A';
	}

	//do you use a GDS
	document.getElementById('Form_BuyerForm_OtherGlobalDistributionSystemName').value = 'N/A';
	document.getElementById('Form_BuyerForm_HaveGlobalDistributionSystem_True').onclick = function() {
		document.getElementById('GlobalDistributionSystemName').style.display = 'block';
	}
	document.getElementById('Form_BuyerForm_HaveGlobalDistributionSystem_False').onclick = function() {
		document.getElementById('GlobalDistributionSystemName').style.display = 'none';
		document.getElementById('Form_BuyerForm_OtherGlobalDistributionSystemName').value = 'N/A';
		document.getElementById('OtherGlobalDistributionSystemName').style.display = 'none';
		document.getElementById('Form_BuyerForm_GlobalDistributionSystemName').selectedIndex = 0;
	}


	document.getElementById('Form_BuyerForm_GlobalDistributionSystemName').onchange = function() {
		if(document.getElementById('Form_BuyerForm_GlobalDistributionSystemName').selectedIndex == 5) {
			document.getElementById('Form_BuyerForm_OtherGlobalDistributionSystemName').value = '';
			document.getElementById('OtherGlobalDistributionSystemName').style.display = 'block';
		}
		else {
			document.getElementById('OtherGlobalDistributionSystemName').style.display = 'none';
			document.getElementById('Form_BuyerForm_OtherGlobalDistributionSystemName').value = 'N/A';
		}
	}

    }

}