var oLightbox;
glow.ready(function(){glow.dom.get("#formPanel").removeClass("hide");oLightbox=new glow.widgets.Panel("#formPanel",{width: 500, theme: "dark", modal: true, anim: "fade"});});
function showForm() {
	if(glow.isReady){oLightbox.show().content.get(".glowClear").each(function(i){this.value="";this.innerHTML="";});}
	else{alert("Please be patient - the page is not fully loaded yet!");}
	return false;
}
function submitForm(sResponseID,sPath,sLibraryPath) {
	var sText=postForm(sLibraryPath+"Ajax/sendMail.php?ajax=Y&path="+sPath,glow.data.encodeUrl(oLightbox.content.get("form").val()));
	var oResponse=document.getElementById(sResponseID);
	if (sText.slice(0,6)=="RELOAD"){window.location.reload();}
	else {
		if(sText.slice(0,5)=="ERROR"){sText=sText.slice(5);}else{var t=setTimeout("oLightbox.hide()",3000);}
		oResponse.innerHTML=sText;
	}
	return false;
}
