function switchBox(id,num) {
	// display only current info box
	var tabs = new Array('headoffice','offices','retail','logistics','hotels');
	var tabsCollection = new Array('headoffice','offices','retail','logistics','hotels');
	
	
	for(i=0;i<tabs.length;i++) {
		document.getElementById(tabs[i]).style.display = "none";
	}
	document.getElementById(id).style.display = "block";
	
	// set current tab to active, set the next one (if exists) to pastActive,
	// set last one to last
	
	// remove all classes
	for(i=0;i<tabsCollection.length;i++) {
		document.getElementById(tabsCollection[i]).className = "";
		
	}
	
	// set which one is active
	for(i=0;i<tabs.length;i++) {
		if(tabs[i] == id) {
			document.getElementById(tabsCollection[i]).className = "active";
		}
	}
	// find out what the next one is, if any (grumble grumble no array.indexOf support)
	var activeIndex=-1;
	for(i=0;i<tabs.length;i++) {
		if(tabs[i] == id) {
			activeIndex = i;
		}
	}
	// set pastActive
	if((activeIndex != -1) && (activeIndex != tabs.length-1)) {
		document.getElementById(tabsCollection[activeIndex+1]).className = "pastActive";
	}
	// and set last
	var j;
	for(i=0;i<tabsCollection.length;i++) {
		if (document.getElementById(tabsCollection[i]).style.display != "none")
		{
			j = i;
		}	
	}
	document.getElementById(tabsCollection[j]).className += " last";
}

/* switching package area colors (confirmation_step1.htm) */





function validatecontactinfo() {
  
missinginfo = "";
if (document.contactform.name.value == "") {
missinginfo += "\n     -  Name";
}
if (document.contactform.telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if (document.contactform.email.value == "") {
missinginfo += "\n     -  Email";
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}


function validatennewsletterinfo() {
missinginfo = "";
if (document.newsletterform.name.value == "") {
missinginfo += "\n     -  Name";
}
if (document.newsletterform.telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if (document.newsletterform.email.value == "") {
missinginfo += "\n     -  Email";
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
