//REFERENCE PAGE TAG
// CONSTANTS
var ct = "<img src=";
var cd = "//CSVTH.citysearch.com"; //this should contain the domain of the
                                 //web site that will host the page tag

var cu = "/zag.GIF?Log=1"; 
                                 //this should contain the full path to
                                 //the zag.gif file (excluding domain) and
                                 //include the query string of log=1

var ce = ">";

var vs_c = {};
vs_c["sw"] = screen.width;
vs_c["sh"] = screen.height;
vs_c["cd"] = screen.colorDepth;
var co = "";

for ( vs_cKey in vs_c ) {
	co = co+"&"+vs_cKey+"="+escape(vs_c[vs_cKey]);
}
document.write(ct,cd,cu,co,ce);

var vs_d = {};
vs_d["dt"] = document.title;
vs_d["dr"] = document.referrer;
vs_d["cb"] = new Date().getTime();
var vo = "";

if (typeof v != "undefined") {
	for ( vKey in v ) {
		vo = vo+"&"+vKey+"="+escape(v[vKey]);
	}
}
for ( vs_dKey in vs_d ) {
	vo = vo+"&"+vs_dKey+"="+escape(vs_d[vs_dKey]);
}
document.write(ct,cd,cu,vo,ce);
//END REFERENCE PAGE TAG
if (self.pedro) {
  pedro.event.addToOnLoadLast(startCapture);
} else {
  //
}

function startCapture(){
  if (vlc == "1"){captureLink();}
}
//BEGIN LINK CAPTURE PAGE TAG
function captureLink(){
  if (document.links[0]){
    if (document.links){
      var links = document.links, link, k=0;
      while(link=links[k++]) {
        $(link).addEvent("click", captureLinkName);
      }
    }
  }
}
function captureLinkName() {
  var lc=new Image();
  this.parent = this.parentNode;
  lc.src=cd+"/zag2.gif?Log=1&linkname=" + escape(this.name) + "&cd=" + new Date().getTime(); }
