i=0;
s=0;
num=0;
seq1="",seq2="";

ie   = document.all?1:0;
ns   = document.layers?1:0;
ns6  = document.getElementById?1:0;
svet = "";

function generate(what)
	{
		code = document.pad.text;
		if (code.value.length>0) code.value = "<script language=JavaScript>m='"+escape(code.value)+"';d=unescape(m);document.write(d);<\/script>";
		else if (code.value.length == "")
			{
				alert('Paste HTML code that you wish to encrypt into the box.');
				document.pad.text.focus();
			}
	}

function selectCode()
	{
		padText=document.pad.text;
		if(padText.value.length>0)
			{
				if (ie)
					{
						therange=padText.createTextRange();
						therange.execCommand("Copy");
						window.status="Encrypted HTML copied to Clipboard!";
						setTimeout("window.status=''",1800);
					}
				padText.focus();
				padText.select();
			}
		else alert('Please paste your HTML code into the box first...')
	}

function dothisfirst(what, message)
	{
		if (ie||ns6)
			{
				window.status=message;
				what.style.backgroundColor='#EAEAEA';
				what.style.cursor='hand';
			}
		else window.status=message;
	}
function thendothis(what)
	{
		if (ie||ns6)
			{
				what.style.backgroundColor='white';
				window.status='';
			}
		else window.status='';
	}

