// JavaScript Document
function GetURL(icUrl){
	if(icUrl != "#")window.location.href = icUrl;
	else alert("pas d'url");
}

function ResizeContent(){
	var headerHeight = 196;//document.getElementById("divHeader").offsetHeight;
	var centreHeight = document.getElementById("divContentScroll").offsetHeight;
	var footerHeight = 95;//document.getElementById("divFooter").offsetHeight;
	//-------------------------------------------------------------------------
	var avaibleHeight = 0;
	if (!IE) // all except Explorer
	{
		avaibleHeight = self.innerHeight;
	}
	else if (IE6)
		// Explorer 6 Strict Mode
	{
		avaibleHeight = document.documentElement.offsetHeight-5;
	}
	else if (IE7) // other Explorers
	{
	    avaibleHeight = document.documentElement.offsetHeight;
	}
	//-------------------------------------------------------------------------
	var diffHeight = Number(avaibleHeight-headerHeight-footerHeight-(30*2)-2);//padding-top + padding-bottom
	document.getElementById("divContentScroll").style.height = diffHeight + "px";
	document.getElementById("divContent").style.height = diffHeight + "px";
	//alert(diffHeight);
	document.getElementById("divFooter").style.display = "block";
	//-------------------------------------------------------------------------
    if(document.getElementById("IFramePage")){
        document.getElementById("IFramePage").height = diffHeight-30;
    }
    //-------------------------------------------------------------------------
}

function PrintOpenerContent(){
    document.getElementById("divContentToPrint").innerHTML = window.opener.document.getElementById("divContentScroll").innerHTML;
    window.print();
    window.close();
}

myWindow = null;
function Popup(icURL, icWIdth, icHeight, ilResisable, icWindowName){
	myWindow = window.open (icURL, icWindowName, "status=0,toolbar=0,menubar=0,location=0,resizable="+ ilResisable +",scrollbars=1,fullscreen=0,directories=0,top=20,left=" + ((screen.availWidth - icWIdth) / 2) + ",height=" + icHeight + ",width=" + icWIdth);
}

var NavMenu;
var SousNavMenu;
function DoLayout(){
  NavMenu = document.getElementById("NavMenu");
  SousNavMenu = document.getElementById("SousNavMenu");
  //ResizeContent();
}

//window.onresize=ResizeContent;
//window.onchange=ResizeContent;


function ActiveVideoPlayer(cUrl, cBg, boolLoop){
	var so = new SWFObject("/Ext/Layouts/Common.Layout15/ACCA/images/Videos/Video_player.swf", "VideoPlayer", "450", "300", "9.0.28", "#FFFFFF", "false");
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	so.addParam("menu", "false");
	so.addParam("scale", "showall");
	so.addVariable('videoFile',"/Ext/Layouts/Common.Layout15/ACCA/images/Videos/" + cUrl);
	so.addVariable('videoLoop', boolLoop);
	so.addVariable('skin',"/Ext/Layouts/Common.Layout15/ACCA/images/Videos/SkinUnderAllNoCaption.swf");
	so.addVariable('skinColor',cBg);
	so.write('player');	
}

function ActiveEmailButton(cUrl, cTxt, cFormat, nPaddingTop, idDivToWrite){
	var so = new SWFObject("/Ext/Layouts/Common.Layout15/ACCA/images/email_click.swf", "EmailBtn" + cUrl, "100", "17", "9.0.28", "#FFFFFF", "false");
	so.addParam("allowscriptaccess","always");
	so.addParam("allowfullscreen","true");
	so.addParam("menu", "false");
	so.addParam("scale", "noscale");
	so.addParam("salign", "BL");
	so.addVariable("txtValue", cTxt);
	so.addVariable("urlClick",cUrl);
	so.addVariable("txtFormat",cFormat);
	var paddingValue = (IE)?(nPaddingTop):(nPaddingTop + 2);
	so.addVariable("paddingTop",paddingValue);
	so.write(idDivToWrite);	
}
function SetLogin(){
    //alert(document.getElementById("DefaultForm").action);
    FillLogin(document.getElementById("txtEmail").value, document.getElementById("txtPassword").value);
    document.getElementById("DefaultForm").action = "default.aspx?navid=Attestation";
}
