// Copyright 2004 Fastclick.com Inc. v1.0
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.CLICK);
var htmlTags = new Array("P", "B", "I", "SPAN", "DIV", "TABLE", "U", "LI","FONT", "STYLE");
document.onclick = redirect;
 

function redirect(evt){
 var link = document.all ? event.srcElement : evt.target; 
 var opennew=0;
 var target = document.all?event.srcElement.target:evt.target.target;
 if (target != null && target != "" && target.indexOf('_top')<0) {
  opennew=1;
 }
 
 if(link.href){
  if(IE){
   if(event.srcElement.tagName == "IMG") {
    link = event.srcElement.parentElement.href;
   }
  }
  FCx(link,opennew);
  return false;
 }else if(!IE && evt.target.constructor == "[HTMLImageElement]") {
  link = evt.target.parentNode.href;
  if(link != null) {
   FCx(link,opennew);
   return false;
  }
 }else if(!IE && evt.target.constructor == "[HTMLSpanElement]") {
  link = evt.target.parentNode.href;
  if(link != null) {   
   FCx(link,opennew);
   return false;
  }
 }else{
    if(IE){
      for(var i=0; i<htmlTags.length; i++) {
        if(event.srcElement.tagName == htmlTags[i]) {    
          link = event.srcElement.parentNode.href;
          if(link!=null) {
            FCx(link,opennew);
            return false;
          }
        }
      }
    }
  return true;
 }
}
 
function FCx(x,opennew){
 if(document.cookie.indexOf('CxIC=1')<=0){ 
  x='http://media.fastclick.net/w/get.media?sid='+sid+'&m=5&tp=6&url='+escape(x);
  var date_ob=new Date();
  date_ob.setTime(date_ob.getTime()+min*1000*60);
  document.cookie='FCxIC=1; path=/; expires='+date_ob.toGMTString();
    }
    
 if(opennew) {
  xwin=window.open(x);
  xwin.focus();
 }
 else {
  location.href=x;  
 }
 
 return false
}