function GerarSWF($arquivo,$altura,$largura,$id){
    document.writeln('    <object id="globalnav-object" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + $largura + '" height="' + $altura + '" id="' + $id + '" name="' + $id + '">');
    document.writeln('        <param name="movie" value="' + $arquivo + '" />');
    document.writeln('        <param name="FlashVars" value="loc=en_US&htmlApp=false&gatewayURL=gwurl" />');
    document.writeln('        <param name="bgcolor" value="#ffffff" />');
    document.writeln('        <param name="menu" value="false" />');
    document.writeln('        <param name="quality" value="high" />');
    document.writeln('        <param name="salign" value="tl" />');
    document.writeln('        <param name="scale" value="noscale" />');
    document.writeln('        <param name="wmode" value="transparent" />');
    document.writeln('        <embed id="globalnav-embed" src="' + $arquivo + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" flashvars="loc=en_US&htmlApp=false&gatewayURL=gwurl" bgcolor="#ffffff" menu="false" quality="high" salign="tl" scale="noscale" id="' + $id + '" width="' + $largura + '" height="' + $altura + '"></embed>');
    document.writeln('    </object>');
}
//////////////////////////////////
function checkForm(){
	if(document.form.plano.value == ""){
		alert("Informe seu Plano!");
		document.form.plano.focus();
		return false;
	}
	if(document.form.login.value == ""){
		alert("Informe seu login!");
		document.form.login.focus();
		return false;
	}
	if(document.form.senha2.value == ""){
		alert("Informe sua senha!");
		document.form.senha2.focus();
		return false;
	}
	if(document.form.dominio.value == ""){
		alert("Informe seu domínio!");
		document.form.dominio.focus();
		return false;
	}
	if(document.form.nome.value == ""){
		alert("Informe seu nome!");
		document.form.nome.focus();
		return false;
	}

	
	///////////////////
if(document.form.cpf.value == ""){
    alert("Campo inválido. É necessário informar o CPF");
    document.form.cpf.focus();
    return (false);
  }
  if (((document.form.cpf.value.length == 11) && (document.form.cpf.value == 11111111111) || (document.form.cpf.value == 22222222222) || (document.form.cpf.value == 33333333333) || (document.form.cpf.value == 44444444444) || (document.form.cpf.value == 55555555555) || (document.form.cpf.value == 66666666666) || (document.form.cpf.value == 77777777777) || (document.form.cpf.value == 88888888888) || (document.form.cpf.value == 99999999999) || (document.form.cpf.value == 00000000000)))
  {
    alert("CPF inválido.");
    document.form.cpf.focus();
    return (false);
  }


  if (!((document.form.cpf.value.length == 11) || (document.form.cpf.value.length == 14)))
  {
    alert("CPF inválido.");
    document.form.cpf.focus();
    return (false);
  }

  var checkOK = "0123456789";
  var checkStr = document.form.cpf.value;
  var allValid = true;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Favor preencher somente com números o campo CPF.");
    document.form.cpf.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseFloat(allNum);
  if (chkVal != "" && !(prsVal > "0"))
  {
    alert("CPF zerado !");
    document.form.cpf.focus();
    return (false);
  }

if (document.form.cpf.value.length == 11)
{
  var tot = 0;

  for (i = 2;  i <= 10;  i++)
    tot += i * parseInt(checkStr.charAt(10 - i));

  if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(9)))
  {
    alert("CPF inválido.");
    document.form.cpf.focus();
    return (false);
  }
  
  tot = 0;
  
  for (i = 2;  i <= 11;  i++)
    tot += i * parseInt(checkStr.charAt(11 - i));

  if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(10)))
  {
    alert("CPF inválido.");
    document.form.cpf.focus();
    return (false);
  }
}
else
{
  var tot  = 0;
  var peso = 2;
  
  for (i = 0;  i <= 11;  i++)
  {
    tot += peso * parseInt(checkStr.charAt(11 - i));
    peso++;
    if (peso == 10)
    {
        peso = 2;
    }
  }

  if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(12)))
  {
    alert("CPF inválido.");
    document.form.cpf.focus();
    return (false);
  }
  
  tot  = 0;
  peso = 2;
  
  for (i = 0;  i <= 12;  i++)
  {
    tot += peso * parseInt(checkStr.charAt(12 - i));
    peso++;
    if (peso == 10)
    {
        peso = 2;
    }
  }

  if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(13)))
  {
    alert("CPF inválido.");
    document.form.cpf.focus();
    return (false);
  }
} 

	if(document.form.email_1.value == ""){
		alert("Informe seu e-mail!");
		document.form.email_1.focus();
		return false;
	}
	
	
	
	
	return true;
}
