//
//
//
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
//                 THIS SCRIPT MUST LIVE ON techsono2.COM ALSO!
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
//
//
var z = "";
var i = 0;
var s = document.URL;

z=readCookie("ad3");
if (z==null) {
  z = "";
  for (var n=1; n<=10; n++){
    i=Math.round(25*Math.random());
    //There is no chr() function, so you have to do this crazy shit:
    z=z+unescape("%"+d2h(i+97));
    }
  z=MakeDateString() + "-" + z;
  createCookie("ad3",z,365);
  }

if (s.indexOf('techsono.com') != -1) 
    {
    document.write("<p align=center>" + 
      "<a href=http://www.techsono.com/index.html target=new>" + 
      "<img src=http://www.techsono.com/images/techsonotrans.gif?ad3=" + z + " border=0 height=47 width=66></a><br>" +
      "<a href=http://www.techsono.com/index.html target=new>TechSono Home Page</a>" +
      "</p>");
    } 
else 
    {
    //We don't send the cookie when the page lives on techsono2.com because a new cookie would be created.
    //We need the full path to techsono.com here:
    document.write("<p align=center>" + 
      "<a href=http://www.techsono.com/index.html target=new>" + 
      "<img src=http://www.techsono.com/images/techsonotrans.gif border=0 height=47 width=66></a><br>" +
      "<a href=http://www.techsono.com/index.html target=new>TechSono Home Page</a>" +
      "</p>");
    }
  
function createCookie(name, value, days)
{
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
    }
  else var expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
  var ca = document.cookie.split(';');
  var nameEQ = name + "=";
  for(var i=0; i < ca.length; i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1, c.length); //delete spaces
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }
  return null;
}

function d2h(d) {return d.toString(16);}

function MakeDateString() 
{
  var now = new Date();
  var y = "";
  var m = "";
  var d = "";
  var h = "";
  var n = "";
  var s = "";

  y=now.getFullYear();
  m=(now.getMonth()+1) + ''; //The month number is zero-relative. Adding the '' converts the number into as string.
  if (m.length == 1) {m="0" + m;}
  d=now.getDate() + '';
  if (d.length == 1) {d="0" + d;}
  h=now.getHours() + '';
  if (h.length == 1) {h="0" + h;}
  n=now.getMinutes() + '';
  if (n.length == 1) {n="0" + n;}
  s=now.getSeconds() + '';
  if (s.length == 1) {s="0" + s;}

  return y + "-" + m + "-" + d + "-" + h + ":" + n + ":" + s;
}
