var SI = new Object();

function showDropdown(id, id2) {
	if(document.getElementById('detes_'+id).style.display == 'none') {
	    document.getElementById('detes_'+id).style.display = 'block';
	    document.getElementById('title_'+id).style.backgroundImage = 'url(/images/html/arrow_down.gif)';
			document.getElementById('title_'+id).style.backgroundPosition = 'left center';
			document.getElementById('title_'+id).style.backgroundRepeat = 'no-repeat';
			document.getElementById('title_'+id).title= 'collapse';

	    if(id2) {
		    document.getElementById('detes_'+id2).style.display = 'block';
		    document.getElementById('title_'+id2).style.backgroundImage = 'url(/images/html/arrow_down.gif)';
			document.getElementById('title_'+id).style.backgroundPosition = 'left center';
			document.getElementById('title_'+id).style.backgroundRepeat = 'no-repeat';
		}

	} else {
		document.getElementById('detes_'+id).style.display = 'none';
		document.getElementById('title_'+id).style.backgroundImage = 'url(/images/html/arrow_up.gif)';
		document.getElementById('title_'+id).style.backgroundPosition = '2px center';
		document.getElementById('title_'+id).style.backgroundRepeat = 'no-repeat';
			document.getElementById('title_'+id).title= 'expand';

		if(id2) {
			document.getElementById('detes_'+id2).style.display = 'none';
			document.getElementById('title_'+id2).style.backgroundImage = 'url(/images/html/arrow_up.gif)';
		document.getElementById('title_'+id).style.backgroundPosition = '2px center';
		document.getElementById('title_'+id).style.backgroundRepeat = 'no-repeat';
		}
	}

	try {
	  SI.ClearChildren.clear();
	} catch (err) {
	  // do nothing
	}
}

/**
 * toggles the visibility of the service items
 * and clears out the data when they are closed/opened
 */
function toggle_service_request_item(name)
{
  // hide the items input
  $("service_item_"+name+"_items").toggle();

  // clear out the values foreach service item
  for (var i=0; i < 3; i++) {
    $("service_item_"+name+"_"+i).clear();
  }
  return true;
}