var poID = 686;
	var jURL;
	var Name = "_blank";
	var popped;
	var win;
	var features;
	
	function eh(){return true;}
	window.onerror=eh;
	
	var freq = 1440;
	if( !(freq>=0) ) freq = 1440; // 24 hours in seconds
	
		var ran_number = Math.round( Math.random()*99999999);
		if (window == top)
			jURL = "http://t.trafficmp.com/p.t/i" + poID + "/" + ran_number + "/?" + top.window.location;
		else
			jURL = "http://t.trafficmp.com/p.t/i" + poID + "/" + ran_number + "/";
	
	if(parseFloat(navigator.appVersion)>=4)
		features = "top=50000,left=50000,titlebar=1,toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1,channelmode=0,directories=0,status=1,width=720,height=300";
	else
		features = "titlebar=1,toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1,channelmode=0,directories=0,status=1,width=720,height=300";
	function serveAd()
	{
		if (freq == 0)
			return true;
		var cCkEx = document.cookie.indexOf('ptfc=yfki');
		if(cCkEx == -1)
		{
			document.cookie = 'tmpptfc=tmpyfki; path=/;';
			if(document.cookie.indexOf('tmpptfc=tmpyfki') == -1) cCkEx = 1;
		}
		else
		{	
			//alert('too recent');
		}
		if((cCkEx == -1))
			return true;
		else
			return false;
	}
	
	function cookieDomain( document_domain )
	{
		var idx_of_last_period = document_domain.lastIndexOf( '.' );
	  	var idx_of_next_to_last_period = document_domain.lastIndexOf( '.', idx_of_last_period-1 );
	  	if( idx_of_next_to_last_period == -1 ) return '.'+document_domain;
	  	return document_domain.substring( idx_of_next_to_last_period, document_domain.length );
	}
	function setCookie()
	{
		var cDa = new Date();
		cDa.setTime(cDa.getTime()+(freq*60*1000));
		//alert(cDa);
		document.cookie = 'ptfc=yfki; path=/; domain='+cookieDomain(document.domain)+'; expires='+cDa.toGMTString();
	}
	
	function loadWindow()
	{
		//alert('load window');
		win = window.open("", Name, features, true);
		self.focus();
		if (win != null)
		{
			win.blur();
			if(parseFloat(navigator.appVersion) >= 4) win.moveTo((screen.width-720)/2,(screen.height-420)/2);
			win.document.writeln("<" + "script language='javascript1.1' src='"+jURL+"'>");
			win.document.writeln("" + "script>");
			setCookie();
			document.onclick = null;
			popped = 1;	
		}
	}
	
	
		function callFirstAttempt()
		{
			window.document.tmp.TCallFrame("/", 1);
		}
		
		function firstAttempt()
		{
			loadWindow();
			if (win == null)
			{
				//2nd attempt
				popspan = document.getElementById("popspan");
				popspan.fireEvent("onkeydown");
			}
		}
		
		
		function secondAttempt()
		{
			if (popped != 1)
			{
				loadWindow();
				if (win == null)
				{
					//3rd attempt
					window.document.tmp.TCallFrame("/", 2);
									
					document.onclick = loadWindow;
					
				}
			}
		}
		if (serveAd())
		{
			
			if (window == top)
			{
				var URL = "http://ad.trafficmp.com/tmpad/banner/ad/tmp_flash.asp?poID=" + poID + "&isIsapi=" + 1;
				var MSIE;
				var popspan;
				document.writeln('');
					
				if ((navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0)&& (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0))
					MSIE = 1;
					
				var ShockMode = 0;
				var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
				if (plugin&& parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 5)
				{
					ShockMode = 1;
				}
				else if (MSIE == 1)
				{
					document.write(' \n');
					document.write('on error resume next \n');
					document.write('ShockMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
					document.write('<\/SCR' + 'IPT>\n');
				}
				
				if (ShockMode && MSIE == 1)
				{
					document.writeln("");
					document.writeln("");
					document.writeln("");
					window.onload = callFirstAttempt;
				} 
				else if (!(navigator.appName && navigator.appName.indexOf("Netscape") >=0 && navigator.appVersion.indexOf("2.")>=0))
				{
					firstAttempt();
				}
				
			}
			else if (window != top)
				loadWindow();
			
		}