function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

function showOverlay(overlayToShow,overlaysToHide){
	$(".overlayContainer").show();
	for(overlay in overlaysToHide){
		$("." + overlaysToHide[overlay]).hide();
	}
		$("." + overlayToShow).show();

}

function hideOverlay(overlaysToHide){
	for(overlay in overlaysToHide){
		$("." + overlaysToHide[overlay]).hide();
	}
	$("body").css("overflow","auto");
}

function levelGreenBoxes(){
	var greenBoxesHeight = $('.greenBoxesWrapper').height();
	var boxTopPosition = 0;
	var arrowTopPosition = 10;
	
	if($.browser.msie && $.browser.version == "7.0"){
		$('.greenboxPopup').each(function(){
			$(this).height(greenBoxesHeight);
			$(this).find('.tblPopup').height(greenBoxesHeight);
			$(this).parent().find('.popupArrow').css('top', arrowTopPosition);
			arrowTopPosition += 105;
		});
	} else {
		$('.greenboxPopup').each(function(){
			$(this).height(greenBoxesHeight);
			$(this).find('.tblPopup').height(greenBoxesHeight);
			$(this).css('top', boxTopPosition);
			boxTopPosition -= 105;
		});
	}
}

function toggleGreenBoxCntnt(element){
	$(element).parent().find('.btnExpand').toggle();
	$(element).parent().find('.btnCollapse').toggle();
	$(element).parent().find('.hiddenGreenBoxCntnt').toggle();
}
