
function clientURL(target,customer){
        address =  "http://" + "www." + target;
        document.write("<a href='" +address + "' target='_blank' class='link'>");
        document.write(customer);
        document.write("</a>");
}

function readCookie(name){
         var cookieValue = "";
         var search = name + "=";
         if(document.cookie.length > 0){
             offset = document.cookie.indexOf(search);
             if (offset != -1){
                    offset += search.length;
            	     end = document.cookie.indexOf(";", offset);
            	     if (end == -1) end = document.cookie.length;
            	     cookieValue = unescape(document.cookie.substring(offset, end));
             }
         }
         return cookieValue;
}
            
function writeCookie(name, value, hours, path){
        var expire = "";
        if(hours != null){
            	expire = new Date((new Date()).getTime() + hours * 3600000);
            	expire = "; expires=" + expire.toGMTString();
        }
        document.cookie = name + "=" + value + expire + "; path = " + path;
}
            
function checkCookie(){
        // check if the cookie is set
        if ( readCookie("ref") == "" ){
            //no cookies;
            writeCookie("ref",document.referrer, 65000, "");            
        }
}
            
function sendEmail(part1,part2) {
        address =  part1 + "@" + part2;
        document.write("<a href='mailto:" +address + "' class='link'>");
        document.write(address);
        document.write("</a>");
}                      

