// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function clearInputMainColor()
{
	
	$('post_main_color_other').value = '';
	$('post_main_color_other').style.color = 'black'
	
}

function resetInputMainColor()
{
	if ($('post_main_color_other').value == ''){
	$('post_main_color_other').value = 'Please specify here'
	$('post_main_color_other').style.color = '#B4B4B4'
	}
}

function clearInputSecondaryColor()
{
	
	$('post_secondary_color_other').value = '';
	$('post_secondary_color_other').style.color = 'black'
	
}

function resetInputSecondaryColor()
{
	if ($('post_secondary_color_other').value == ''){
	$('post_secondary_color_other').value = 'Please specify here'
	$('post_secondary_color_other').style.color = '#B4B4B4'
	}
}
function clearInputTail()
{
	$('post_tail_type_name').value = '';
	$('post_tail_type_name').style.color = 'black'
	
}

function resetInputTail()
{
	if ($('post_tail_type_name').value == ''){
	$('post_tail_type_name').value = 'Please specify here'
	$('post_tail_type_name').style.color = '#B4B4B4'
	}
}
function clearInputEye()
{
	
	$('post_eye_color_name').value = '';
	$('post_eye_color_name').style.color = 'black'
	
	
}

function resetInputEye()
{
	if ($('post_eye_color_name').value == ''){
	$('post_eye_color_name').value = 'Please specify here'
	$('post_eye_color_name').style.color = '#B4B4B4'
	}
}
function clearInputEar()
{
	
	$('post_ear_type_name').value = '';
	$('post_ear_type_name').style.color = 'black'
	
}

function resetInputEar()
{
	if ($('post_ear_type_name').value == ''){
	$('post_ear_type_name').value = 'Please specify here'
	$('post_ear_type_name').style.color = '#B4B4B4'
	}
}
function clearInputBirdOtherBreed()
{
	
	$('post_bird_other_breed').value = '';
	$('post_bird_other_breed').style.color = 'black'
	
}

function resetInputBirdOtherBreed()
{
	if ($('post_bird_other_breed').value == ''){
	$('post_bird_other_breed').value = 'Please specify here'
	$('post_bird_other_breed').style.color = '#B4B4B4'
	}
}
function clearInputCatMixedBreed()
{
	
	$('post_cat_mixed_breed').value = '';
	$('post_cat_mixed_breed').style.color = 'black'
	
}

function resetInputCatMixedBreed()
{
	if ($('post_cat_mixed_breed').value == ''){
	$('post_cat_mixed_breed').value = 'Please specify here'
	$('post_cat_mixed_breed').style.color = '#B4B4B4'
	}
}
function clearInputCatOtherBreed()
{
	
	$('post_cat_other_breed').value = '';
	$('post_cat_other_breed').style.color = 'black'
	
}

function resetInputCatOtherBreed()
{
	if ($('post_cat_other_breed').value == ''){
	$('post_cat_other_breed').value = 'Please specify here'
	$('post_cat_other_breed').style.color = '#B4B4B4'
	}
}
function clearInputDogMixedBreed()
{
	
	$('post_dog_mixed_breed').value = '';
	$('post_dog_mixed_breed').style.color = 'black'
	
}

function resetInputDogMixedBreed()
{
	if ($('post_dog_mixed_breed').value == ''){
	$('post_dog_mixed_breed').value = 'Please specify here'
	$('post_dog_mixed_breed').style.color = '#B4B4B4'
	}
}
function clearInputDogOtherBreed()
{
	
	$('post_dog_other_breed').value = '';
	$('post_dog_other_breed').style.color = 'black'
	
}

function resetInputDogOtherBreed()
{
	if ($('post_dog_other_breed').value == ''){
	$('post_dog_other_breed').value = 'Please specify here'
	$('post_dog_other_breed').style.color = '#B4B4B4'
	}
}
function clearInputHorseOtherBreed()
{
	
	$('post_horse_other_breed').value = '';
	$('post_horse_other_breed').style.color = 'black'
	
}

function resetInputHorseOtherBreed()
{
	if ($('post_horse_other_breed').value == ''){
	$('post_horse_other_breed').value = 'Please specify here'
	$('post_horse_other_breed').style.color = '#B4B4B4'
	}
}
function clearInputReptileOtherBreed()
{
	
	$('post_reptile_other_breed').value = '';
	$('post_reptile_other_breed').style.color = 'black'
	
}

function resetInputReptileOtherBreed()
{
	if ($('post_reptile_other_breed').value == ''){
	$('post_reptile_other_breed').value = 'Please specify here'
	$('post_reptile_other_breed').style.color = '#B4B4B4'
	}
}
var timeout	= 10;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose; 


