// JavaScript Document
/* ---- Debut Join newsletter ----------------------*/
var browserName=navigator.appName; 
function Joinnewsletter() {
    emailLetter=document.LetterArticles.emailLetter.value
document.getElementById('iframe1').height="388";
document.getElementById('iframe1').width="326";
document.getElementById('iframe1').src="loading.html?rnd="+Math.random();
document.getElementById('iframe1').src="JoinNewsletter.asp?email="+emailLetter;
rSize=parseInt(315/2)
resizing(rSize,'divDrag');


showPage('divDrag');
}
function RequestV(){
	document.getElementById('iframe1').height="388";
document.getElementById('iframe1').width="326";
document.getElementById('iframe1').src="loading.html?rnd="+Math.random();
document.getElementById('iframe1').src="_RequestV.asp?rnd="+Math.random();
rSize=parseInt(315/2)
resizing(rSize,'divDrag');

showPage('divDrag');

	
	}
	
 function setHeight(id,id2) {
	//alert(id);
	 window.document[id2].setAttribute('height', id);
//	  document.getElementById(divid).style.height=id+'px';
	  id=id;
	  id2=id2
	 //setTimeout(pass,1000)

 }
function setVideos(thisUrl){
	alert(thisUrl)
	window.document["flachV"].setVariable('videoUrl',thisUrl)
} 
function pass(){
	
	}	
function resizing(minus,divid){
	 var y = (screen.availHeight)/2;
     var x = (screen.availWidth)/2;
	 try
		{
		     x=x-minus;
			 document.getElementById(divid).style.left=x-50+'px';
			 if (divid=="EditPopUp" || divid=="AddItem" ){
			document.getElementById(divid).style.left=x-120+'px';	 
		    }
			document.getElementById(divid).style.top=y-200+'px';
		}
	  catch(e) {
	  }
}
window.onresize = function(){ 
  resizing();
}
function showPage(divid) {
    MakeGrisMain();
	document.getElementById(divid).style.display='block';
}
var browser=navigator.appName;
var version=navigator.appVersion;
var index=version.lastIndexOf("Safari");

function MakeGrisMain() {
	if (browser=="Microsoft Internet Explorer")  {
		document.getElementById('wrapper').style.filter='progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=58)';
		//document.getElementById('footer').style.filter='progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=58)';
	}
    if (browser=="Netscape") {
	    if (index != - 1) {
			document.getElementById('wrapper').style.opacity =0.58;
			 
		}
		else {
			document.getElementById('wrapper').style.MozOpacity=0.58	;
			 
		}
	}
}
function HidePage(divid) {
	document.getElementById(divid).style.display= 'none';
	RemoveGrisMain();
/*	for (i=0; i<document.all.length; i++) {
    	document.all(i).unselectable = "off";
  	}
*/}
function RemoveGrisMain() {
	if (browser=="Netscape") {
		if (index != - 1){
			document.getElementById('wrapper').style.opacity =1;
			}
		else{
			document.getElementById('wrapper').style.MozOpacity=1	;   //this line remove the background 	
			}  //this line remove the background 	
	}
	
	if (browser=="Microsoft Internet Explorer") {
		document.getElementById('wrapper').style.filter='progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=100)';   //this line remove the background 	
		//document.getElementById('footer').style.filter='progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=100)';   //this line remove the background 	
	}
}
/* ---- Fin Join newsletter ----------------------*/
function ShowPreviousPgm(){
document.getElementById('PicPreviousPgm').src='images/downFleche.gif';
document.getElementById('PreviousPgm').style.display='block';
}

function ShowFutureProjects(){
document.getElementById('PicFutureProjects').src='images/downFleche.gif';
document.getElementById('FutureProjects').style.display='block';
}
function PassDate(titleAbout){
	window.document["topRightCalender"].SetVariable("title",titleAbout);
}

function NextDate(){
aideValeur=document.getElementById('Nextcal').value;
Update(aideValeur);
 
}
function PreviousDate(){
aideValeur=document.getElementById('previouscal').value;
Update(aideValeur);
}
function Update(id) {
    contentObj=document.getElementById('CalanderId');
	getAjaxFile('calendarexample.asp?date='+id+'&rnd='+Math.random());
}

