<!--
/********* netland Marketing Tecnológico - 2006 *********/

local = "http://www.netland.pt/adInesting/";	// on-line
//local = "";											// servidor testes local

Stamp = new Date();
var tmp = Math.round(Stamp.getMonth()+Stamp.getDate()+Stamp.getYear()+Stamp.getHours()+Stamp.getMinutes()+Stamp.getSeconds());


var id	= Math.round(Math.random()*2147483647*tmp);
var sid = Math.round(Math.random()*2147483647*tmp+id);
var visid;
var novo;
var sessid;
var nsess;

//document.write("visitID= "+Get_Cookie("visitID")+"<br>")
//document.write("sessnID= "+Get_Cookie("sessnID")+"<br>")

//stats =  local+"adInesting.asp?";
stats = "referrer=" + escape(window.document.referrer);
stats += "&pg=" + escape(document.location);
stats += "&tlt=" + escape(document.title);
stats += _browserInfo();

if (visid=Get_Cookie("visitID")){	// visitante já registado
	Set_Cookie( 'visitID', visid, 90, '/', '', '' );
	novo = 0;}
else {
	Set_Cookie( 'visitID', id, 90, '/', '', '' );
	novo = 1;}
if (sessid=Get_Cookie("sessnID")){	// visitante já registado
	nsess = 0;}
else {
	Set_Cookie( 'sessnID', sid, 0, '/', '', '' );
	nsess = 1;}

visid = Get_Cookie("visitID");
stats += "&visid="+visid;
stats += "&novo=" + novo;
sessid=Get_Cookie("sessnID");
stats += "&sessid="+sessid;
stats += "&nsess=" + nsess;

//document.write(stats+"<br>")

// Chama página para tratamento de dados enviando a informação necessária via url!
//document.write('<img border="0" height="1" width="1" src="'+local+"adInesting.asp?"+stats+'">');
document.write('<img border="0" height="1" width="1" src="'+"http://www.netland.pt/adInesting/adInestingNEW.asp?"+stats+'">');





// this function gets the cookie, if it exists
function Get_Cookie( name ) {
	
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}

function Set_Cookie( name, value, expires, path, domain, secure ) 
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct 
expires time, the current script below will set 
it for x number of days, to make it for hours, 
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );


document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

// funções utilizadas para recolha de informação

// recolhe informação sobre o browser client do visitante
function _browserInfo() {
	var sr="-",sc="-",ul="-",fl="-",je=1;
	var n=navigator;
	// informação sobre resolução do monitor
	if (self.screen) {
		// sr = resolução do monitor
		sr=screen.width+"x"+screen.height;
		// sc = resolução de cores
		sc=screen.colorDepth+"-bit";
	} else if (self.java) {
		var j=java.awt.Toolkit.getDefaultToolkit();
		var s=j.getScreenSize();
		sr=s.width+"x"+s.height;
	}
	// informação sobre idioma
	if (n.language) { ul=n.language.toLowerCase(); }
	else if (n.browserLanguage) { ul=n.browserLanguage.toLowerCase(); }
	// informação sobre utilização de javascript
	je=n.javaEnabled()?1:0;
	// informação sobre utilização de flash
	fl=_flashInfo();
	return "&scres="+sr+"&scrcl="+sc+"&userlg="+ul+"&userjv="+je+"&userfl="+fl;
}

// Informação sobre flahs no browser client
function _flashInfo() {
	var f="-",n=navigator;
	// para browser (FireFox, etc...)
	if (n.plugins && n.plugins.length) {									// se existem plugins...
		for (var ii=0;ii<n.plugins.length;ii++) {							// percorre-os todos
			if (n.plugins[ii].name.indexOf('Shockwave Flash')!=-1) {		// até encontrar o flash
				f=n.plugins[ii].description.split('Shockwave Flash ')[1];
				break;
			}
		}
	} 
	// para browser (IE, etc...)
	else if (window.ActiveXObject) {
  		for (var ii=10;ii>=2;ii--) {
   			try {
    			var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");
    			if (fl) { f=ii + '.0'; break; }
   			}
   			catch(e) {}
  		}
 	}
	return f;
}

//-->