//------------------------------------------------------------------------------------------------
//for all the pages
//------------------------------------------------------------------------------------------------
  texte='      Association Tunisienne des Sciences de Gestion      ';
  lgtexte=texte.length-1;
  postexte=0;
  function msgdefil() {
    if (postexte == texte.length) {
      postexte=0;
    }
    if (postexte<=lgtexte) {
      afftexte = texte.substring((texte.length-(lgtexte-postexte)),texte.length) + texte.substring(0,postexte);
      postexte++;
    }
    window.status = afftexte;
    vitessedefil = setTimeout("msgdefil()", 150);
  }
  function WriteMailTo(empseudo,emname,emdomain,emext) {
    if (empseudo == "") {
      empseudo = emname + "@" + emdomain + "." + emext;
    }
    document.write("<a h" + "ref=" + "mail" + "to:" + emname + "@" + emdomain + "." + emext + ">" + empseudo + "</a>");
  }
  function AddFavo() {
	if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {
	  window.external.AddFavorite("http://www.atsg.org.tn/","ATSG Web Site" );
	}
    else {
	  alert("Cette fonctionnalité n'est proposée que par Internet Explorer 4+");
	}
  }
  function PopupWindow(page,titre,largeur,hauteur,resizeyn) {
    var top=(screen.height-hauteur)/2;
    var left=(screen.width-largeur)/2;
    window.open(page,titre,"top="+top+", left="+left+", width="+largeur+", height="+hauteur+", directories=no, menubar=no, status=no, resizable="+resizeyn+",location=no");
  }

//------------------------------------------------------------------------------------------------
//animation 1
//------------------------------------------------------------------------------------------------
var maxfontsize=40
var textcolor="AAAAAA"
var textfont="Arial"
var message="6èmes Journées Internationales de la Recherche en Sciences de Gestion"
// fin des modifications
var thissize=0
var step=1

function stretch() {	
if (thissize<0) {step=1; thissize=0}		
if (thissize < maxfontsize) {
if(document.all) {
zoomer.innerHTML="<span style='font-family:"+textfont+";font-size:"+thissize+"px;color:"+textcolor+"'>"+message+"</span>"
}
if(document.layers) {
document.zoomer.document.write("<span style='font-family:"+textfont+";font-size:"+thissize+"px;color:"+textcolor+"'>"+message+"</span>")
document.close()
}
step++
thissize=thissize+step
var timer=setTimeout("stretch()",50)
}
else {
clearTimeout(timer)
var intermezzo=setTimeout("shrink()",1000)
}
}

function shrink() {	
if (thissize > -0) {
if(document.all) {
zoomer.innerHTML="<span style='font-family:"+textfont+";font-size:"+thissize+"px;color:"+textcolor+"'>"+message+"</span>"
}
if(document.layers) {
document.zoomer.document.write("<span style='font-family:"+textfont+";font-size:"+thissize+"px;color:"+textcolor+"'>"+message+"</span>")
document.close()
}
if (step >= 2) {step=step-1} else{step=1}
thissize=thissize-step
var timer=setTimeout("shrink()",50)
}
else {
clearTimeout(timer)														
var intermezzo=setTimeout("stretch()",1000)
}
}

function get_htmlctl_value(htmlform, htmlctl)
{
//---------------------------------------------------------------------------------------------------------------
//return the value of a html control in the htmlform
//---------------------------------------------------------------------------------------------------------------

	var htmlctl_name = htmlctl.name.toString();
	
	for (i=0;i<htmlform.length;i++)
	{
		var tempobj=htmlform.elements[i] ;

		if (tempobj.name.toString()== htmlctl_name)
		{
			//alert("htmlctl_name--found--value equals--"+ tempobj.value);
			var htmlctl_value = tempobj.value;
			break ;
		}
	}
	return htmlctl_value;
}

function open_popup_upload(htmlform, htmlctl)
{
//---------------------------------------------------------------------------------------------------------------
//
//---------------------------------------------------------------------------------------------------------------
	if (document.all)
	var xMax = screen.width, yMax = screen.height;
	else
	if (document.layers)
	var xMax = window.outerWidth, yMax = window.outerHeight;
	else
	var xMax = 640, yMax=480;
	var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;
	var url = "upload.php?code_ren=" + get_htmlctl_value(htmlform, htmlctl);
	alert(url);
	window.open(url,'windowbis',
	'width=300,height=150,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
}
