function c(u){try{return c2(u.href);}catch(e){}return true;}
function c2(u){try{if(document.images){(new Image()).src="/images/verif/clear.gif?url="+escape(u);}}catch(e){}return true;}
function n(){nw('http://www.canadianescorts.com/cgi-bin/top-escorts/rankem.cgi?id=montreal');}
function nw(u){var w=window.open(u,'nw','',true);w.focus();c2(u+'+');}
function init(){
try{	
if(!this.z_ref){this.z_ref=document.referrer;}
if(!this.z_host){this.z_host=getHostName();}
if(!this.z_p_name){this.z_p_name=getPageName();}
initPutPopUp();
}catch(e){}
}
function initPutPopUp(){
this.is_z_putPopUp=true;
if(!this.z_p_name||this.z_p_name.length<=0){return;}
// set page on which do popups
//if(this.z_p_name.indexOf('web')>-1){this.is_z_putPopUp=true;return;}
}

function execThis(){
try{
if(this.is_z_putPopUp){doSetUnUnload();}
}catch(e){}
}
function doSetUnUnload(){window.onunload=function anonymous(){dc();}}
function doPromote(){n();}
function getHostName(){
try{
var lhn=window.location.href;
	try{
	lhn=lhn.substring(7,lhn.indexOf("/",7));
	}catch(e){
		if(lhn.length()>15){
			lhn=lhn.substring(0,15);
			}
	}
	return lhn;
}catch(e){}
return '';
}
function getPageName(){
try{
	var lhn=window.location.href;
	try{
	lhn=lhn.toLowerCase();
	lhn=lhn.substring(lhn.lastIndexOf("/")+1);
	}catch(e){}
	return lhn;
}catch(e){}
return '';
}

function dc(){
	if(document.activeElement){
		if('A'==document.activeElement.tagName){
			var nl=document.activeElement.href;
			if(nl.indexOf(getHostName())==-1){
				doPromote();
			}
		}else{
			doPromote();
		}
	}else{
		//doPromote();
	}
}

if (window.Event){document.captureEvents(Event.MOUSEUP);}
if (document.layers){document.captureEvents(Event.MOUSEDOWN);}
function nocontextmenu() {
	try {
  event.cancelBubble = true;
  event.returnValue = false;  
  } catch (e) {
	}
  return false;
} 
function norightclick(e) {
	if (window.Event) {
	    if (((e.which == 2 || e.which == 3) && (e.type == 'mousedown'|| e.type == 'mouseup'))
	        || (e.which == 1 && e.type == 'mouseup')) {
	        return false;
	    } else {
	        try {
	            //alertObject(e.target);
	            var o = e.target;
	            if (o.tagName == 'A') {
	                var h = o.href;
	                if (h.indexOf('escortsmontreal.net') == -1) {
	                    c2(h);
	                }
	            } else {
	                if (o.tagName == 'IMG') {
	                    var po = o.parentNode;
	                    if (po.tagName == 'A') {
	                        c(po);
	                    }
	                }
	            }
	        } catch (e) {
	        }
	    }
	} else {
	    if (event.button == 2 || event.button == 3) {
	        event.cancelBubble = true;
	        event.returnValue = false;
	        return false;
	    } else {
	        try {
	            var o = event.srcElement;
	            if (o.tagName == 'A') {
	                var h = o.href;
	                if (h.indexOf('escortsmontreal.net') == -1) {
	                    c2(h);
	                }
	            } else {
	                if (o.tagName == 'IMG') {
	                    var po = o.parentElement;
	                    if (po.tagName == 'A') {
	                        c(po);
	                    }
	                }
	            }
	        } catch (e) {
	        }
	    }
	}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
document.onmouseup = norightclick;
init();
execThis();
