function mozilla_default_date() {
	var outday=document.afpForm.outday.selectedIndex;
	var outmonth=document.afpForm.outmonth.selectedIndex;
	var calendar=new Date();
	var advpurchase=3;
	calendar.setDate(calendar.getDate()+advpurchase);
	document.afpForm.outday.selectedIndex=calendar.getDate()-1;
	document.afpForm.outmonth.selectedIndex=calendar.getMonth();
	calendar.setDate(calendar.getDate()+7);
	document.afpForm.retday.selectedIndex=calendar.getDate()-1;
	document.afpForm.retmonth.selectedIndex=calendar.getMonth();
	if ((document.preforma)&&(document.preforma.loccurrency)&&(document.preforma.loccountry)){
		change_parameters(document.preforma.loccurrency);
		change_parameters(document.preforma.loccountry);
	} 
	if (document.afpForm.retday.selectedIndex==-1) { document.afpForm.retday.selectedIndex=-1;}
}
// Following is to fix Netscape 6's strange behaviour
setTimeout('mozilla_default_date()',100);
setTimeout("showCnn(0)", 100);
function restoreDestination(){
if (document.afpForm) {
if (document.afpForm.rdcitycodeSelector && document.afpForm.country) {
buildCitySelection(document.afpForm.country,document.afpForm.rdcitycodeSelector);
for (var i=0;i<document.afpForm.rdcitycodeSelector.options.length;i++) {
if (Codes[getRealArrIndex(document.afpForm.rdcitycodeSelector.options[i].value)]==document.afpForm.udf_I_rdcitycode.value) {
document.afpForm.rdcitycodeSelector.selectedIndex=i;
}
}
}
}
}
setTimeout("restoreDestination()",10);
