function showDD(boxid){
   document.getElementById(boxid).style.display="block";
}

function hideDD(boxid){
   document.getElementById(boxid).style.display="none";
}

function setCurrent(linkid) {
	document.getElementById(linkid).className="current";
}
function unsetCurrent(linkid) {
	document.getElementById(linkid).className="";
}

function switchid(id){	
	hideallids();
	showdiv(id);
}

function submit_misc_form(id) {
	switchid(id);
	document.miscForm.submit();
}

function submitform(form) {
	switchid('a1');
	document.makemodelyear.submit(form);
}

function submitformmodel(test) {
	switchid('a2');
	document.getElementById(test).submit();
}


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(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
//safe function to show an element with a specified id
	  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}


