function getf2(section){
	if(section > 0){
		var url = 'f2_' + section + 'form.html';
		var pars = '';
		var target = 'f2';
		var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars, evalScripts: true});
		f2submit();
	}
}

function f2submit(){
	var url = 'f2submit.html';
	var pars = '';
	var target = 'f2submit';
	var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars, evalScripts: true});
}

function resetForm(){
	var InterestArea = document.getElementById('InterestArea');
	InterestArea.options[0].selected = true;
}

function reference(){
		
		function O(txt,url) {
		a[k]=new Option(txt,url);k++;
		}
		function relate(formName,elementNum,j) {
		if(v) {
		k=1;
		if(j==0) {  
		a=new Array();
		O("Select","");
		}
		
		if(j==1) { 
		a=new Array();
		O("Select","");
		O("New York","##");
		O("Boston","##");
		O("Chicago","##");
		O("Los Angeles","##");
		O("San Francisco","##");
		}
		
		if(j==2) { 
		a=new Array();
		O("Select","");
		O("Investment Consultants Summit","##");
		O("Top Women Advisors","##");
		O("Top 100 Advisors","##");
		O("Art of Successful Investing","##");
		}
		
		if(j==3) { 
		a=new Array();
		O("Select","");
		O("To Subscribe","https://services.wsj.com/Gryphon/jsp/retentionController.jsp?page=1022");
		O("To Renew","https://services.wsj.com/Gryphon/jsp/retentionController.jsp?page=1050");
		O("To Suspend/Renew","http://www.barronsmag.com/subscription/suspend.html");
		O("Change of Address","http://www.barronsmag.com/subscription/change_address.html");
		O("Email Alerts","http://www.barronsmag.com/subscription/email_alerts.html");
		O("Customer Service","http://www.barronsmag.com/subscription/customer_service.html");
		O("Gift Subscriptions","http://www.barronsmag.com/subscription/gift_subscriptions.html");
		O("Back issues","http://www.barronsmag.com/subscription/back_issues.html");
		O("Reprints","http://www.barronsmag.com/subscription/reprints.html");
		}
		
		if(j==4) { 
		a=new Array();
		O("Select","");
		O("Luxury Real Estate","##");
		O("Golf Resorts","##");
		O("Costal Living","##");
		O("Wine","##");
		O("Travel","##");
		O("Current Corporate Reports","##");
		O("Annual Reports Roundup","##");
		}
		
		aln2=a.length;
		getFormNum(formName);
		if (formNum>=0) {
		formNum = formNum + 1;
		with (document.forms[formNum].elements[elementNum]) {
		for (var i=options.length-1;i>0;i--) options[i]=null;
		for (var i=1;i<aln2;i++) options[i-1]=a[i];
		options[0].selected=true;
			  }
		   }
		} else {
		jmp(formName,elementNum);
		   }
		}

}

function custRound(x,places) {
	// Created 1997 by Brian Risk.  http://members.aol.com/brianrisk
	return (Math.round(x*Math.pow(10,places)))/Math.pow(10,places)
}