YAHOO.namespace("example.container");

function initLoginFirst() {
	
	// Define various event handlers for Dialog
	var handleYes = function() {
		this.hide();
		return true;
	};
	var handleNo = function() {
		this.hide();
		return false;
	};

	// Instantiate the Dialog
	YAHOO.example.container.loginfirstdialog = new YAHOO.widget.SimpleDialog("loginfirstdialog", 
																			 { width: "300px",
																			   fixedcenter: true,
																			   visible: false,
																			   draggable: false,
																			   close: false,
																			   text: loginfirst,
																			   icon: YAHOO.widget.SimpleDialog.ICON_WARN,
																			   constraintoviewport: true,
																			   buttons: [ { text:"OK", handler:handleYes, isDefault:true }
																						   ]
																			 } );


	// Render the Dialog
	YAHOO.example.container.loginfirstdialog.render("yui_container_login_first");

}

function popupLoginFirst(){
	createLoginFirstDiv();
	var div = document.getElementById("yui_container_login_first");
	initLoginFirst();
	YAHOO.example.container.loginfirstdialog.show();
}


function createLoginFirstDiv() {
	var theBody = document.getElementsByTagName("body")[0];
	var theAlertDiv = document.createElement("div");
	theAlertDiv.setAttribute('id','yui_container_login_first');
	theAlertDiv.setAttribute('class','yui-skin-sam');
	theAlertDiv.className='yui-skin-sam';
	theAlertDiv.style.visibility = 'hidden';
	theBody.appendChild(theAlertDiv);
}

