// function setCustomToBOM() {
//  var aux; if (aux=getObj('captionMsg')) { aux.innerHTML='Hosted Buyer Programme'; aux.height=20; }
// }

function getBOMEventList(EVENTS) {
 var res='<table border=0 cellspacing=0 cellpadding=2>';
 for (var i in EVENTS) {
 	var obj=EVENTS[i];
 	obj.infoPDF=obj.files;
 	res+='<tr><td width=20 valign=top><input type=checkbox name="SELECTED_EVENTS[]" value="$id"><td>Best of MICE <b>"$name"</b>, $city $dates <a target=_blank href="/files/bom/$infoPDF">+info</a>'.xParse(obj);
 }
 res+='</table>';
 return res;
}

function initialize() {
// if (location.hostname=='www.bestofmice.com') setCustomToBOM();
 var F,OBJ,ctl;
 if (document.form1) addGroupOptsToCombo(document.form1.COUNTRY,CTYS,'n','z');
 if (window.initialize_stage2) window.initialize_stage2();
 if (F=document.formBOMSupplier) {
 	if (OBJ=window.BOM_REGISTERING) {
		var m;
		if (QueryString.test==2) OBJ.user_name='Montero, Luis';
		OBJ.name=OBJ.user_name;
		if (m=OBJ.name.match(/^(.+?), *(.+)$/)) {
			OBJ.name=m[1];
			OBJ.surname=m[2];
		}
		OBJ.company_email=OBJ.personal_email=OBJ.email;
		OBJ.phone=OBJ.events_phone;
		OBJ.fax=OBJ.events_fax;
	} else
		OBJ=ROW.bom;
 	fillForm(F,OBJ);
 }
 if ((BOM_DOMAIN) && (F=document.form1) && (ctl=F.BOMLEVEL)) {
 	ctl.checked=1;
 	ctl.onchange=ctl.onclick=function() { this.checked=1; return false; }
 	ctl.onfocus=function() { this.blur(); return false; }
 	ctl.className='req';
 }
}

chainOnload(initialize);

function form1_validate(me,sending) {
 var stage2;
 me.__countryname.value=SELECT_getTextValue(me.COUNTRY);
 if (stage2=window.form1_validate_stage2) stage2(me);
 return true;
}

