// ############################################################
// <SCRIPT>
// Javascript Library for FlexWeb 2
// ID-3 Technologies inc. 2003
// ############################################################

// ============================================================
// PopupWindow
// ============================================================
function gf_PopUpWindow(URL, WindowName, WindowWidth, WindowHeight) {
	PosX = Math.round(screen.availWidth / 2) - (WindowWidth / 2) 
	PosY = Math.round(screen.availHeight / 2) - (WindowHeight / 2) - 20
	
	popupwin = window.open(URL,WindowName,"scrollbars=no,resizable=yes,directories=no,menubar=no,screenx=" + PosX + ",screeny=" + PosY + ",left=" + PosX + ",top=" + PosY + ",status=no,titlebar=yes,toolbar=no,height=" + WindowHeight + ",width=" + WindowWidth )
    popupwin.focus();
    return(popupwin);
}

function gf_PopUpModalWindow(URL,WindowWidth, WindowHeight) {	
	sReturnValue = window.showModalDialog(URL,'',"help:no;scroll:no;resizable:yes;center:yes;status:no;dialogHeight:" + WindowHeight + "px;dialogWidth:" + WindowWidth + "px")
    return(sReturnValue);
}

function gf_PopUpWindowExtra(URL, WindowName, WindowWidth, WindowHeight,sExtraAttributes) {
	PosX = Math.round(screen.availWidth / 2) - (WindowWidth / 2) 
	PosY = Math.round(screen.availHeight / 2) - (WindowHeight / 2) - 20
	
	popupwin = window.open(URL,WindowName,"directories=no,menubar=no,screenx=" + PosX + ",screeny=" + PosY + ",left=" + PosX + ",top=" + PosY + ",status=no,titlebar=yes,toolbar=no,height=" + WindowHeight + ",width=" + WindowWidth + "," + sExtraAttributes)
    popupwin.focus();
    return(popupwin);
}

// ############################################################
// Edition Forms
// ############################################################


function gf_OpenParticipantForm(sID,iSection){
	gf_PopUpWindow("ConcoursParticipant_e.asp?PK=" + sID + "&Section=" + iSection,"ParticipantForm",500,370);
}

function gf_OpenCarnetAdresseAddForm(sPath){
	gf_PopUpWindow(sPath + "mem_carnetadresse_ajout.asp","CarnetAdresseForm",420,320);
}

function gf_OpenCarnetForm(sID){
	gf_PopUpWindow("mem_carnetadresse_e.asp?PK=" + sID ,"CarnetForm",600,400);
}

function gf_OpenCourrielForm(sID){
	gf_PopUpWindow("ListeDistributionBulletin_e.asp?PK=" + sID ,"CarnetForm",600,400);
}

function gf_OpenInscriptionForm(sID){
	gf_PopUpWindow("Inscription_e.asp?PK=" + sID,"InscriptionForm",550,460);
}
function gf_MiniBanForm( ID ) {
	gf_PopUpWindow( "MiniBan_e.asp?PK=" + ID, "MiniBanForm", 400, 255 );
}
function gf_BigBanForm( ID ) {
	gf_PopUpWindow( "BigBan_e.asp?PK=" + ID, "BigBanForm", 550, 255 );
}

