function forgotPassword () {
	var contentWin=Windows.getWindow('forgotPassWindow');
	if (contentWin == null) {
	  //contentWin = new Window({maximizable: false, resizable: false, hideEffect:Element.hide, showEffect:Element.show, minWidth: 10, destroyOnClose: true})
	  contentWin=new Window({id: "forgotPassWindow", className: 'alphacube', title: "Forgot Password", hideEffect:Element.hide, showEffect:Element.show, minimizable:false,maximizable:false, resizable:true, wiredDrag: true, destroyOnClose: true, width:550, height:300, modal:true});
	  contentWin.setContent('remindPassword', true, true);
	  contentWin.setZIndex(200);
	  contentWin.showCenter(true);
	  myObserver = {
		onDestroy: function(eventName, win) {
		  if (win == contentWin) {
			jQuery('#remindPassword').css('display', 'none');
			$('remindWrapper').appendChild($('remindPassword'));
			contentWin = null;
			Windows.removeObserver(this);
		  }
		}
	  }
	  Windows.addObserver(myObserver);
	}
	//var remindDiv = document.getElementById("remindPassword");
	//remindDiv.style.display = "block";
}

function remindPassword() {
	var email = document.getElementById("email").value;
	if (email == null || email == "") {
		alert("Write an email.");
		return;
	}
	
	var xmlString = "<?xml version='1.0' encoding='UTF-8'?>"+
					"<elements>"+
					"<actor>"+document.getElementById('thisActorCode').value+"</actor>"+
					"<unit>"+document.getElementById('unit').value+"</unit>"+
					"<pageAction>remindPassword</pageAction>"+
					"<action>remindPassword</action>"+
					"<email>"+email+"</email>";
					//"<message>"+message+"</message>";
					
	xmlString += "</elements>";
	xmlString=xmlString.replace(/&/g,'&amp;');
	
	var loader1 = new net.sendThis("main",onRemindPassword,null,this,null, "POST",xmlString,"text/xml");
}

function onRemindPassword () {

	var doc	= this.req.responseXML;
	if (doc == null) return;
	var status	= doc.getElementsByTagName("status");
	var message	= doc.getElementsByTagName("message");
	Windows.getWindow('forgotPassWindow').close();
	var remindPasswordResult = document.getElementById("remindPasswordResult");
	//remindPasswordResult.innerHTML = message[0].firstChild.nodeValue;
	alert(message[0].firstChild.nodeValue)
	
}
