var str_in;
var str_out = ""; 
var num_in;
var num_out = "";
var e = "Enter Text!";



function refresh()
{ 
    window.location.reload( false );
}

function str_to_num(form) {
num_out = "$";
if(form.input.value == "") alert(e);
else {
str_in = escape(form.input.value);
for(i = 0; i < str_in.length; i++) {
num_out += DecToHex1(str_in.charCodeAt(i)) +DecToHex2(str_in.charCodeAt(i))+ ", ";
}

form.output.value = num_out;
// form.input.value = "";
   }
}

function GiveHex(Dec)
{
   if(Dec == 10)
      Value = "A";
   else
   if(Dec == 11)
      Value = "B";
   else
   if(Dec == 12)
      Value = "C";
   else
   if(Dec == 13)
      Value = "D";
   else
   if(Dec == 14)
      Value = "E";
   else
   if(Dec == 15)
      Value = "F";
   else
      Value = "" + Dec;

   return Value;
}

function DecToHex1(Dec2)
{
 value=GiveHex(Math.floor(Dec2 / 16)) ;
  return Value;
}
function DecToHex2(Dec2)
{
 value= GiveHex(Dec2 % 16);
   return Value;
}

function BrowserInfo()
{
var agt=navigator.userAgent.toLowerCase();

  this.opSystem = 'Undefined.'; 
  this.name = navigator.appName;
  this.codename = navigator.appCodeName;
  this.version = navigator.appVersion.substring(0,4);
  this.platform = navigator.platform;
  this.userAgent=navigator.userAgent;
  this.javaEnabled = navigator.javaEnabled();
  this.screenWidth = screen.width;
  this.screenHeight = screen.height;

  if (( agt.indexOf('win') >= 0)  ||  (agt.indexOf('16bit') >= 0) ) {  this.opSystem = 'Windows'; };   
  if (( agt.indexOf('winnt') >= 0)  ||  (agt.indexOf('windows nt') >= 0) ) {  this.opSystem = 'Windows NT'; };   
  if ( agt.indexOf('windows nt 5.1') >= 0)   {  this.opSystem = 'Windows XP'; }; 
  if ( agt.indexOf('windows nt 5.0') >= 0)   {  this.opSystem = 'Windows 2000'; }; 
  if ( agt.indexOf('win 9x 4.90') >= 0)   {  this.opSystem = 'Windows ME'; };   
  if (( agt.indexOf('win 95') >= 0)  ||  (agt.indexOf('windows 95') >= 0) ) {  this.opSystem = 'Windows 95'; };   
  if (( agt.indexOf('win 98') >= 0)  ||  (agt.indexOf('windows 98') >= 0) ) {  this.opSystem = 'Windows 98'; };   


}


function printpage() {
	window.print();  
}
function clearDoc()
{
  var _s=top;
  var _d=_s.document;
  _d.open();
  _d.write("");
  _d.close();
}

function mailTo() {
  var email = "info@hdsystems.co.uk";
  var email2 = "H.D. Systems";
  
  if (!document.getElementById("mailTo")) return false;
  mailAdd();
  var spanobj = document.getElementById("mailTo");
  var anch = document.createElement("a");
  var mailto = "mailto:" + email;
  anch.setAttribute("href",mailto);
  spanobj.appendChild(anch);
  var txt = document.createTextNode(email2);
  anch.appendChild(txt);
}


function mailAdd() {
  var email1 = "infos@hdsystems.co.uk";
  var email2 = "H.D. Systems";
  
  if (!document.getElementById("mailAdd")) return false;
  
  var spanobj = document.getElementById("mailAdd");
  var anch = document.createElement("a");
  var mailto = "mailto:" + email1;
  anch.setAttribute("href",mailto);
  spanobj.appendChild(anch);
  var txt = document.createTextNode(email2);
  anch.appendChild(txt);
}



 window.onload = mailTo;




