var aboutSslText = new Object();
var SslLink = new Object();
var SslBlurbText = new Object();
var verifySslText = new Object();

  verifySslText["zh_cn"] = "&#39564;&#35777;";
  verifySslText["zh_tw"] = "&#39511;&#35657;";
  verifySslText["da"] = "KONTROLLER";
  verifySslText["nl"] = "BEVESTIGEN";
  verifySslText["en"] = "VERIFY";
  verifySslText["fr"] = "V&#233;rifier";
  verifySslText["de"] = "Best&#228;tigen";
  verifySslText["it"] = "Verificare";
  verifySslText["ja"] = "&#12463;&#12522;&#12483;&#12463;&#12375;&#12390;&#26908;&#35388;";
  verifySslText["ko"] = "&#51064;&#51613;";
  verifySslText["pt"] = "Verificar";
  verifySslText["es"] = "Verificar";
  verifySslText["sv"] = "Verifiera";

  aboutSslText["zh_cn"] = "&#20851;&#20110; SSL &#35748;&#35777;&#20851;&#20110; SSL &#35748;&#35777;";
  aboutSslText["zh_tw"] = "&#38364;&#26044; SSL &#35469;&#35657;";
  aboutSslText["da"] = "Om SSL-certifikater";
  aboutSslText["nl"] = "Informatie over SSL-certificaten";
  aboutSslText["en"] = "ABOUT SSL CERTIFICATES";
  aboutSslText["fr"] = "&#192; propos des certificats SSL";
  aboutSslText["de"] = "&#220;ber SSL-Zertifikate";
  aboutSslText["it"] = "Informazioni sui certificati SSL";
  aboutSslText["ja"] = "SSL&#12395;&#12388;&#12356;&#12390;";
  aboutSslText["ko"] = "SSL &#51064;&#51613;&#49436; &#51221;&#48372;";
  aboutSslText["pt"] = "Sobre certificados SSL";
  aboutSslText["es"] = "Acerca de los certificados SSL";
  aboutSslText["sv"] = "Om SSL-certifikat";

  SslLink["zh_cn"] = "http://www.verisign.com/products-services/security-services/ssl/ssl-information-center/";
  SslLink["zh_tw"] = "http://www.verisign.com/products-services/security-services/ssl/ssl-information-center/";
  SslLink["da"] = "http://www.verisign.dk/products-services/security-services/ssl/ssl-information-center/";
  SslLink["nl"] = "http://www.verisign.com/products-services/security-services/ssl/ssl-information-center/";
  SslLink["fr"] = "http://www.verisign.fr/products-services/security-services/ssl/ssl-information-center/";
  SslLink["de"] = "http://www.verisign.de/products-services/security-services/ssl/ssl-information-center/";
  SslLink["it"] = "http://www.verisign.com/products-services/security-services/ssl/ssl-information-center/";
  SslLink["ja"] = "http://www.verisign.com/products-services/security-services/ssl/ssl-information-center/";
  SslLink["ko"] = "http://www.verisign.com/products-services/security-services/ssl/ssl-information-center/";
  SslLink["pt"] = "http://www.verisign.com/products-services/security-services/ssl/ssl-information-center/";
  SslLink["es"] = "http://www.verisign.es/products-services/security-services/ssl/ssl-information-center/";
  SslLink["sv"] = "http://www.verisign.se/products-services/security-services/ssl/ssl-information-center/";
  SslLink["en"] = "http://www.verisign.com.au/ssl-certificate/";


  SslBlurbText["zh_cn"] = "This site chose VeriSign <a href=\"" + SslLink["zh_cn"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["zh_tw"] = "This site chose VeriSign <a href=\"" + SslLink["zh_tw"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["da"] = "This site chose VeriSign <a href=\"" + SslLink["da"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["nl"] = "This site chose VeriSign <a href=\"" + SslLink["nl"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["en"] = "This site chose VeriSign <a href=\"" + SslLink["en"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["fr"] = "This site chose VeriSign <a href=\"" + SslLink["fr"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["de"] = "This site chose VeriSign <a href=\"" + SslLink["de"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["it"] = "This site chose VeriSign <a href=\"" + SslLink["it"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["ja"] = "This site chose VeriSign <a href=\"" + SslLink["ja"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["ko"] = "This site chose VeriSign <a href=\"" + SslLink["ko"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";
  SslBlurbText["pt"] = "This site chose VeriSign <a href=\"" + SslLink["pt"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications."; 
  SslBlurbText["es"] = "This site chose VeriSign <a href=\"" + SslLink["es"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications."; 
  SslBlurbText["sv"] = "This site chose VeriSign <a href=\"" + SslLink["sv"] + "\" target=\"_blank\">SSL</a> for secure e-commerce and confidential communications.";

  function selectSealCode() {
     document.form.S1.focus();
     document.form.S1.select();
     return false;
  }

  function GenerateString() {

    var host;
    var size;
    var use_flash;
    var transparent;
    var language;
    var pickup_code;
    var badhost = "Please enter the common name.\nThe common name must match the \ncommon name (CN) on the SSL Certificate.";

    host = document.form.T1.value;

    size = document.form.SIZE.value;

    use_flash = (document.form.FORMAT.value == 'FLASH') ? "YES" : "NO";

    transparent = (use_flash == 'YES') ? "YES" : "NO";

    language = document.form.LA.value;

    document.form.S1.value = "";

   //Verify that common name is not null
   if ((host==null)||(host=="")) {
      alert(badhost);
      return false;
   }

   //Verify that there are no consecutive periods in common name
   if (host.indexOf('..') > -1) {
      alert(badhost);
      return false;
   }

   var host2 = host.split(".");
   if (host2.length < 2) {
      alert(badhost);
      return false;
   }

   for (var i=0; i<host2.length; i++) {
      if (host2[i].length < 1) {
         alert(badhost);
         return false;
      }
   }

    pickup_code = "<script src=https://seal.verisign.com/getseal?host_name=";
    pickup_code += host;
    pickup_code += "&size=" +  size;
    pickup_code += "&use_flash=" + use_flash;
    pickup_code += "&use_transparent=" + transparent;
    pickup_code += "&lang=" + language;
    pickup_code += "><\/script>";

    if (document.form.LAYOUT[1].checked == true) {
       document.form.S1.value = "<table width=\"290\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" title=\"Click to Verify - This site chose VeriSign SSL for secure e-commerce and confidential communications.\">\n<tr>\n<td width=\"135\" align=\"center\" valign=\"top\">" + pickup_code + "</td>\n<td width=\"155\" valign=\"middle\" style=\"font:11px/16px Helvetica,Verdana,Arial,sans-serif;\">" + SslBlurbText[language] + "</td>\n</tr>\n<tr>\n<td  align=\"center\" valign=\"top\"><a href=\"" + SslLink[language] + "\" target=\"_blank\" style=\"color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;\">" + aboutSslText[language] + "</a></td>\n<td width=\"155\">&nbsp;</td>\n</tr>\n</table>";
    } else {
       document.form.S1.value = "<table width=\"135\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" title=\"Click to Verify - This site chose VeriSign SSL for secure e-commerce and confidential communications.\">\n<tr>\n<td width=\"135\" align=\"center\" valign=\"top\">" + pickup_code + "<br />\n<a href=\"" + SslLink[language] + "\" target=\"_blank\"  style=\"color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;\">" + aboutSslText[language] + "</a></td>\n</tr>\n</table>";
    }

    return false;
  }

  function setOptions(chosen) {
    var selbox = document.form.BACKGROUND;
    selbox.options.length = 0;

    if (chosen == "GIF") {
      selbox.options[selbox.options.length] = new Option('White Background','WHITE');
      updateSeal();
    }

    if (chosen == "FLASH") {
      selbox.options[selbox.options.length] = new Option('Transparent','TRANSPARENT');
      selbox.options[selbox.options.length] = new Option('White Background','WHITE');
      updateSeal();
    }
  }

  function updateSeal() { 
    var sealSizeAndBackground = document.form.SIZE.value.toLowerCase();
    var language = document.form.LA.value;

    /*if (document.form.FORMAT.value == 'FLASH') {
      sealSizeAndBackground += "t";
    }*/
	document.getElementById('sealBox1').style.backgroundImage = document.getElementById('sealBox2').style.backgroundImage = "url(/stellent/groups/public/documents/image/seal_" + sealSizeAndBackground + ".gif)";
	if (sealSizeAndBackground == "s") {
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0) {
			document.getElementById('sealBox1').style.width = "106px";
			document.getElementById('sealBox2').style.width = "106px";			
        	document.getElementById('verifySslText1').style.setAttribute('top', '45px');
        	document.getElementById('verifySslText2').style.setAttribute('top', '45px');			
        	document.getElementById('verifySslText1').style.marginRight = "10px";
        	document.getElementById('verifySslText2').style.marginRight = "10px";			
        	document.getElementById('aboutSslText1').style.marginTop = "0px";
        } else {
			document.getElementById('sealBox1').style.width = "106px";
			document.getElementById('sealBox2').style.width = "106px";			
        	document.getElementById('verifySslText1').style.setProperty('top', '45px', null);
        	document.getElementById('verifySslText2').style.setProperty('top', '45px', null);			
        	document.getElementById('verifySslText1').style.marginRight = "10px";
        	document.getElementById('verifySslText2').style.marginRight = "10px";			
        	document.getElementById('aboutSslText1').style.marginTop = "0px";
		}
	}
	if (sealSizeAndBackground == "m") {
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0) {
			document.getElementById('sealBox1').style.width = "106px";
			document.getElementById('sealBox2').style.width = "106px";						
        	document.getElementById('verifySslText1').style.setAttribute('top', '51px');
        	document.getElementById('verifySslText2').style.setAttribute('top', '51px');			
        	document.getElementById('verifySslText1').style.marginRight = "0px";
        	document.getElementById('verifySslText2').style.marginRight = "0px";	
        	document.getElementById('aboutSslText1').style.marginTop = "0px";
		} else {
			document.getElementById('sealBox1').style.width = "106px";
			document.getElementById('sealBox2').style.width = "106px";
        	document.getElementById('verifySslText1').style.setProperty('top', '51px', null);
        	document.getElementById('verifySslText2').style.setProperty('top', '51px', null);
        	document.getElementById('verifySslText1').style.marginRight = "0px";
        	document.getElementById('verifySslText2').style.marginRight = "0px";
        	document.getElementById('aboutSslText1').style.marginTop = "0px";
        }
	}
	if (sealSizeAndBackground == "l") {
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0) {
			document.getElementById('sealBox1').style.width = "120px";
			document.getElementById('sealBox2').style.width = "120px";						
        	document.getElementById('verifySslText1').style.setAttribute('top', '56px');
        	document.getElementById('verifySslText2').style.setAttribute('top', '56px');			
        	document.getElementById('verifySslText1').style.marginRight = "0px";
        	document.getElementById('verifySslText2').style.marginRight = "0px";
        	document.getElementById('aboutSslText1').style.marginTop = "5px";
        } else {
			document.getElementById('sealBox1').style.width = "120px";
			document.getElementById('sealBox2').style.width = "120px";						
        	document.getElementById('verifySslText1').style.setProperty('top', '56px', null);
        	document.getElementById('verifySslText2').style.setProperty('top', '56px', null);			
        	document.getElementById('verifySslText1').style.marginRight = "0px";
        	document.getElementById('verifySslText2').style.marginRight = "0px";
        	document.getElementById('aboutSslText1').style.marginTop = "5px";
        }
	}
	document.getElementById('verifySslText1').innerHTML = document.getElementById('verifySslText2').innerHTML = verifySslText[language] + " <img src=\"/stellent/groups/public/documents/image/dev041863.gif\" style=\"margin:0px;padding:0px;\"/>";
	document.getElementById('aboutSslText1').innerHTML = document.getElementById('aboutSslText2').innerHTML = "<a href=\"" + SslLink[language] + "\" target=\"_blank\" style=\"color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;\">" + aboutSslText[language] + "</a>";
    document.getElementById('SslBlurbText').innerHTML = SslBlurbText[language];
  }
