  
function direction(vDirection,vPop){
	var vDestination = vDirection;
	var vToday = new Date();
	var vTag = vToday.getFullYear()*1e10+(vToday.getMonth()+1)*1e8+vToday.getDate()*1e6;
	vTag = vTag+vToday.getHours()*1e4+vToday.getMinutes()*1e2+vToday.getSeconds();

  if(!vPop){
    vPop = "_self";
    vWindow = "resizable=yes";
    }
  else{
    var tPop = vPop.split('-');
    vPop = tPop[0];
    vWindow = "top=100, left=100";
    vWindow += ", toolbar=no, location=no, directories=no, status=no, menubar=no";
    vWindow += ", scrollbars=yes, resizable=yes";
    vWindow += ", width=" + tPop[1] + ", height=" + tPop[2] + "";
    }

	if(vId.substr(0,1) == "$"){
	 vId = "0.0.0.0";
	 }
	if(vSession.substr(0,1) == "$"){
		if(vIp.substr(0,1) == "$"){
		  vIp = "0.0.0.0";
      }
		vSession = vTag+"-"+vIp;
		if(document.getElementsByName('download-form')){
      }
		}

	vDirection = "http://www.solution-as-a-service.com/cgi-bin/direction";
	vDirection = vDirection + "?sessionid=" + vSession;
	vDirection = vDirection + "&destination=" + vDestination;
	vDirection = vDirection + "&origine=" + vOrigine;
	vDirection = vDirection + "&id=" + vId;
	vDirection = vDirection + "&tag=" + vTag;
	window.open(vDirection,vPop,vWindow);
	}

function sondage(vName,vLeft,vTop,vTarget,vQuestions){
  vTabSize = 150;
  vDivSize = vTabSize + 26;
  if(!vName){vName = "Sondage du mois";}
  if(!vTarget){vTarget = "_self";}
  var tSchema = new Array();
  if(!vQuestions){vQuestions=1;}
  tSchema = Array(vQuestions,3,2,3);
  var tQuestion = new Array();
  tQuestion[0] = "Comment trouvez-vous ce système de sondage ?";
  tQuestion[1] = "Excellent";
  tQuestion[2] = "Correct";
  tQuestion[3] = "Mauvais";
  tQuestion[4] = "Pensez-vous le réutiliser ?";
  tQuestion[5] = "Oui, absolument, bien sûr c'est évident";
  tQuestion[6] = "Non, pas du tout, rien à faire ...";
  tQuestion[7] = "Quelle serait la priorité pour l'améliorer ?";
  tQuestion[8] = "Revoir le design";
  tQuestion[9] = "Obtenir la réponse dans le même cadre";
  tQuestion[10] = "Utiliser un système existant";
  
  document.writeln('<div align=center id=sondage name=sondage border=0 style="position: absolute; left: '+vLeft+'px; top: '+vTop+'px; height: ?px; width: '+vDivSize+'px; overflow: auto; background-color: #FFFFFF;">');
  document.writeln('<form name=sondage target="'+ vTarget +'" action="http://www.solution-as-a-service.com/cgi-bin/selon-vous">');
  document.writeln('<table width="'+vTabSize+'" cellpadding=3 cellspacing=0 border=0 background="../images/sondage-line.bmp">');
  document.writeln('<tr><td  height="18" valign="bottom" background="../images/sondage-header.bmp"><center><font style="font-size: 12px;" title="'+vName+'"><b>'+vName+'</b></font></center></td></tr>');
  document.writeln('<tr><td><hr width=100>');
//  document.writeln('<tr><td>');
  q = 0;
  for(i=1;i<=tSchema[0];i++){
    vQuestion = "Question"+i.toString()+"test";
//    document.writeln('<tr><td><center><font style="font-size: 11px;" title="Question '+ i +'">' + tQuestion[q] + '</font></center></td></tr>');
    document.writeln('<center><font style="font-size: 11px;" title="Question '+i+'">' + tQuestion[q] + '</font></center>');
    k=1;
    for(j=q+1;j<=q+tSchema[i];j++){
      document.writeln('<p align="left" title="' + tQuestion[j] + '" style="margin: 0px; font-size: 11px; text-indent: -20px; margin-left: 20px"><input type=radio name="Q'+i+'" value="' + k + '">' + tQuestion[j] + '</p>');
      k++;
      }
//    document.writeln('</td></tr>');
    if(i<=tSchema[0]){
//      document.writeln('<tr><td><hr width=100></td></tr>');
      document.writeln('<hr width=100>');
      }
    q = (q + tSchema[i] + 1);
    }
  document.writeln('</td></tr>');
  //document.writeln('<tr><td height=18><center><a href="javascript:sondage.submit()" target="_blank"><!--<img src="../images/sondage-vote.gif" border=0>--><font style="font-size: 12px;" title="Soumettre votre vote"><b>Voter</b></font></a></center></td></tr>');
  document.writeln('<tr><td valign=top height="18" background="../images/sondage-footer.bmp"><center><a href="javascript:document.sondage.submit()" onMouseover="status=\'Soumettre votre vote\';return true;" style="font-size: 12px;" title="Soumettre votre vote"><b>Voter</b></a></center></td></tr></table>');
  document.writeln('</form>');
  document.writeln('</div>');
  }
  

