// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
  function showHideDetails(img, dest){
   $(img).src = "/images/hide.gif";
   if($(dest).style.display == "none")
     {
          Effect.BlindDown(dest, { duraion: 2.0 });
     }
   else
     {
          $(dest).style.display = "none";
          $(img).src = "/images/show.gif";
     }
 }
 
 
function show_feedback_div(id) 
{
	if (document.getElementById) 
	{ // DOM3 = IE5, NS6 
	document.getElementById('shownext'+id).style.display = '';
	document.getElementById('showfirst'+id).style.display = 'none';
	document.getElementById('shownext'+id).style.visibility = 'visible'; 
	document.getElementById('showfirst'+id).style.visibility = 'hidden'; 
	} 
	else 
	{ 
		if (document.layers) 
		{ // Netscape 4 
		document.shownext.visibility = 'visible'; 
		document.showfirst.visibility = 'hidden';
		} 
		else 
		{ // IE 4 
		document.all.shownext.style.visibility = 'visible';
		document.all.showfirst.style.visibility = 'hidden'; 
		} 
	} 
}

function initEditor(){
  tinyMCE.idCounter=0;
  tinyMCE.execCommand( 'mceAddControl', true, 'hotel_description' );
}

function killEditor() {
  tinyMCE.triggerSave(true,true);
  tinyMCE.execCommand( 'mceRemoveControl', true, 'hotel_description' );
}