<!--
function checkPays (selectPays){
// si l'utilisateur a selectionné '------------'
if (selectPays.options[selectPays.selectedIndex].value==(-1)){
	selectPays.selectedIndex= -2;
	}
}

function openWindow(refURL) {
	var URL = new String();
	URL = "/fr/outside.asp?refURL=" + refURL
	popupWin = window.open(URL, 'remote', 'scrollbars,resizable,width=640,height=450,top=30')
}

function logged_out() { alert('Veuillez terminer votre inscription SVP.'); }
function ordering() { alert('Désolé, vous ne pouvez interrompre votre commande maintenant.'); }
 

function show( ref ){
	window.open("http://search.hitechpros.com/profile/show_profile.asp?ref=" + ref,"w"+ref,"directories=0,menubar=0,navbar=0,scrollbars=1,location=0,status=0,resizable=1,width=640,height=350,screenX=0,left=0,screenY=0,top=0");
}

function profile_demo( ref ){
	window.open("http://search.hitechpros.com/profile/show_profile.asp?demo=1&ref=" + ref,"w"+ref,"directories=0,menubar=0,navbar=0,scrollbars=1,location=0,status=0,resizable=1,width=640,height=350,screenX=0,left=0,screenY=0,top=0");
}

function help( who,url,myWidth, myHeight ){
	window.open("/fr/"+who+"/help.asp?topic="+url,"","directories=0,menubar=0,navbar=0,scrollbars=0,location=0,status=0,resizable=1,width="+myWidth+",height="+myHeight+",screenX=0,left=0,screenY=0,top=0");
}

function openChild(url,myWidth, myHeight){
	window.open(url,"","directories=0,menubar=0,navbar=0,scrollbars=1,location=0,status=0,resizable=0,width="+myWidth+",height="+myHeight);
}

function sample( who,url,myWidth, myHeight ){
	window.open("/fr/"+who+"/sample.asp?topic="+url,"","directories=0,menubar=0,navbar=0,scrollbars=0,location=0,status=0,resizable=1,width="+myWidth+",height="+myHeight+",screenX=0,left=0,screenY=0,top=0");
}


function validateForm() { //v2.0
  var i,objStr,field,theCheck,atPos,theNum,colonPos,min,max,errors='', field2, myIndex;
  for (i=0; i<(validateForm.arguments.length-2); i+=3) {
    objStr = validateForm.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) || (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
	      objStr = 'document'+objStr.substring(objStr.substring(0,objStr.lastIndexOf('.')).lastIndexOf('.'),objStr.length);  //fix layer ref if not supp
    field = eval(objStr);
    field.name = (field.name)?field.name:objStr;
    theCheck = validateForm.arguments[i+2];
	if (theCheck == 'L') // List Box
	{		
		myIndex = field.selectedIndex;
		if ( field.options[myIndex].value < 0 )
			errors = '- ' + field.name.toUpperCase() + ': choisissez une valeur SVP.\n';
	}
				
    if (field.value) 
	{ 
		if (theCheck == 'N') // Number
		{
			myNumber = parseInt(field.value,10);
			if(isNaN(myNumber))
				errors = '- ' + field.name.toUpperCase() + ': N\'est pas un nombre.\n';
		}
	
		if (theCheck == 'MM') // month
		{
			myMonth = parseInt(field.value,10);
			if (myMonth < 1 || myMonth > 12)
				errors = '- ' + field.name.toUpperCase() + ': Mois non valide.\n';
		}
		if (theCheck == 'MM/YYYY') // date
		{
			objStr = validateForm.arguments[(navigator.appName == 'Netscape')?i+1:i];
			field2 = eval(objStr);
			myMonth = parseInt(field2.value,10);
			myYear = parseInt(field.value,10);
			today = new Date();
			currentYear = 1900 + today.getYear( );
			currentMonth = 1 + today.getMonth( );
			if ((myYear == currentYear && myMonth > currentMonth) || myYear > currentYear)
				errors = "- La date doit être inférieure à aujourd'hui.\n";
		}
		
		//IF NOT EMPTY FIELD
	  if (theCheck == 'P')
		{// COMPARE
			objStr = validateForm.arguments[(navigator.appName == 'Netscape')?i+1:i];
			field2 = eval(objStr);
			field2.name = (field2.name)?field2.name:objStr;
			if (field.value != field2.value)
				errors += '- ' + field2.name.toUpperCase() + ' and ' + field.name.toUpperCase() + ' do not match.\n';
	  }
      if (theCheck.indexOf('isEmail') != -1) 
	  { //CHECK EMAIL
        atPos = field.value.indexOf('@');
        if (atPos < 1 || atPos == (field.value.length - 1))
          errors += '- '+field.name.toUpperCase()+' n est pas une adresse valide.\n';
      } 
	  
	  	if (theCheck == 'SZ') // Numeric et > 0
		{
			myNumber = parseInt(field.value,10);
			if (isNaN(myNumber) || myNumber < 1)
			errors = '- ' + field.name.toUpperCase() + ': est inférieur à un.\n';
		}
	}
    else if (theCheck.charAt(0) == 'R') errors += '- '+field.name.toUpperCase()+' est obligatoire.\n';
  }
  if (errors) {
  	errors = errors.replace('_', ' ')
	alert('Les erreurs suivantes sont survenues:\n'+ errors);
	}
  document.returnValue = (errors == '')
}

function Terminate() { 
	var returnValue = (0==0);
	if(document.payment.typePaiment[1].checked){ // Paiment par cheque
			advertise = "Vous allez maintenant passer votre commande.\n";
			advertise += "Le bon de commande vous servira aussi de facture.\n";
			advertise += "Veuillez l'imprimer, le remplir et nous l'envoyer avec votre chèque.\n";
			advertise += "Nous vous enverrons les coordonnées des informaticiens que vous avez sélectionnés dès réception de votre courier.\n";
			advertise += "\nMerci d'avoir choisi HiTechPros.com";
			returnValue = (1==1);
	}
	else{
		validateForm('document.payment.card','document.payment.card','L','document.payment.month','document.payment.month','L','document.payment.year','document.payment.year','L','document.payment.name_on_card','document.payment.name_on_card','R'); 
		if (document.returnValue == (0==0) ){
			advertise = "Vous allez maintenant passer votre commande.\n";
			advertise += "Le bon de commande vous servira aussi de facture.\n";
			advertise += "Veuillez l'imprimer, le remplir et nous le faxer.\n";
			advertise += "Nous vous enverrons les coordonnées des informaticiens que vous avez sélectionnés dès réception de votre fax.\n";
			advertise += "\nMerci d'avoir choisi HiTechPros.com";
			returnValue = (1==1);
		}else
			returnValue = (1==0);
	}
	if(returnValue)
		alert(advertise);
	document.returnValue = returnValue;
  }

function showAd( url, width, height, posX, posY ){
	window.open(url,'Advertising','directories=0,menubar=0,navbar=0,scrollbars=0,location=0,status=0,resizable=0,width=' + width + ',height=' + height + ',screenX=' + posX + ',left=' + posX + ',screenY=' + posY + ',top=' + posY );
}


function screenWidth(){
	var width = 0;
	ver = "";
	bName = navigator.appName;
	bVer = parseInt(navigator.appVersion,10);
	if (bName == "Netscape" && bVer >= 3) ver = "n3"; // Netscape V3 or greater
	if (bName =="Microsoft Internet Explorer" && bVer >= 3) ver= "i3"; // IE V3 or greater 

	if (ver == "i3")              // IE 3.2 or better 
	  width=window.screen.width; 

	if (ver == "n3"){               // Netscape 3.0 or better
	  var toolkit = Packages.java.awt.Toolkit.getDefaultToolkit();
	  var screen_size = toolkit.getScreenSize();
	  width=screen_size.width;
	}
	return width;
}


function screenHeight(){
	var height = 0;
	ver = "";
	bName = navigator.appName;
	bVer = parseInt(navigator.appVersion,10);
	if (bName == "Netscape" && bVer >= 3) ver = "n3"; // Netscape V3 or greater 
	if (bName =="Microsoft Internet Explorer" && bVer >= 3) ver= "i3"; // IE V3 or greater 

	if (ver == "i3")              // IE 3.2 or better 
	  height=window.screen.height; 

	if (ver == "n3"){               // Netscape 3.0 or better 
	  var toolkit = Packages.java.awt.Toolkit.getDefaultToolkit();
	  var screen_size = toolkit.getScreenSize();
	  height=screen_size.height;
	}
	return height;
}

	function setExpdate(month, day, year){
		var expdate = new Date();

		expdate.setMonth(month);
		expdate.setDate(day);
		expdate.setYear(year);
		
		return expdate;
	}

	
	function setExpdate(days){
		var expdate = new Date();
		var myTime = days * (24 * 60 * 60 * 1000);
		expdate.setTime(expdate.getTime() + myTime);
		return expdate;
	}

	function getCookieVal (offset) {
	  var endstr = document.cookie.indexOf (";", offset);
	  if (endstr == -1)
		endstr = document.cookie.length;
	  return unescape(document.cookie.substring(offset, endstr));
	}

	function getCookie (name) {
	  var arg = name + "=";
	  var alen = arg.length;
	  var clen = document.cookie.length;
	  var i = 0; 
	  while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		  return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
	  }
	  return null;
	}

	function setCookie (name, value) {
	  var argv = setCookie.arguments;
	  var argc = setCookie.arguments.length;
	  var expires = (argc > 2) ? argv[2] : null;
	  var path = (argc > 3) ? argv[3] : null;
	  var domain = (argc > 4) ? argv[4] : null;
	  var secure = (argc > 5) ? argv[5] : false;
	  document.cookie = name + "=" + escape (value) +
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
		((path == null) ? "" : ("; path=" + path)) +
		((domain == null) ? "" : ("; domain=" + domain)) +
		((secure == true) ? "; secure" : "");
	}


	function deleteCookie (name,path,domain) {  
		if (getCookie(name)) {
		    document.cookie = name + "=" +      
			((path) ? "; path=" + path : "") +
		    ((domain) ? "; domain=" + domain : "") +
		    "; expires=Thu, 01-Jan-70 00:00:01 GMT";  
		}
	}
	

	function confirmDelete( url ) {
	if (confirm("AVERTISSEMENT: Une fois que les données sont effacées elles ne peuvent pas être récupérées. Souhaitez-vous continuer ? ")){
			document.location.href = url;
		}
	}


	function cookiesEnabled(){
		if (navigator.cookieEnabled != null){
			return navigator.cookieEnabled;
		}else{
			var expdate = setExpdate(12,1,2010);		
			setCookie('cookiesEnabled', '1', expdate, '/');
			var strCookie = String((getCookie('cookiesEnabled')==null?'0':getCookie('cookiesEnabled')));
			deleteCookie('cookiesEnabled','/');
			switch(strCookie){
				case '0':
					return false;
					break;

				case '1':
					return true;
					break;

				default:
					return false;
					break;
			}							
		}
		return true;
	}

//-->
