function selectSealCode() {
	document.form.S1.focus();
	document.form.S1.select();
	return false;
	}

function GenerateString() {
	var host;
	var size;
	var use_flash;
	var transparent = "NO";
	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";
	
	if (document.form.FORMAT.value == 'FLASH') {
		if (document.form.TRANSPARENT[0].checked) {
				transparent = "YES";
			}
			else {
				transparent = "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>";
	document.form.S1.value = pickup_code;
	return false;
	}

	function updateSeal() { 
	var sealSizeAndBackground = document.form.SIZE.value.toLowerCase();
	var language = document.form.LA.value;
		document.getElementById('sealBox1').style.backgroundImage = "url('images/verified_" + sealSizeAndBackground + ".gif')";

	if (document.form.FORMAT.value=='FLASH')	 {
		document.getElementById('transparent').style.display="inline";
		document.getElementById('transparent1').style.display="inline";
		document.getElementById('eHost').innerHTML="5";
	} else {
		document.getElementById('transparent').style.display="none";
		document.getElementById('transparent1').style.display="none";
		document.getElementById('eHost').innerHTML="4";
	}
	
	if (sealSizeAndBackground == "s") {
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0) {
			document.getElementById('sealBox1').style.width = "100px";	
			document.getElementById('sealBox1').style.height = "72px";
		} else {
			document.getElementById('sealBox1').style.width = "106px";	
			document.getElementById('sealBox1').style.height = "72px";
		}
	}
	if (sealSizeAndBackground == "m") {
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0) {
			document.getElementById('sealBox1').style.width = "115px";		
			document.getElementById('sealBox1').style.height = "82px";			
		} else {
			document.getElementById('sealBox1').style.width = "115px";
			document.getElementById('sealBox1').style.height = "82px";
		}
	}
	if (sealSizeAndBackground == "l") {
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0) {
			document.getElementById('sealBox1').style.width = "130px";	
			document.getElementById('sealBox1').style.height = "88px";				
		} else {
			document.getElementById('sealBox1').style.width = "130px";	
			document.getElementById('sealBox1').style.height = "88px";			
		}
	}
}

function makeTransparent() {
var sealSizeAndBackground = document.form.SIZE.value.toLowerCase();
if (sealSizeAndBackground == "s") {
	document.getElementById('sealBox1').style.backgroundImage="url('images/verified_s.gif')";
	}

if (sealSizeAndBackground == "m") {
	document.getElementById('sealBox1').style.backgroundImage="url('images/verified_m.gif')";
	}

if (sealSizeAndBackground == "l") {
	document.getElementById('sealBox1').style.backgroundImage="url('images/verified_l.gif')";
	}
}

function makeWhite() {
var sealSizeAndBackground = document.form.SIZE.value.toLowerCase();
if (sealSizeAndBackground == "s") {
	document.getElementById('sealBox1').style.backgroundImage="url('images/verified_sw.gif')";
	}

if (sealSizeAndBackground == "m") {
	document.getElementById('sealBox1').style.backgroundImage="url('images/verified_mw.gif')";
	}

if (sealSizeAndBackground == "l") {
	document.getElementById('sealBox1').style.backgroundImage="url('images/verified_lw.gif')";
	}
}