function clickClear(thisfield, defaulttext) {
            if (thisfield.value == defaulttext) {
                thisfield.value = "";
            }
        }
function clickRecall(thisfield, defaulttext) {
            if (thisfield.value == '') {
                thisfield.value = defaulttext;
            }
        }

function applyModalPanelEffect(panelId, effectFunc, params) {
	if (panelId && effectFunc) {
		
		var modalPanel = $(panelId);
		
		if (modalPanel && modalPanel.component) {
			var component = modalPanel.component;
			var div = component.getSizedElement(); 
			
			Element.hide(div);
						
			effectFunc.call(this, Object.extend({targetId: div.id}, params || {}));
		}
				
	}
}

function windowcloses(){
	if (document.getElementById('shareform:sharemail1')==null && document.getElementById('shareform:yourname1')==null && document.getElementById('shareform:yourmail1')==null)
	{	
	Richfaces.hideModalPanel('share');	
	}
	}
	
	
function display2(obj)
{
	total=10;
	for(var i=1;i<=total;i++)
	{
		//alert(document.getElementById(i).id);
		document.getElementById(i).style.display="none";
	}
	document.getElementById(obj).style.display="block";
}

function display(obj)
{
	total=13;
	for(var i=1;i<=total;i++)
	{
		//alert(document.getElementById(i).id);
		document.getElementById(i).style.display="none";
	}
	document.getElementById(obj).style.display="block";
}
 
