//------------------------------------------------------------------------------    
//  Worldlingo.com IWT Java Scripts
//
//  Copyright (c) 1999-2004 Worldlingo LLC
//------------------------------------------------------------------------------    

// Purpose: Validate the form relating to Worldlingo Translator
function ValidateTranslatorForm(form) {
  // Make sure that a source language has been entered
  if (document.getElementsByName("wl_srclang").length > 0) {
    selIndex = form["wl_srclang"].selectedIndex;
    if (form["wl_srclang"].options[selIndex].value == "none") {
      alert("Please select source language.");
      form["wl_srclang"].focus();
      return;
    }
  }
  // Make sure that a target language has been entered
  selIndex = form["wl_trglang"].selectedIndex;
  if (form["wl_trglang"].options[selIndex].value == "none") {
    alert("Please select target language.");
    form["wl_trglang"].focus();
    return;
  }
  // Make sure that both are different
  selIndex1 = form["wl_srclang"].selectedIndex;
  selIndex2 = form["wl_trglang"].selectedIndex;
  if (form["wl_srclang"].options[selIndex1].value == form["wl_trglang"].options[selIndex2].value) {
    alert("Please select two different languages.");
    form["wl_trglang"].focus();
    return;
  }
  // if we are still here then submit the form
  form.submit();
}

function getIdiomaBR() {
	//document.location.href = document.wl_url.value;
	document.location.href = document.getElementById("wl_url").wl_url2.value;
	//document.location.href = document.forms[0][1].value;
	//document.location.href = document.form["wl_url"];
	//document.location.href = document.getElementById("wl_url").value;
	//document.location.href = "http://www.clm.com.br/barracuda/default.asp";
}



