// JavaScript Document

YAHOO.namespace("TGN.container");

function openModalCensus() 
{
	if ( !YAHOO.TGN.container.modalCensus )	
	{ 
		YAHOO.TGN.container.modalCensus = new YAHOO.widget.Panel("censusModal", 
			{ 
				fixedcenter: true, 
				close: true, 
				draggable: false, 
				modal: true, 
				zindex: 4, 
				visible: false 
			});    

		YAHOO.TGN.container.modalCensus.render(document.body);
	}
	YAHOO.TGN.container.modalCensus.show();       
}

function openModalImmigration() 
{
	if ( !YAHOO.TGN.container.modalImmigration )	
	{ 
		YAHOO.TGN.container.modalImmigration = new YAHOO.widget.Panel("immigrationModal", 
			{ 
				fixedcenter: true, 
				close: true, 
				draggable: false, 
				modal: true, 
				zindex: 4, 
				visible: false 
			});    

		YAHOO.TGN.container.modalImmigration.render(document.body);
	}
	YAHOO.TGN.container.modalImmigration.show();       
}

function openModalPassport() 
{
	if ( !YAHOO.TGN.container.modalPassport )	
	{ 
		YAHOO.TGN.container.modalPassport = new YAHOO.widget.Panel("passportModal", 
			{ 
				fixedcenter: true, 
				close: true, 
				draggable: false, 
				modal: true, 
				zindex: 4, 
				visible: false 
			});    

		YAHOO.TGN.container.modalPassport.render(document.body);
	}
	YAHOO.TGN.container.modalPassport.show();       
}

function openModalMilitary() 
{
	if ( !YAHOO.TGN.container.modalMilitary )	
	{ 
		YAHOO.TGN.container.modalMilitary = new YAHOO.widget.Panel("militaryModal", 
			{ 
				fixedcenter: true, 
				close: true, 
				draggable: false, 
				modal: true, 
				zindex: 4, 
				visible: false 
			});    

		YAHOO.TGN.container.modalMilitary.render(document.body);
	}
	YAHOO.TGN.container.modalMilitary.show();       
}

YAHOO.util.Event.on("censusSample", "click", openModalCensus);
YAHOO.util.Event.on("immigrationSample", "click", openModalImmigration);
YAHOO.util.Event.on("passportSample", "click", openModalPassport);
YAHOO.util.Event.on("militarySample", "click", openModalMilitary);