var compte = new Popup();
confirm_added = false;

function initFormCompte(action)
{
	if(confirm_added == false)
	{
		if(action == 'inscription')
		{
													
			compte.addURL("/moncompte/_template/inscription.php?inscription=1");
			compte.addURL("/moncompte/_template/confirmation.php?inscription=1");
					}
		else{
			compte.addURL("/moncompte/_template/inscription.php");
			compte.addURL("/moncompte/_template/confirmation.php");		
		}
		
		confir_added = true;
	}
	else{	
		if(action == 'inscription')
		{
			compte.updateURL(0, "/moncompte/_template/inscription.php?inscription=1");
			compte.updateURL(1, "/moncompte/_template/confirmation.php?inscription=1");
		}
		else if (action == 'modif')
		{
			compte.updateURL(1, "/moncompte/_template/inscription.php");
			compte.updateURL(1, "/moncompte/_template/confirmation.php");		
		}
	}
	
	compte.show();
}
function appelMdpOublie(action)
{	
	if(action == "show")
	{
		mdpoublie = new Popup();
		
		mdpoublie.addURL("/moncompte/_template/mdp_oublie.php");
		mdpoublie.addURL("/moncompte/_template/mdp_confirm.php");
		
		mdpoublie.show();
	}
	else if(action == "hide")
	{
		mdpoublie.hide();
	}	
}

function appelConnectForm(action)
{
	if(action == "show")
	{	
		connect_form = new Popup();
		connect_form.addURL("/moncompte/_template/login.php?login=1");
		connect_form.show();
	}
	else if(action == "hide")
	{
		connect_form.hide();
	}
}

function appelCompte(show)
{
	if(show != "null" && show != "undefined" && show != "")
		compte.show();
}

function expandFlash(){
	var opener = document.getElementById('flash');
	hs.htmlExpand(opener, { contentId: 'pmpup-html_flash' } );
}
