<!-- This script copyright 2004-2009 Ian McAnerin -->

function create(form) {
  if (confirm("Create Metatags?")){
    var L =form.metalist;
    form.metalist.value = "<!DOCTYPE HTML PUBLIC";
    if (form.doctype.value != "") {
      L.value +=" " +
      form.doctype.value + "\">\n";
    }
    {
      L.value +="<html" +
      form.language.value + "\>\n";
    }
      L.value +="<head>\n";
    }
    if (form.charset.value != "") {
      L.value +="<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" +
      form.charset.value + "\">\n";
    }
    if (form.title.value != "") {
      L.value +="<title>" +
      form.title.value + "\</title>\n";
    }
    if (form.baseurl.value != "") {
      L.value +="<base href=\"" +
      form.baseurl.value + "\">\n";
    }
    if (form.description.value != "") {
      L.value +="<meta name=\"description\" content=\"" +
      form.description.value + "\">\n";
    }
    if (form.keywords.value != "") {
      L.value +="<meta name=\"keywords\" content=\"" +
      form.keywords.value + "\">\n";
    }
    if (form.canonical.value != "") {
      L.value +="<link rel=\"canonical\" href=\"" +
      form.canonical.value + "\">\n";
    }
    if (form.copyright.value != "") {
      L.value +="<meta name=\"copyright\" content=\"Copyright - All Rights Reserved © 2009 " +
      form.copyright.value + "\">\n";
    }
    if (form.author.value != "") {
      L.value +="<meta name=\"author\" content=\"" +
      form.author.value + "\">\n";
    }
    if (form.zipcode.value != "") {
      L.value +="<meta name=\"zipcode\" content=\"" +
      form.zipcode.value + "\">\n";
    }
    if (form.city.value != "") {
      L.value +="<meta name=\"city\" content=\"" +
      form.city.value + "\">\n";
    }
    if (form.state.value != "") {
      L.value +="<meta name=\"state\" content=\"" +
      form.state.value + "\">\n";
    }
    if (form.country.value != "") {
      L.value +="<meta name=\"country\" content=\"" +
      form.country.value + "\">\n";
    }
    if (form.robots.value != "") {
      L.value +="<meta name=\"robots\" content=\"" +
      form.robots.options[form.robots.selectedIndex].value + "\">\n";
    }
    if (form.noodp.value != "") {
      L.value +="<meta name=\"noodp\" content=\"" +
      form.noodp.options[form.noodp.selectedIndex].value + "\">\n";
    }
    if (form.googlebot.value != "") {
      L.value +="<meta name=\"googlebot\" content=\"" +
      form.googlebot.options[form.googlebot.selectedIndex].value + "\">\n";
    }
    if (form.cache.value != "") {
      L.value +="<meta name=\"cache-control\" content=\"" +
      form.cache.options[form.cache.selectedIndex].value + "\">\n";
    }
    if (form.cache.value != "") {
      L.value +="<meta name=\"pragma\" content=\"" +
      form.cache.options[form.cache.selectedIndex].value + "\">\n";
    }
    if (form.stylesheet.value != "") {
      L.value +="<link rel=\"stylesheet\" type=\"text/css\" href=\"" +
      form.stylesheet.value + "\">\n";
    }
    if (form.shortcuticon.value != "") {
      L.value +="<link rel=\"shortcut icon\" href=\"" +
      form.shortcuticon.value + "\">\n";
    }
    if (form.refresh.value != "") {
      L.value +="<meta http-equiv=\"refresh\" content=\"3;" +
      form.refresh.value + "\">\n";
    }
      L.value +="</head>\n";
}
