// JavaScript Document
function popUp(strURL,strType,strHeight,strWidth) {
	var strOptions="";
	if (strType=="console")
		strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth;
	if (strType=="fixed")
		strOptions="status,height="+strHeight+",width="+strWidth;
	if (strType=="elastic")
		strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth+",left=0,top=0";
	window.open(strURL, '', strOptions);
}

function SwitchDiv(ParamDiv){
	EtatDisplay = document.getElementById(ParamDiv).style.display;
	if(EtatDisplay=="none" || EtatDisplay==null || EtatDisplay==""){
		document.getElementById(ParamDiv).style.display = "block";
	}else{
		document.getElementById(ParamDiv).style.display = "none";
	}
}
function ajt_contact(){
	id_societe=document.getElementById('id_societe').value;
	nom_ajt=document.getElementById('nom_ct').value;
	prenom_ajt=document.getElementById('prenom_ct').value;
	fonction_ajt=document.getElementById('fonction_ct').value;
	telephone_ajt=document.getElementById('telephone_ct').value;
	portable_ajt=document.getElementById('portable_ct').value;	
	email_ajt=document.getElementById('email_ct').value;
	sendData('id_societe='+id_societe+'&nom='+nom_ajt+'&prenom='+prenom_ajt+'&fonction='+fonction_ajt+'&telephone='+telephone_ajt+'&portable='+portable_ajt+'&email='+email_ajt, '../inc/ajax_ajt_contact.php', 'POST','aff_contact')		
}

function ajt_suivi(){
	id_societe=document.getElementById('id_societe').value;	
	id_type_tache=document.getElementById('id_type_tache').value;
	date_fin=document.getElementById('date_fin').value;	
	suivi=document.getElementById('suivi').value;
	sendData('id_societe='+id_societe+'&suivi='+suivi+'&type_tache='+id_type_tache+'&date_fin='+date_fin, '../inc/ajax_ajt_suivi.php', 'POST','aff_suivi')
}
function twAller(_url,_cadre,_target) {
if(_url=="nosite"){
alert("Indisponible");
return false;
}
if (_cadre) {
parent._cadre.location.href = _url;
} else if (_target) {
_target = window.open(_url,_target);
} else {
window.location.href = _url;
}
}

function afficher_suivi(){
	id_societe=document.getElementById('id_societe').value;	
	id_user=document.getElementById('id_user').value;
	date_suivi=document.getElementById('date_suivi').value;	
	sendData('id_societe='+id_societe+'&id_user='+id_user+'&date_suivi='+date_suivi, '../inc/ajax_afficher_suivi.php', 'POST','to_do_list')
}
