var ids=new Array('payment','error');

function switchid(element){	
	hideallids();
//	hidediv('info');
	showdiv(element);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(element) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(element).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.element.display = 'none';
		}
		else { // IE 4
			document.all.element.style.display = 'none';
		}
	}
}

function showdiv(element) {
	//safe function to show an element with a specified id
 
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(element).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.element.display = 'block';
		}
		else { // IE 4
			document.all.element.style.display = 'block';
		}
	}
}
