var edlh = "editors"
var edrh = "mylanguage.gov"
var aclh = "andrewc"
var acrh = "vicnet.net"
var suplh = "support"
var suprh = "mylanguage.gov"
	
var actlh = "Nicky.LoBianco"
var actrh = "act.gov"
	
var walh = "marilyn.cacavas"
var warh = "slwa.wa.gov"
	
var qldlh = "debra.cooper"
var qldrh = "slq.qld.gov"
var nswlh = "oacevedo"
var nswrh = "sl.nsw.gov"
var salh = "byrne.liz"
var sarh = "saugov.sa.gov"
var nt1lh = "emma.darby"
var nt1rh = "nt.gov"
var vic1lh = "andrew.cunningham"
var vic1rh = "vicnet.net"
var vic2lh = "brendan.fitzgerald"
var vic2rh = "vicnet.net"
var vic3lh = "frances.savage"
var vic3rh = "vicnet.net"

	
function print_mail_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + edlh + "@");
	document.write(edrh + ".au\">"  + "MyLanguage Editors"  + "<\/a>");
}

function print_ac_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + aclh + "@");
	document.write(acrh + ".au\">"  + "Andrew Cunningham"  + "<\/a>");
}

function print_sup_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + suplh + "@");
	document.write(suprh + ".au\">"  + "MyLanguage Support"  + "<\/a>");
}


function print_act_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + actlh + "@");
	document.write(actrh + ".au\">"  + "Australian Capital Territory"  + "<\/a>");
}

function print_wa_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + walh + "@");
	document.write(warh + ".au\">"  + "Western Australia"  + "<\/a>");
}

function print_qld_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + qldlh + "@");
	document.write(qldrh + ".au\">"  + "Queensland"  + "<\/a>");
}

function print_nsw_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + nswlh + "@");
	document.write(nswrh + ".au\">"  + "New South Wales"  + "<\/a>");
}

function print_sa_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + salh + "@");
	document.write(sarh + ".au\">"  + "South Australia"  + "<\/a>");
}

function print_nt1_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + nt1lh + "@");
	document.write(nt1rh + ".au\">"  + "Northern Territory"  + "<\/a>");
}

function print_nt2_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + nt2lh + "@");
	document.write(nt2rh + ".au\">"  + "Northern Territory"  + "<\/a>");
}

function print_vic1_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + vic1lh + "@");
	document.write(vic1rh + ".au\">"  + "Victoria"  + "<\/a>");
}

function print_vic2_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + vic2lh + "@");
	document.write(vic2rh + ".au\">"  + "Victoria"  + "<\/a>");
}

function print_vic3_link()
{
	document.write("<a href=\"mailto");
	document.write(":" + vic3lh + "@");
	document.write(vic3rh + ".au\">"  + "Victoria"  + "<\/a>");
}



function validateForm(theForm,field)
{
  for (var argsCounter = 0; argsCounter < arguments.length; argsCounter=argsCounter+2) {

    if (!validRequired(arguments[argsCounter],arguments[argsCounter+1]))
      return false;
  }

  return true;
}


function validateFormCustom(theForm,field)
{
  for (var argsCounter = 0; argsCounter < arguments.length; argsCounter=argsCounter+2) {

    if (!validRequired(arguments[argsCounter],arguments[argsCounter+1]))
      return false;
  }

  var yes = self.confirm('Are you sure you wish to submit this survey');

  return yes;

}


function validRequired(formField,fieldLabel)
{
  var result = true;

  if (formField.value == "") {
    alert('Please enter a value for the "' + fieldLabel +'" field.');
    formField.focus();
    result = false;
  }

  return result;
}

<!-- The 2 functions below checks for HTML in forms fields -->
function Convert(Word) {

  a = Word.indexOf("<");
  b = Word.indexOf(">");
  len = Word.length;
  c = Word.substring(0, a);
  if(b == -1)
  b = a;
  d = Word.substring((b + 1), len);
  Word = c + d;
  tagCheck = Word.indexOf("<");
  if(tagCheck != -1)
    Word = Convert(Word);
    return Word;
}


function Check(field,fieldval) {

  ToCheck = fieldval;
  Checked = Convert(ToCheck);
  field.value = Checked;
  return true;
}


/* Send a confirmation OK/Cancel box to the screen

  Published: November 17, 2003 */

function pdURLareYouSureXB(url,message) {

  if (self.confirm(message)) {
    window.location.href = url;
  }
}

function trFORMareYouSureXB(message)
{
  // Uses a confirm box
  var yes = self.confirm(message);

  return yes;

}

