function NYC_Subscription() { }

NYC_Subscription.prototype.initialize = function() {
	this.profileHiddenFields = new Array(); 
	this.profileHiddenFields["A"] = new Array("ByTransferPayment", "ByCheckPaymentContact", "Stand", "Information", "Topic");
	this.profileHiddenFields["B"] = new Array("ByTransferPayment", "ByCheckPaymentContact", "Stand", "Information");
	this.profileHiddenFields["C"] = new Array("ByTransferPayment", "ByCheckPaymentContact", "Information", "Topic");
	this.profileHiddenFields["D"] = new Array("ByTransferPayment", "ByCheckPaymentContact", "Information");
	
	this.activeProfile = "";
}

NYC_Subscription.prototype.showProfile = function(profile) {
	if(this.activeProfile != "") 
		$('#Profile' + this.activeProfile).hide(250);

	$('.FormLine').hide(250);
	
	if(profile == "A") 
		$('#PHiddenForProfileA').hide(250);
	else 
		$('#PHiddenForProfileA').show(250);
	
	var elements = $('.FormLine');
	for(var i in elements) {
		var visible = true;
		for(var j in this.profileHiddenFields[profile])
			if(elements[i].id == ("P" + this.profileHiddenFields[profile][j]))
				visible = false;
				
		if(visible) $("#" + elements[i].id).show(250);
	}
	
	$('#Profile' + profile).show(250);
	
	this.activeProfile = profile;
}

NYC_Subscription.prototype.openStands = function(language) {
	if(language == 'FR') window.open('http://www.eclipse-nowyoucan.com/img/Stand_FR.jpg', 'Stands', 'dependent=yes,width=313,location=no,height=500,resizable=no,scrollbars=no,menubar=no,status=no,toolbar=no');
	else if(language == 'EN') window.open('http://www.eclipse-nowyoucan.com/img/Stand_EN.jpg', 'Stands', 'dependent=yes,width=313,location=no,height=500,resizable=no,scrollbars=no,menubar=no,status=no,toolbar=no');
}

NYC_Subscription.prototype.paymentMode = function(index) {
	if(index == 1) {
		$('#PByCheckPaymentContact').show(250); 
		$('#PByTransferPayment').hide(250); 
	}
	else if(index == 2) {
		$('#PByCheckPaymentContact').hide(250); 
		$('#PByTransferPayment').show(250); 
	}
	else {
		$('#PByCheckPaymentContact').hide(250);
		$('#PByTransferPayment').hide(250); 
	}
}