
<!-- FIT START - Template: RCSfile: javascripts.vat, Source: /sourceroot/staticfiles/templates/modules/javascripts.vat, - Javascripts Libraries API - START FIT -->

 
// <![CDATA[ 

      var vn_siteUrl = "http://www.vala-bleu.com/";
      var vs_siteUrl = "https://secure.vala-bleu.com/WHS/";
      var va_siteUrl = "https://secure.vala-bleu.com/accounts/";
      var ve_siteUrl = "https://secure.vala-bleu.com/WES/";
      var vs_sreuse = "2c35ebd9-d43f-43ac-8dc2-9942fe7eb6ab";
      var vs_currency = "EUR";
      var vs_language = "fr";

      var httpRequestRGet = false;
		
	  function sendRequestRGet(url, parameters, mimetype) {
		
		httpRequestRGet = false;
	
			
		if (window.XMLHttpRequest) { // Safari, Mozilla, Opera,...
		   httpRequestRGet = new XMLHttpRequest();
		   if (httpRequestRGet.overrideMimeType) {
			   if (mimetype == 'html') {
				   httpRequestRGet.overrideMimeType('text/html');
			   } else {
				   httpRequestRGet.overrideMimeType('text/xml');
			   }
		   }
		} else if (window.ActiveXObject) { // IE
		   try {
			  httpRequestRGet = new ActiveXObject('Msxml2.XMLHTTP');
		   } catch (e) {
			  try {
				 httpRequestRGet = new ActiveXObject('Microsoft.XMLHTTP');
			  } catch (e) {
			         httpRequestRGet = false;
			  }
		   }
		}
		if (!httpRequestRGet) {
		   alert('Cannot create XMLHTTP instance');
		   return false;
		}
		
		httpRequestRGet.onreadystatechange = onResponseRGet;
httpRequestRGet.open('GET', url + parameters, true);httpRequestRGet.send(null); 

		   showNotify('Traitement en cours...');
		   //document.getElementById('domainNameSearchResult').innerHTML = '<div class="loading">Traitement en cours...<br/><img src="http://www.vala-bleu.com/library/element/2.0/global/etc/loader.gif" alt="Traitement en cours..."/></div>';
		   document.getElementById('bloading').style.display = 'block';
		  }

		  function onResponseRGet() {
			if (httpRequestRGet.readyState == 4) {
			   if (httpRequestRGet.status == 200) {
			          //historyStorage.put(RGet, request.responseText);
				  var result = httpRequestRGet.responseText;
				  document.getElementById('domainNameSearchResult').innerHTML = result;
				  hideNotify();
				  document.getElementById('bloading').style.display = 'none'; 
			   } else {
				  alert('Aie aie aie, Il y avait un problème avec votre requête, veuillez réessayer ultérieurement.');
				  //top.location='http://france.vala-bleu.com/errors/index.html';
				 // history.go(0)
				  return false;
			   }
			}  
		  }

					
      var httpRequestGet = false;
		
	  function sendRequestGet(url, parameters, mimetype) {
		
		httpRequestGet = false;
	
			
		if (window.XMLHttpRequest) { // Safari, Mozilla, Opera,...
		   httpRequestGet = new XMLHttpRequest();
		   if (httpRequestGet.overrideMimeType) {
			   if (mimetype == 'html') {
				   httpRequestGet.overrideMimeType('text/html');
			   } else {
				   httpRequestGet.overrideMimeType('text/xml');
			   }
		   }
		} else if (window.ActiveXObject) { // IE
		   try {
			  httpRequestGet = new ActiveXObject('Msxml2.XMLHTTP');
		   } catch (e) {
			  try {
				 httpRequestGet = new ActiveXObject('Microsoft.XMLHTTP');
			  } catch (e) {
			         httpRequestGet = false;
			  }
		   }
		}
		if (!httpRequestGet) {
		   alert('Cannot create XMLHTTP instance');
		   return false;
		}
		
		httpRequestGet.onreadystatechange = onResponseGet;
httpRequestGet.open('GET', url + parameters, true);httpRequestGet.send(null); 

		   showNotify('Traitement en cours...');
		   //document.getElementById('ContainerServiceLeft').innerHTML = '<div class="loading">Traitement en cours...<br/><img src="http://www.vala-bleu.com/library/element/2.0/global/etc/loader.gif" alt="Traitement en cours..."/></div>';
		   document.getElementById('bloading').style.display = 'block';
		  }

		  function onResponseGet() {
			if (httpRequestGet.readyState == 4) {
			   if (httpRequestGet.status == 200) {
			          //historyStorage.put(Get, request.responseText);
				  var result = httpRequestGet.responseText;
				  document.getElementById('ContainerServiceLeft').innerHTML = result;
				  hideNotify();
				  document.getElementById('bloading').style.display = 'none'; 
			   } else {
				  alert('Aie aie aie, Il y avait un problème avec votre requête, veuillez réessayer ultérieurement.');
				  //top.location='http://france.vala-bleu.com/errors/index.html';
				 // history.go(0)
				  return false;
			   }
			}  
		  }

					
      var httpRequest_Get = false;

	  function sendRRequest_Get(url, parameters, mimetype) {

		httpRequest_Get = false;


		if (window.XMLHttpRequest) { // Safari, Mozilla, Opera,...
		   httpRequest_Get = new XMLHttpRequest();
		   if (httpRequest_Get.overrideMimeType) {
			   if (mimetype == 'html') {
				   httpRequest_Get.overrideMimeType('text/html');
			   } else {
				   httpRequest_Get.overrideMimeType('text/xml');
			   }
		   }
		} else if (window.ActiveXObject) { // IE
		   try {
			  httpRequest_Get = new ActiveXObject('Msxml2.XMLHTTP');
		   } catch (e) {
			  try {
				 httpRequest_Get = new ActiveXObject('Microsoft.XMLHTTP');
			  } catch (e) {
			         httpRequest_Get = false;
			  }
		   }
		}
		if (!httpRequest_Get) {
		   alert('Cannot create XMLHTTP instance');
		   return false;
		}

		httpRequest_Get.onreadystatechange = onResponse_Get;
httpRequest_Get.open('GET', url + parameters, true);httpRequest_Get.send(null); 

		   showNotify('Traitement en cours...');
		   //document.getElementById('ContainerServiceLeft').innerHTML = '<div class="loading">Traitement en cours...<br/><img src="http://www.vala-bleu.com/library/element/2.0/global/etc/loader.gif" alt="Traitement en cours..."/></div>';
		   document.getElementById('bloading').style.display = 'block';
		  }

		  function onResponse_Get() {
			if (httpRequest_Get.readyState == 4) {
			   if (httpRequest_Get.status == 200) {
			          //historyStorage.put(Get, request.responseText);
				  var result = httpRequest_Get.responseText;
				//  document.getElementById('ContainerServiceLeft').innerHTML = result;
                                  top.location='https://secure.vala-bleu.com/account/mycart';
				  hideNotify();
				  document.getElementById('bloading').style.display = 'none';
			   } else {
				  alert('Aie aie aie, Il y avait un problème avec votre requête, veuillez réessayer ultérieurement.');
				  //top.location='http://france.vala-bleu.com/errors/index.html';
				 // history.go(0)
				  return false;
			   }
			}
		  }

					
      var httpRequestPost = false;
		
	  function sendRequestPost(url, parameters, mimetype) {
		
		httpRequestPost = false;
	
			
		if (window.XMLHttpRequest) { // Safari, Mozilla, Opera,...
		   httpRequestPost = new XMLHttpRequest();
		   if (httpRequestPost.overrideMimeType) {
			   if (mimetype == 'html') {
				   httpRequestPost.overrideMimeType('text/html');
			   } else {
				   httpRequestPost.overrideMimeType('text/xml');
			   }
		   }
		} else if (window.ActiveXObject) { // IE
		   try {
			  httpRequestPost = new ActiveXObject('Msxml2.XMLHTTP');
		   } catch (e) {
			  try {
				 httpRequestPost = new ActiveXObject('Microsoft.XMLHTTP');
			  } catch (e) {
			         httpRequestPost = false;
			  }
		   }
		}
		if (!httpRequestPost) {
		   alert('Cannot create XMLHTTP instance');
		   return false;
		}
		
		httpRequestPost.onreadystatechange = onResponsePost;
httpRequestPost.open('POST', url, true);
httpRequestPost.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');

			httpRequestPost.setRequestHeader('Content-length', parameters.length);

		        httpRequestPost.setRequestHeader('Connection', 'close');
httpRequestPost.send(parameters); 

		   showNotify('Traitement en cours...');
		   //document.getElementById('ContainerServiceLeft').innerHTML = '<div class="loading">Traitement en cours...<br/><img src="http://www.vala-bleu.com/library/element/2.0/global/etc/loader.gif" alt="Traitement en cours..."/></div>';
		   document.getElementById('bloading').style.display = 'block';
		  }

		  function onResponsePost() {
			if (httpRequestPost.readyState == 4) {
			   if (httpRequestPost.status == 200) {
			          //historyStorage.put(Post, request.responseText);
				  var result = httpRequestPost.responseText;
				  document.getElementById('ContainerServiceLeft').innerHTML = result;
				  hideNotify();
				  document.getElementById('bloading').style.display = 'none'; 
			   } else {
				  alert('Aie aie aie, Il y avait un problème avec votre requête, veuillez réessayer ultérieurement.');
				  //top.location='http://france.vala-bleu.com/errors/index.html';
				 // history.go(0)
				  return false;
			   }
			}  
		  }

					
      /*
      * Request Domain Name Search
      */
      function ProcessRequestStep_SearchDomain() {
      
        var getStr = "View_DomainNameSearch-Result.process?";
       // getStr += "__sreuse=" + vs_sreuse;
        getStr += "sAction=" + document.domainNameSearch.StepAction.value;
	getStr += "&flowName=" + document.domainNameSearch.flowName.value;
        getStr += "&flowid=" + document.domainNameSearch.flowid.value;
	getStr += "&selectedProduct=" + document.domainNameSearch.selectedProduct.value;
        getStr += "&domainName=" + document.domainNameSearch.domainName.value;
        getStr += "&TLDs=" + getCheckedValue(document.domainNameSearch.TLDs);

        if(document.domainNameSearch.flowdtd.value != 'false'){
            getStr += "&flowdtd=" + document.domainNameSearch.flowdtd.value;
        }
		
       // pageTracker._trackPageview('purchase-it/' + getStr);
	  sendRequestRGet(vs_siteUrl + 'purchase-it/', getStr, 'html');
      }

      function focus(){ document.domainNameSearch.domainName.focus(); }

      /*
      * Process Request Step 
      */
      function processRequestStep(sAction) {

        var getStr = "View_ProcessRequest-Step.process?";
       // getStr += "__sreuse=" + vs_sreuse;
          getStr += "language=" + vs_language;
	   getStr += "&flow=" + sAction;

        if(sAction == "step-DomainNameMap"){
            getStr += "&flowName=" + document.domainNameMap.flowName.value;
            getStr += "&flowid=" + document.domainNameMap.flowid.value;
            getStr += "&selectedProduct=" + document.domainNameMap.selectedProduct.value;
            if (checkDomain(document.domainNameMap.domainName.value) == true) {
                    getStr += "&domainName=" + document.domainNameMap.domainName.value;
            }else{
                    return false;
            }
        }
	
        if(sAction == "step-DomainNameSearch"){
            getStr += "&flowName=" + document.domainNameSearch.flowName.value;
	    getStr += "&flowid=" + document.domainNameSearch.flowid.value;
	    getStr += "&selectedProduct=" + document.domainNameSearch.selectedProduct.value;
            getStr += "&domainName=" + getCheckedValue(document.DomainNameSearchResult.TLDs);
            if(document.DomainNameSearchResult.flowdtd.value != 'false'){
                getStr += "&flowdtd=" + document.DomainNameSearchResult.flowdtd.value;
            }
        }

        if(sAction == "step-DomainTransfer"){
              getStr += "&authcode=" + document.DomainTransfer.authcode.value;           
              getStr += "&co=" + document.DomainTransfer.co.checked;
        }

        if(sAction == "step-AddPrivateRegistration"){
              getStr += "&prireg=" + document.AddPrivateRegistration.prireg.checked;
        }

        if(sAction == "step-AddOption"){
            var ROSOption = getCheckedValue(document.AddOption.ROS);
            var WBSOption = getCheckedValue(document.AddOption.WBS);
            var EMSOption = getCheckedValue(document.AddOption.EMS);
            var SVDOption = getCheckedValue(document.AddOption.SVD);

            if(ROSOption != 'false'){
                getStr += "&ROSOption=" + ROSOption;
            }

            if(WBSOption != 'false'){
                getStr += "&WBSOption=" + WBSOption;
            }

            if(EMSOption != 'false'){
                getStr += "&EMSOption=" + EMSOption;
            }

            if(SVDOption != 'false'){
                getStr += "&SVDOption=" + SVDOption;
            }

            /*alert(getStr);
            return false;*/
        }

        if(sAction == "step-Optionsharedhosting"){
            var HHOOption = getCheckedValue(document.AddOptionsharedhosting.hostpkg);
            getStr += "&selectedProduct=" + HHOOption;
            getStr += "&flowName=" + document.AddOptionsharedhosting.flowName.value;
        }

	if(sAction == "step-DedicatedHosting"){
            getStr += "&selectedProduct=" + document.DedicatedHosting.selectedProduct.value;
			getStr += "&flowName=" + document.DedicatedHosting.flowName.value;
			getStr += "&CO_MT=" + getCheckedValue(document.DedicatedHosting.CO_MT);
			getStr += "&CO_CPU=" + getCheckedValue(document.DedicatedHosting.CO_CPU);
			getStr += "&CO_HD=" + getCheckedValue(document.DedicatedHosting.CO_HD);
			getStr += "&CO_RAM=" + getCheckedValue(document.DedicatedHosting.CO_RAM);
			getStr += "&CO_OS=" + getCheckedValue(document.DedicatedHosting.CO_OS);
			getStr += "&CO_IP=" + getCheckedValue(document.DedicatedHosting.CO_IP);
			getStr += "&CO_BW=" + getCheckedValue(document.DedicatedHosting.CO_BW);
			getStr += "&CO_NC=" + getCheckedValue(document.DedicatedHosting.CO_NC);
			getStr += "&CO_IC=" + getCheckedValue(document.DedicatedHosting.CO_IC);
			getStr += "&CO_BQ=" + getCheckedValue(document.DedicatedHosting.CO_BQ);
			getStr += "&CO_CP=" + getCheckedValue(document.DedicatedHosting.CO_CP);
			getStr += "&CO_DB=" + getCheckedValue(document.DedicatedHosting.CO_DB);
			
        }

        if(sAction == "step-Referencing"){
            getStr += "&selectedProduct=" + document.Referencing.selectedProduct.value;
			getStr += "&flowName=" + document.Referencing.flowName.value;
			getStr += "&CO_DOM=" + document.Referencing.CO_DOM.value;

            if (checkDomain(document.Referencing.CO_DOM.value) == true) {
                    sendRRequest_Get(vs_siteUrl + 'purchase-it/', getStr, 'html');
            }else{
                    return false;
            }
        }
         
         // pageTracker._trackPageview('purchase-it/' + getStr);
        if(sAction != "step-Referencing"){
            sendRequestGet(vs_siteUrl + 'purchase-it/', getStr, 'html');
        }

      }

      function viewShoppingCart() {
        var getStr = "ViewShoppingCart-Info.process?";
            getStr += "language=" + vs_language;
        //getStr += "__sreuse=" + vs_sreuse;
        //pageTracker._trackPageview(getStr);
 
	    sendRequestGet(ve_siteUrl, getStr, 'html');
      }

      function View(Action) {
        var getStr = "";

        getStr += "ViewShoppingCart-Info.process?";
        getStr += "currency=" + vs_currency;        
        getStr += "&language=" + vs_language;   
       // getStr += "__sreuse=" + vs_sreuse;
        //pageTracker._trackPageview(getStr);
	    sendRequestGet(ve_siteUrl, getStr, 'html');
      }

      function rgoTo(Action) {

        var getStr = Action;
        //pageTracker._trackPageview(Action);
	    sendRequestGet(ve_siteUrl, getStr, 'html');
      }

      function gotoa(Action) {

        var getStr = Action;
	    //getStr += "?__sreuse=" + vs_sreuse;
        //pageTracker._trackPageview(Action);
	    sendRequestGet(va_siteUrl, getStr, 'html');
      }

      function myaccount(Action) {
          
        var getStr = Action;
	    //getStr += "?__sreuse=" + vs_sreuse;
	    getStr += "?currency=" + vs_currency;
	    getStr += "&language=" + vs_language;
        //pageTracker._trackPageview(Action);
	    sendRequestGet(va_siteUrl, getStr, 'html');
      }
      
      function agoTo(Action) {
      
        var getStr = Action;
	//getStr += "&__sreuse=" + vs_sreuse;
        //pageTracker._trackPageview(Action);
	    sendRequestGet(va_siteUrl, getStr, 'html');
      }
      
      function vConfirmation(Action) {
        if(fvalidate(document.checkout_confirmation)){
	        var getStr = Action;
	        //pageTracker._trackPageview(Action);
		    sendRequestGet(ve_siteUrl, getStr, 'html');
	    }
      }
      
      function aConfirmation(Action) {
        if(fvalidate(document.checkout_confirmation)){
	        document.checkout_confirmation.submit()
	    }
      }

      function viewContact(Action) {
      
        //if(fvalidate(document.Contact)){
        
            var postUrl = Action;      
	            var postStr =  "action=Contact";
				postStr +=  "&captcha=" + document.Contact.captcha.value;
				postStr +=  "&firstname=" + document.Contact.firstname.value;
				postStr +=  "&lastname=" + document.Contact.lastname.value;
				postStr +=  "&telephone=" + document.Contact.telephone.value;
				postStr +=  "&email=" + document.Contact.email.value;
				postStr +=  "&clientnnumber=" + document.Contact.clientnnumber.value;
				postStr +=  "&domainname=" + document.Contact.domainname.value;
				postStr +=  "&service=" + getCheckedValue(document.Contact.service);
				postStr +=  "&messages=" + document.Contact.messages.value;
             
            // alert(postStr);
            sendRequestPost(postUrl, postStr, 'html');
	    //}
      }
      
      
      function viewLogin(Action) {
        var postUrl = va_siteUrl + Action;      
       // var postStr = "__sreuse=" + vs_sreuse + "&action=login&_email=" + document.Login.Email.value + "&_pass=" + document.Login.Pass.value; 
        var postStr = "action=login&_email=" + document.Login.Email.value + "&_pass=" + document.Login.Pass.value;
        //pageTracker._trackPageview(Action);

	    sendRequestPost(postUrl, postStr, 'html');  
      }
      
      function viewReset(Action) {
        var postUrl = va_siteUrl + Action;      
        //var postStr = "__sreuse=" + vs_sreuse + "&action=reset&_email=" + document.Reset.Email.value; 
        var postStr = "action=reset&_email=" + document.Reset.Email.value; 
        //pageTracker._trackPageview(Action);

	    sendRequestPost(postUrl, postStr, 'html');
      }

      function viewSignup(Action) {
        if(fvalidate(document.Signup)){
            var postUrl = va_siteUrl + Action;      
            //var postStr = "__sreuse=" + vs_sreuse; 
	    var postStr =  "action=signup";
				postStr +=  "&captcha=" + document.Signup.captcha.value;
				postStr +=  "&firstname=" + document.Signup.firstname.value;
				postStr +=  "&lastname=" + document.Signup.lastname.value;
				postStr +=  "&gender=" + document.Signup.gender.value;
				postStr +=  "&dob=" + document.Signup.dob.value;
				postStr +=  "&address=" + document.Signup.address.value;
				postStr +=  "&postcode=" + document.Signup.postcode.value;
				postStr +=  "&city=" + document.Signup.city.value;
				postStr +=  "&country=" + document.Signup.country.value;
				postStr +=  "&telephone=" + document.Signup.telephone.value;
				postStr +=  "&mobile=" + document.Signup.mobile.value;
				postStr +=  "&fax=" + document.Signup.fax.value;
				postStr +=  "&company=" + document.Signup.company.value;
				postStr +=  "&email=" + document.Signup.email.value;
				postStr +=  "&password=" + document.Signup.password.value;
				postStr +=  "&confirmation=" + document.Signup.confirmation.value;
           // pageTracker._trackPageview(Action);
            sendRequestPost(postUrl, postStr, 'html');
	    }
      }

      function viewConfirmation(Action) {

		    var pval = 0;
			for(i=0; i<document.Payment.payment.length; i++)
			{
				if( document.Payment.payment[i].checked == true)
				pval = document.Payment.payment[i].value;
			}

            var postUrl = ve_siteUrl + Action;      
            //var postStr = "__sreuse=" + vs_sreuse; 

		//var pval = getCheckedValue(document.Payment.payment);

	    var postStr =  "action=confirmation";
		postStr +=  "&payment=" + pval;

		if(pval == "cc")
		{      
		    var pccval = 0;
			for(i=0; i<document.Payment.cc.length; i++)
			{
			   if( document.Payment.cc[i].checked == true)
			   pccval = document.Payment.cc[i].value;
			}

		       if((pccval != "0") && (pccval != "cc")){
		           //alert(pccval);
		           postStr +=  "&cc=" + pccval;
		       }else{
		           postStr +=  "&cc_type=" + document.Payment.cc_type.value;
		           postStr +=  "&cc_owner=" + document.Payment.cc_owner.value;
		           postStr +=  "&cc_number=" + document.Payment.cc_number.value;
		           postStr +=  "&cc_expires_month=" + document.Payment.cc_expires_month.value;
		           postStr +=  "&cc_expires_year=" + document.Payment.cc_expires_year.value;
		           postStr +=  "&cc_checkcode=" + document.Payment.cc_checkcode.value;
		       }
		}
           // pageTracker._trackPageview(Action);
            sendRequestPost(postUrl, postStr, 'html');
      }

     function viewProcessEnd(Action, cmd, vpc, vin) {
            
            var postUrl = ve_siteUrl + Action;      
          //  var postStr = "__sreuse=" + vs_sreuse; 
	    var postStr =  "pc=" + vpc;
	        postStr +=  "&in=" + vin;
	        postStr +=  "&cmd=" + cmd;
	        postStr += "&currency=" + vs_currency;
            //pageTracker._trackPageview(Action);
            sendRequestPost(postUrl, postStr, 'html');
      }
       
   function go_ShoppingCart() {
	  var loc = vs_siteUrl+"purchase-it/ViewShoppingCart-Info.process?";
	  //loc += "__sreuse=" + vs_sreuse;
	  document.location.href = loc;
  }
  
   /**
   * MydetailEdit
   */
     function viewMydetailEdit(Action) {

            var postUrl = va_siteUrl + Action;
			var postStr =  "email=" + document.Mydetail.email.value;
				postStr +=  "&firstname=" + document.Mydetail.firstname.value;
				postStr +=  "&lastname=" + document.Mydetail.lastname.value;
				postStr +=  "&gender=" + document.Mydetail.gender.value;
				postStr +=  "&dob=" + document.Mydetail.dob.value;
				postStr +=  "&address=" + document.Mydetail.address.value;
				postStr +=  "&postcode=" + document.Mydetail.postcode.value;
				postStr +=  "&city=" + document.Mydetail.city.value;
				postStr +=  "&country=" + document.Mydetail.country.value;
				postStr +=  "&telephone=" + document.Mydetail.telephone.value;
				postStr +=  "&mobile=" + document.Mydetail.mobile.value;
				postStr +=  "&fax=" + document.Mydetail.fax.value;
				postStr +=  "&company=" + document.Mydetail.company.value;
                sendRequestPost(postUrl, postStr, 'html');
      }

       function viewMyPasswrdEdit(Action) {
            var postUrl = va_siteUrl + Action;
			var postStr =  "currentpassword=" + document.MyPasswrd.currentpassword.value;
				postStr +=  "&newpassword=" + document.MyPasswrd.newpassword.value;
				postStr +=  "&passwordconfirmation=" + document.MyPasswrd.passwordconfirmation.value;
                sendRequestPost(postUrl, postStr, 'html');
      }
	  
	   function viewMyCcEdit(Action) {
            var postUrl = va_siteUrl + Action;
			var postStr =  "cctype=" + document.Mycc.cc_type.value;
				postStr +=  "&ccowner=" + document.Mycc.cc_owner.value;
				postStr +=  "&ccnumber=" + document.Mycc.cc_number.value;
				postStr +=  "&ccexpires_month=" + document.Mycc.cc_expires_month.value;
				postStr +=  "&ccexpires_year=" + document.Mycc.cc_expires_year.value;
				postStr +=  "&cccheckcode=" + document.Mycc.cc_checkcode.value;
                sendRequestPost(postUrl, postStr, 'html');
      }
	  
	  function viewMyCcDelete(Action) {
            var getStr = Action;
                sendRequestGet(va_siteUrl, getStr, 'html');
      }

     function viewDomainEdit(Action) {
         if(fvalidate(document.EditDomain)){
            var postUrl = va_siteUrl + Action;
			var postStr =  "dac=" + document.EditDomain.dac.value;
                                postStr +=  "&action=" + document.EditDomain.action.value;
				postStr +=  "&fname=" + document.EditDomain.fname.value;
				postStr +=  "&lname=" + document.EditDomain.lname.value;
				postStr +=  "&org=" + document.EditDomain.org.value;
				postStr +=  "&address1=" + document.EditDomain.address1.value;
				postStr +=  "&address2=" + document.EditDomain.address2.value;
				postStr +=  "&phone=" + document.EditDomain.phone.value;
				postStr +=  "&city=" + document.EditDomain.city.value;
				postStr +=  "&province=" + document.EditDomain.province.value;
				postStr +=  "&postal=" + document.EditDomain.postal.value;
				postStr +=  "&country=" + document.EditDomain.country.value;
				postStr +=  "&email=" + document.EditDomain.email.value;
                sendRequestPost(postUrl, postStr, 'html');
        }
      }

      function viewDomainDnsEdit(Action) {
         if(fvalidate(document.DNSDomain)){
            var postUrl = va_siteUrl + Action;
            var postStr =  "dac=" + document.DNSDomain.dac.value;
                    postStr +=  "&action=" + document.DNSDomain.action.value;
                    postStr +=  "&dnss1=" + document.DNSDomain.dnss1.value;
                    postStr +=  "&dnss2=" + document.DNSDomain.dnss2.value;
                    if(document.DNSDomain.dnss3.value != false) { postStr +=  "&dnss3=" + document.DNSDomain.dnss3.value;}
                    if(document.DNSDomain.dnss4.value) { postStr +=  "&dnss4=" + document.DNSDomain.dnss4.value;}
                    if(document.DNSDomain.dnss5.value) { postStr +=  "&dnss5=" + document.DNSDomain.dnss5.value;}
                    if(document.DNSDomain.dnss6.value) { postStr +=  "&dnss6=" + document.DNSDomain.dnss6.value;}
                    if(document.DNSDomain.dnss7.value) { postStr +=  "&dnss7=" + document.DNSDomain.dnss7.value;}
                    if(document.DNSDomain.dnss8.value) { postStr +=  "&dnss8=" + document.DNSDomain.dnss8.value;}
                    if(document.DNSDomain.dnss9.value) { postStr +=  "&dnss9=" + document.DNSDomain.dnss9.value;}
                    if(document.DNSDomain.dnss10.value) { postStr +=  "&dnss10=" + document.DNSDomain.dnss10.value;}
                    if(document.DNSDomain.dnss11.value) { postStr +=  "&dnss11=" + document.DNSDomain.dnss11.value;}
                    if(document.DNSDomain.dnss12.value) { postStr +=  "&dnss12=" + document.DNSDomain.dnss12.value;}
                    if(document.DNSDomain.dnss13.value) { postStr +=  "&dnss13=" + document.DNSDomain.dnss13.value;}
            sendRequestPost(postUrl, postStr, 'html');
        }
      }
      
      /**
      * dns
      */
      function viewDomainDnsAEdit(Action) {

        var postUrl = va_siteUrl + Action;
        var dac = document.DNSDomainA.dac.value;
        var postStr = "dac=" + dacA;
            postStr += "&action=" + document.DNSDomainA.action.value;

        if(verifyIP(document.DNSDomainA.Arecordright.value) == 'true'){
            postStr += "&Arecordleft=" + document.DNSDomainA.Arecordleft.value;
            postStr += "&Arecordright=" + document.DNSDomainA.Arecordright.value;

            alert(postStr);
        }

       //sendRequestPost(postUrl, postStr, 'html');
      }

    function viewDomainDnsMXEdit(Action) {

        var postUrl = va_siteUrl + Action;
        var dac = document.DNSDomainMX.dac.value;
        var postStr = "dac=" + dac;
            postStr += "&action=" + document.DNSDomainA.action.value;

            postStr += "&MXrecordleft=" + document.DNSDomainMX.MXrecordleft.value;
            postStr += "&MXrecordint=" + document.DNSDomainMX.MXrecordint.value;
            postStr += "&MXrecordright=" + document.DNSDomainMX.MXrecordright.value;

            alert(postStr);

           //sendRequestPost(postUrl, postStr, 'html');
      }

      function viewDomainDnsCNAMEEdit(Action) {

        var postUrl = va_siteUrl + Action;
        var dac = document.DomainCNAME.dac.value;
        var postStr = "dac=" + dac;
            postStr += "&action=" + document.DomainCNAME.action.value;
           if(document.DomainCNAME.CNAMErecordleft.value) postStr += "&CNAMErecordleft=" + document.DomainCNAME.CNAMErecordleft.value;
           if(document.DomainCNAME.CNAMErecordright.value) postStr += "&CNAMErecordright=" + document.DomainCNAME.CNAMErecordright.value;

           alert(postStr);
           //sendRequestPost(postUrl, postStr, 'html');
      }
      
       function viewTRDomeinEdit(Action) {
            var postUrl = va_siteUrl + Action;
            var postStr = "newcompte=" + document.TRACDomain.newcompte.value;
                postStr += "&action=" + document.TRACDomain.action.value;
            sendRequestPost(postUrl, postStr, 'html');
      }

   /**
   * HelpDeskEdit
   */
   function viewHelpDeskEdit(Action) {
            
       var postUrl = va_siteUrl + Action; 
		
	   var postStr =  "ticketpriority=" + document.HelpDesk.ticketpriority.value;
	       postStr +=  "&ticketcategory=" + document.HelpDesk.ticketcategory.value;
	       postStr +=  "&ticketseverity=" + document.HelpDesk.ticketseverity.value;
		   postStr +=  "&ticketvseverities=" + document.HelpDesk.ticketvseverities.value;
		   postStr +=  "&tickettitre=" + document.HelpDesk.tickettitre.value;
		   postStr +=  "&ticketdescription=" + document.HelpDesk.ticketdescription.value;
           sendRequestPost(postUrl, postStr, 'html');
      }
  /*
  * HelpDeskCommentEdit
  */
   function viewHelpDeskCommentEdit(Action) {       
       var postUrl = va_siteUrl + Action; 	
	   var postStr =  "ticketcomments=" + document.HelpDeskView.comments.value; 
       sendRequestPost(postUrl, postStr, 'html');
      }
	  
	/**/  	       
	function addLoadEvent(func) {
	  var oldonload = window.onload;
		if (typeof window.onload == 'function') {
		  window.onload = function() {
		  oldonload();
		  func();
		}
	  } else {
		window.onload = func;
	  }
	}    

  function testPassword(passwd)
  {
	var description = new Array();
	
	description[0] = "<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=30 bgcolor=#ff0000></td><td height=10 width=120 bgcolor=#dddddd></td></tr></table></td><td class=bold>Trop court</td></tr></table>";
	description[1] = "<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=60 bgcolor=#bb0000></td><td height=10 width=90 bgcolor=#dddddd></td></tr></table></td><td class=bold>Faible</td></tr></table>";	
	description[2] = "<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=90 bgcolor=#ff9900></td><td height=10 width=60 bgcolor=#dddddd></td></tr></table></td><td class=bold>Correct</td></tr></table>";
	description[3] = "<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=120 bgcolor=#00bb00></td><td height=10 width=30 bgcolor=#dddddd></td></tr></table></td><td class=bold>Élevé(e)</td></tr></table>";
	description[4] = "<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=150 bgcolor=#00ee00></td></tr></table></td><td class=bold>Très Élevé</td></tr></table>";
	description[5] = "<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=150 bgcolor=#dddddd></td></tr></table></td><td class=bold></td></tr></table>";
	
	var intScore   = 0
	var strVerdict = 0
	
	// PASSWORD LENGTH
	if (passwd.length==0 || !passwd.length)                         // length 0
	{
		intScore = -1
	}
	else if (passwd.length>0 && passwd.length<5) // length between 1 and 4
	{
		intScore = (intScore+3)
	}
	else if (passwd.length>4 && passwd.length<8) // length between 5 and 7
	{
		intScore = (intScore+6)
	}
	else if (passwd.length>7 && passwd.length<12)// length between 8 and 15
	{
		intScore = (intScore+12)
	}
	else if (passwd.length>11)                    // length 16 or more
	{
		intScore = (intScore+18)
	}
	
	// LETTERS (Not exactly implemented as dictacted above because of my limited understanding of Regex)
	if (passwd.match(/[a-z]/))                              // [verified] at least one lower case letter
	{
		intScore = (intScore+1)
	}
	if (passwd.match(/[A-Z]/))                              // [verified] at least one upper case letter
	{
		intScore = (intScore+5)
	}
	// NUMBERS
	if (passwd.match(/\d+/))                                 // [verified] at least one number
	{
		intScore = (intScore+5)
	}
	if (passwd.match(/(.*[0-9].*[0-9].*[0-9])/))             // [verified] at least three numbers
	{
		intScore = (intScore+5)
	}
	// SPECIAL CHAR
	if (passwd.match(/.[!,@,#,$,%,^,&,*,?,_,~]/))            // [verified] at least one special character
	{
		intScore = (intScore+5)
	}
															 // [verified] at least two special characters
	if (passwd.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/))
	{
		intScore = (intScore+5)
	}
	// COMBOS
	if (passwd.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))        // [verified] both upper and lower case
	{
		intScore = (intScore+2)
	}
	if (passwd.match(/(\d.*\D)|(\D.*\d)/))                    // [FAILED] both letters and numbers, almost works because an additional character is required
	{
		intScore = (intScore+2)
	}
															  // [verified] letters, numbers, and special characters
	if (passwd.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/))
	{
		intScore = (intScore+2)
	}
	if(intScore == -1)
	{
	   strVerdict = description[5];
	}
	else if(intScore > -1 && intScore < 16)
	{
	   strVerdict = description[0];
	}
	else if (intScore > 15 && intScore < 25)
	{
	   strVerdict = description[1];
	}
	else if (intScore > 24 && intScore < 35)
	{
	   strVerdict = description[2];
	}
	else if (intScore > 34 && intScore < 45)
	{
	   strVerdict = description[3];
	}
	else
	{
	   strVerdict = description[4];
	}
	
	document.getElementById("Words").innerHTML= (strVerdict);
  }
  
  //captcha
  function captchanext(){

        if (navigator.appVersion.indexOf("MSIE")!=-1){ 
            document.images("captcha-form").src = (va_siteUrl + 'captcha?r=' + Math.random());
        } else {
            document.getElementById("captcha-form").src = (va_siteUrl + 'captcha?r=' + Math.random());
        }

      document.getElementById('captcha-form').focus();
  }
  
  function captchanexts(){

        if (navigator.appVersion.indexOf("MSIE")!=-1){ 
            document.images("captcha-form").src = (vn_siteUrl + 'captcha?r=' + Math.random());
        } else {
            document.getElementById("captcha-form").src = (vn_siteUrl + 'captcha?r=' + Math.random());
        }

      document.getElementById('captcha-form').focus();
  }

   // return the value of the radio button that is checked
   // return an empty string if none are checked, or
   // there are no radio buttons
   function getCheckedValue(radioObj) {
  	   if(!radioObj)
		   return "";
	   var radioLength = radioObj.length;
	   if(radioLength == undefined)
		   if(radioObj.checked)
			   return radioObj.value;
		   else
			   return "";
	   for(var i = 0; i < radioLength; i++) {
		   if(radioObj[i].checked) {
			   return radioObj[i].value;
		   }
	   }
	   return "";
   }

   // set the radio button with the given value as being checked
   // do nothing if there are no radio buttons
   // if the given value does not exist, all the radio buttons
   // are reset to unchecked
   function setCheckedValue(radioObj, newValue) {
	   if(!radioObj)
	   	   return;
	   var radioLength = radioObj.length;
	   if(radioLength == undefined) {
		   radioObj.checked = (radioObj.value == newValue.toString());
		   return;
	   }
	   for(var i = 0; i < radioLength; i++) {
		   radioObj[i].checked = false;
		   if(radioObj[i].value == newValue.toString()) {
			   radioObj[i].checked = true;
		   }
	   }
   }

  
  //form validate
  function fvalidate(of)
  {
  // Teste si DOM est disponible et s'il y a un élément appelé "required"
      if(!document.getElementById || !document.createTextNode){return;}
      if(!document.getElementById('required')){return;}

  // Définit les messages d'erreur et sépare les champs requis
      var errorID='errormsg';
      var errorClass='input-err'
      /* changements pour la liste de liens */
      var errorMsg='Merci d\'entrer ou de modifier le contenu des champs suivants:';
      /* fin des changements pour la liste de liens */
      var errorImg='http://www.vala-bleu.com/library/element/2.0/global/etc/m/warningp.png';
      var errorAlt='Erreur';
      var errorTitle='Ce champ est erroné !';
      var reqfields=document.getElementById('required').value.split(',');
	  // Declaring required variables
	  var digits = "0123456789";
	  // non-digit characters which are allowed in phone numbers
	  var phoneNumberDelimiters = "()- ";
	  // characters which are allowed in international phone numbers
	  // (a leading + is OK)
	  var validWorldPhoneChars = phoneNumberDelimiters + "+";
	  // Minimum no of digits in an international phone no.
	  var minDigitsInIPhoneNumber = 10;
	  
  // Nettoyage des anciens messages
      // s'il y a un ancien champ errormessage, on le supprime
      if(document.getElementById(errorID))
      {
          var em=document.getElementById(errorID);
          em.parentNode.removeChild(em);
      }
      // supprime les anciennes images et classes des champs requis
      for(var i=0;i<reqfields.length;i++) 
      { 
          var f=document.getElementById(reqfields[i]); 
          if(!f){continue;} 
          if(f.nextSibling && /img/i.test(f.nextSibling.nodeName)) 
          { 
              f.parentNode.removeChild(f.nextSibling); 
          } 
          f.className='input-text'; 
      } 
  // boucle sur les champs requis 
      for(var i=0;i<reqfields.length;i++) 
      { 
  // vérifie que le champs requis est présent 
          var f=document.getElementById(reqfields[i]); 
          if(!f){continue;} 
  // teste si le champ requis est erroné, 
  // en fonction de son type 
          switch(f.type.toLowerCase()) 
          { 
              case 'password':                                      
                    if(f.value=='' && f.id!='confirmation'){cf_adderr(f)}
                    if(f.id=='confirmation' && !cf_isPassConAddr(f.value)){cf_adderr(f)}
				break;
              case 'text': 
                  if(f.value=='' && f.id!='email' && f.id!='dob' && f.id!='telephone'){cf_adderr(f)}							
                   // email est un champ spécial nécessitant une vérification 
                  if(f.id=='email' && !cf_isEmailAddr(f.value)){cf_adderr(f)}
                  if(f.id=='dob' && !cf_isValidDate(f.value)){cf_adderr(f)}
				  if(f.id=='telephone' && !cf_checkInternationalPhone(f.value)){cf_adderr(f)}
              break; 
              case 'textarea': 
                  if(f.value==''){cf_adderr(f)}							
              break; 
              case 'checkbox': 
                  if(!f.checked){cf_adderr(f)}							
              break; 
              case 'select-one': 
                  if(!f.selectedIndex && f.selectedIndex==0){cf_adderr(f)}							
              break;
          }
      }
      return !document.getElementById(errorID);

      /* Méthodes outils */
      function cf_adderr(o)
      {
          // crée l'image, l'ajoute et colorie les champs erronés 
          var errorIndicator= document.createElement('img');
          errorIndicator.alt=errorAlt;
          errorIndicator.src=errorImg;
          errorIndicator.title=errorTitle;
          o.className=errorClass;
          o.parentNode.insertBefore(errorIndicator,o.nextSibling);

          // Vérifie qu'il n'y a pas de message d'erreur 
          if(!document.getElementById(errorID)) 
          {
              // crée "errormessage" et l'insère avant le bouton d'envoi 
              var em=document.createElement('div');
              em.id=errorID;
              var newp=document.createElement('p');
              newp.appendChild(document.createTextNode(errorMsg))
              em.appendChild(newp);
              /* ajout pour la liste des liens */
              var newul=document.createElement('ul');		
              em.appendChild(newul); 
              /* fin d'ajout pour la liste des liens */
              // trouve le div err
              for(var i=0;i<of.getElementsByTagName('input').length;i++) 
              {
                  /*var s*/
                  if(document.getElementById('error')) 
                  {
                      var sb=document.getElementById('error'); 
                      break;
                  }
              }
              if(sb)
              {
                  sb.parentNode.insertBefore(em,sb.nextSibling);
              }
          }
          /* ajout pour la liste des liens */
          var em = document.getElementById(errorID).getElementsByTagName('ul')[0];
          var newli=document.createElement('li');
          var newa=document.createElement('a');
          for(var i=0;i<of.getElementsByTagName('label').length;i++)
          {
              if(of.getElementsByTagName('label')[i].htmlFor==o.id)
              {
                  var txt=of.getElementsByTagName('label')[i].firstChild.nodeValue;
                  break;
              }
          }
          newa.appendChild(document.createTextNode(txt));
          newa.href='#'+f.id;
          newa.onclick=function()
          {
              var loc=this.href.match(/#(\w.+)/)[1];
              document.getElementById(loc).focus();
              return false;
          }
          newli.appendChild(newa);
          em.appendChild(newli);
          /* fin d'ajout pour la liste des liens */
      } 
      function cf_isEmailAddr(str) 
      { 
          return str.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/); 
      } 
      function cf_isPassConAddr(str) 
      { 
          if(document.getElementById("password").value != str){
               return false;
          }else{
              return true;
          }
      }
      function cf_isValidDate(strDate){
         var dteDate;
         var day, month, year;
         var datePat = /^(\d{1,2})(\/)(\d{1,2})(\/)(\d{4})$/;
         var matchArray = strDate.match(datePat);
        
         if (matchArray == null)
         return false;
      
         day = matchArray[1];
         month = matchArray[3];
         year = matchArray[5];
         month--;
      
         dteDate=new Date(year,month,day);
         return ((day==dteDate.getDate()) && (month==dteDate.getMonth()) && (year==dteDate.getFullYear()));
      }	  
	  function isInteger(s)
	  {   var i;
		  for (i = 0; i < s.length; i++)
		  {   
			  // Check that current character is number.
			  var c = s.charAt(i);
			  if (((c < "0") || (c > "9"))) return false;
		  }
		  // All characters are numbers.
		  return true;
	  }
	  function trim(s)
	  {   var i;
		  var returnString = "";
		  // Search through string's characters one by one.
		  // If character is not a whitespace, append to returnString.
		  for (i = 0; i < s.length; i++)
		  {   
			  // Check that current character isn't whitespace.
			  var c = s.charAt(i);
			  if (c != " ") returnString += c;
		  }
		  return returnString;
	  }
	  function stripCharsInBag(s, bag)
	  {   var i;
		  var returnString = "";
		  // Search through string's characters one by one.
		  // If character is not in bag, append to returnString.
		  for (i = 0; i < s.length; i++)
		  {   
			  // Check that current character isn't whitespace.
			  var c = s.charAt(i);
			  if (bag.indexOf(c) == -1) returnString += c;
		  }
		  return returnString;
	  }
	  function cf_checkInternationalPhone(str){
		var bracket=3
		strPhone=trim(str)
		if(strPhone.indexOf("+")>1) return false
		if(strPhone.indexOf("-")!=-1)bracket=bracket+1
		if(strPhone.indexOf("(")!=-1 && strPhone.indexOf("(")>bracket)return false
		var brchr=strPhone.indexOf("(")
		if(strPhone.indexOf("(")!=-1 && strPhone.charAt(brchr+2)!=")")return false
		if(strPhone.indexOf("(")==-1 && strPhone.indexOf(")")!=-1)return false
		s=stripCharsInBag(strPhone,validWorldPhoneChars);
		return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
	  }
  }
  
  function clearText(field){
      if (field.defaultValue == field.value){ 
            field.value = '';
      }else if (field.value == '') {
           field.value = field.defaultValue;
      }
  }
	function checkDomain(nname)
	{
		var arr = new Array(
		'.com','.net','.org','.biz','.coop','.info','.museum','.name',
		'.pro','.edu','.gov','.int','.mil','.ac','.ad','.ae','.af','.ag',
		'.ai','.al','.am','.an','.ao','.aq','.ar','.as','.at','.au','.aw',
		'.az','.ba','.bb','.bd','.be','.bf','.bg','.bh','.bi','.bj','.bm',
		'.bn','.bo','.br','.bs','.bt','.bv','.bw','.by','.bz','.ca','.cc',
		'.cd','.cf','.cg','.ch','.ci','.ck','.cl','.cm','.cn','.co','.cr',
		'.cu','.cv','.cx','.cy','.cz','.de','.dj','.dk','.dm','.do','.dz',
		'.ec','.ee','.eg','.eh','.er','.es','.et','.fi','.fj','.fk','.fm',
		'.fo','.fr','.ga','.gd','.ge','.gf','.gg','.gh','.gi','.gl','.gm',
		'.gn','.gp','.gq','.gr','.gs','.gt','.gu','.gv','.gy','.hk','.hm',
		'.hn','.hr','.ht','.hu','.id','.ie','.il','.im','.in','.io','.iq',
		'.ir','.is','.it','.je','.jm','.jo','.jp','.ke','.kg','.kh','.ki',
		'.km','.kn','.kp','.kr','.kw','.ky','.kz','.la','.lb','.lc','.li',
		'.lk','.lr','.ls','.lt','.lu','.lv','.ly','.ma','.mc','.md','.mg',
		'.mh','.mk','.ml','.mm','.mn','.mo','.mp','.mq','.mr','.ms','.mt',
		'.mu','.mv','.mw','.mx','.my','.mz','.na','.nc','.ne','.nf','.ng',
		'.ni','.nl','.no','.np','.nr','.nu','.nz','.om','.pa','.pe','.pf',
		'.pg','.ph','.pk','.pl','.pm','.pn','.pr','.ps','.pt','.pw','.py',
		'.qa','.re','.ro','.rw','.ru','.sa','.sb','.sc','.sd','.se','.sg',
		'.sh','.si','.sj','.sk','.sl','.sm','.sn','.so','.sr','.st','.sv',
		'.sy','.sz','.tc','.td','.tf','.tg','.th','.tj','.tk','.tm','.tn',
		'.to','.tp','.tr','.tt','.tv','.tw','.tz','.ua','.ug','.uk','.um',
		'.us','.uy','.uz','.va','.vc','.ve','.vg','.vi','.vn','.vu','.ws',
		'.wf','.ye','.yt','.yu','.za','.zm','.zw');
		
		var mai = nname;
		var val = true;
		
		var dot = mai.lastIndexOf(".");
		var dname = mai.substring(0,dot);
		var ext = mai.substring(dot,mai.length);
		//alert(ext);
			
		if(dot>2 && dot<57)
		{
			for(var i=0; i<arr.length; i++)
			{
			  if(ext == arr[i])
			  {
			 	val = true;
				break;
			  }	
			  else
			  {
			 	val = false;
			  }
			}
			if(val == false)
			{
			  	 alert("Le extension "+ext+" n'est pas correcte");
				 return false;
			}
			else
			{
				for(var j=0; j<dname.length; j++)
				{
				  var dh = dname.charAt(j);
				  var hh = dh.charCodeAt(0);
				  if((hh > 47 && hh<59) || (hh > 64 && hh<91) || (hh > 96 && hh<123) || hh==45 || hh==46)
				  {
					 if((j==0 || j==dname.length-1) && hh == 45)	
				  	 {
				 	  	 alert("Le nom de domaine ne peut ni commencer, ni se terminer par un tiret (-)");
					      return false;
				 	 }
				  }
				else	{
				  	 alert(" Les noms de domaines ne peuvent être composés que de caractères alphanumériques (lettres ou chiffres)");
					 return false;
				  }
				}
			}
		}
		else
		{
		 alert("Votre nom de domaine est trop court/long");
		 return false;
		}	
		
		return true;
	}
	
	function rowOverEffect(object) {
	  if (object.className == 'dataTableRow') object.className = 'dataTableRowOver';
	}
	
	function rowOutEffect(object) {
	  if (object.className == 'dataTableRowOver') object.className = 'dataTableRow';
	}
	
    function loginAccount()
	{
	  document.loginAccount.submit();
	}
	
	function loginEmail()
	{
	  document.loginEmail.submit();
	}
	
	function getScrollTop() {
	  if ( document.documentElement.scrollTop )
	    return document.documentElement.scrollTop;
	
	  return document.body.scrollTop;
	}
	
	function scrollHandler() {
	   var e = document.getElementById('rc_notify');
	   e.style.top = getScrollTop();
	}
	
	function showNotify( str ) { 
	  var elem = document.getElementById('rc_notify');
	  elem.style.display = 'block'; 
	  elem.style.visibility = 'visible';
	
	  if ( elem.currentStyle && 
	       elem.currentStyle.position == 'absolute' ) 
	  {
	    elem.style.top = getScrollTop();
	    window.onscroll = scrollHandler;
	  }
	
	  elem.innerHTML = str;
	}
	
	function hideNotify() {
	  var elem = document.getElementById('rc_notify');
	  elem.style.display = 'none';
	  elem.style.visibility = 'hidden';
	  window.onscroll = null;
	}

        function aWhois(domain) {
            if(checkDomain(domain)){
                document.location.href = vn_siteUrl + 'whois/' + domain + '#r';
            }
        }

        function addWhoisEngine(){
          if((typeof window.sidebar=="object")&&
              (typeof window.sidebar.addSearchEngine=="function")){
            window.sidebar.addSearchEngine(vn_siteUrl + 'valableudomainsearch.xml', vn_siteUrl + 'favicon.ico', 'Vala Bleu LTD', 'Web');
          } else {
           try {
            window.external.AddSearchProvider(vn_siteUrl + 'valableudomainsearch.xml');
           } catch (x) {
            if(70==(x.number&0xFFFF)){
              alert("For security reasons, you must use the mouse" +
                     "\n(or the Enter key) to click the Install button.");
            } else {
              alert("Unable to add search provider. " +
                      "[" + (x.number & 0xFFFF) + "]");
            }
            return false;
          }
         }
        }
        /** verifyIP **/
        function verifyIP (IPvalue) {

            errorString = "";
            theName = "";

            var ipPattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
            var ipArray = IPvalue.match(ipPattern);

            if (IPvalue == "0.0.0.0")
            errorString = errorString + IPvalue + ' est une adresse IP spéciale et ne peuvent pas être utilisées ici.';
            else if (IPvalue == "255.255.255.255")
            errorString = errorString + IPvalue + ' est une adresse IP spéciale et ne peuvent pas être utilisées ici.';
            if (ipArray == null)
                errorString = errorString  + IPvalue + ' n\'est pas une adresse IP valide.';
            else {
              for (i = 0; i < 4; i++) {
                  thisSegment = ipArray[i];
                    if (thisSegment > 255) {
                        errorString = errorString + IPvalue + ' n\'est pas une adresse IP valide.';
                        i = 4;
                    }
                    if ((i == 0) && (thisSegment > 255)) {
                        errorString = errorString + IPvalue + ' est une adresse IP spéciale et ne peuvent pas être utilisées ici.';
                        i = 4;
                    }
               }
            }
            extensionLength = 3;
            if (errorString == ""){
                return 'true';
            }else{
                alert (errorString);
                return false;
            }
        }

 // ]]>
   

<!-- FIT END - Template: RCSfile: javascripts.vat, Source: /sourceroot/staticfiles/templates/modules/javascripts.vat, - Javascripts Libraries API - END FIT-->

