function switch_drop_down_action (form_id, drop_down_id, url) {
	// alert(url)
	var new_value
  var our_form = $(form_id)
  var our_drop_down = $(drop_down_id)
	var options = our_drop_down.options
	var selected_index = our_drop_down.selectedIndex
	
	if (our_drop_down.value == "all") {
	  new_value = "all"
	}else{
	  new_value = our_drop_down.options[selected_index].text.toLowerCase().replace(/(\s)/g,'+')
	}
	
	if(/(\/)group(\/)$/.test(url)){
		our_form.action = url+new_value
		// alert('end group')
	}else{
	  our_form.action = url.replace(/(\/)([a-zA-Z0-9]+(\+)?)+$/,"/"+new_value)		
		// alert('end name')
	}
  // alert(our_form.action)
	our_form.submit()
}


function init(element) {
  our_element = $("views");
	if(our_element){
	  reference_element = our_element.getElementsByTagName("a").item(0);
    if (element == "views") {
      reference_element.innerHTML = "- " + reference_element.firstChild.nodeValue;
      $("views_table").style.height = "120px";
    } else {
      reference_element.innerHTML = "+ " + reference_element.firstChild.nodeValue;
      $("views_table").style.height = "0px";
    }
    $("views_table").style.display = "block";	
	}

  our_element = $("specifications");
	if(our_element){
		reference_element = our_element.getElementsByTagName("a").item(0);
    if (element == "specifications") {
      reference_element.innerHTML = "- " + reference_element.firstChild.nodeValue;
      $("specifications_table").style.height = "120px";
    } else {
      reference_element.innerHTML = "+ " + reference_element.firstChild.nodeValue;
      $("specifications_table").style.height = "0px";
    }
    $("specifications_table").style.display = "block";	
	}

  our_element = $("compatibility");
	if(our_element){
    reference_element = our_element.getElementsByTagName("a").item(0);
    if (element == "compatibility") {
      reference_element.innerHTML = "- " + reference_element.firstChild.nodeValue;
      $("compatibility_table").style.height = "120px";
    } else {
      reference_element.innerHTML = "+ " + reference_element.firstChild.nodeValue;
      $("compatibility_table").style.height = "0px";
    }
    $("compatibility_table").style.display = "block";
	}
}

function show_hide(element) {
	element = element.toString();
	/*our_element = document.getElementById(element);*/
	our_element = $(element);
	our_element_style = our_element.style;
	reference_element = our_element.parentNode.getElementsByTagName("a").item(0);
	//alert(reference_element);


	if (reference_element.firstChild.nodeValue.charAt(0) == "+") {
		reference_element.innerHTML = "- " + reference_element.firstChild.nodeValue.substring(1);
	} else {
		reference_element.innerHTML = "+ " + reference_element.firstChild.nodeValue.substring(1);
	}

  if (element == "views_table") {
	  if (our_element_style.height == " "||our_element_style.height == "0px") {
  		//our_element_style.display = "block";
  		our_element.effect('height',{duration: 300}).start(100);
  	} else {
  		our_element.effect('height',{duration: 300}).start(0);
  		//our_element_style.display = "none";
  	}
  } else {
	  if (our_element_style.height == " "||our_element_style.height == "0px") {
  		//our_element_style.display = "block";
  		our_element.effect('height',{duration: 300}).start(120);
  	} else {
  		our_element.effect('height',{duration: 300}).start(0);
  		//our_element_style.display = "none";
  	}
  }

}

window.addEvent('domready',function(){
	$('search_field').addEvent('focus',function(e){
		this.value=""
	})
})