// DEFINE LA LOCALIZACION DEL SCRIPT
//************************ LINE A CAMBIAR *****************************
var ScriptLoc = "http://www.centrogeo.org.mx/TrafficWeb/stats/";
//*********************************************************************

function countThisPage()
{
// GET USER OPERATING SYSTEM
var OSName = "Sistema Operativo Desconocido";
if (navigator.appVersion.indexOf("Win")!=-1)
{
	OSName = "Version de Windows Desconocida"
	if (navigator.userAgent.indexOf("NT 6.0")!=-1)
	{
		OSName = "Windows Vista";
	}
	if (navigator.userAgent.indexOf("NT 5.2")!=-1)
	{
		OSName = "Windows 2003";
	}
	if (navigator.userAgent.indexOf("NT 5.1")!=-1 || navigator.userAgent.indexOf("winXP")!=-1)
	{
		OSName = "Windows XP";
	}
	if (navigator.userAgent.indexOf("NT 5.0")!=-1 || navigator.userAgent.indexOf("win2000")!=-1)
	{
		OSName = "Windows 2000";
	}
	if (navigator.userAgent.indexOf("NT 4.0")!=-1 || navigator.userAgent.indexOf("win2000")!=-1)
	{
		OSName = "Windows NT 4.0";
	}
	if (navigator.userAgent.indexOf("Windows 98")!=-1 || navigator.userAgent.indexOf("win98")!=-1)
	{
		OSName = "Windows 98";
	}
	if (navigator.userAgent.indexOf("Windows 95")!=-1 || navigator.userAgent.indexOf("win95")!=-1)
	{
		OSName = "Windows 95";
	}
	if (navigator.userAgent.indexOf("Win 9x")!=-1 || navigator.userAgent.indexOf("winME")!=-1 || navigator.userAgent.indexOf("Windows ME")!=-1)
	{
		OSName = "Windows ME";
	}
}
if (navigator.appVersion.indexOf("Mac")!=-1) OSName = "MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName = "Unix";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName = "Linux";

//DETECT REFFERER PAGE
var PageReferrer = "Referrer Desconocido";

if (document.referrer == "") 
{
	PageReferrer = "Visita Directa";
} 
else 
{
	PageReferrer = document.referrer;
}

//DETECT PAGE LOCATION
var DocLocation = "Documento Desconocido";
DocLocation = document.location;

// DETECT USER BROWSER
var BrowserName="Desconocido";
if ((navigator.appVersion).indexOf("MSIE 4.")!=-1) BrowserName = "Internet Explorer 4";
if ((navigator.appVersion).indexOf("MSIE 5.")!=-1) BrowserName = "Internet Explorer 5";
if ((navigator.appVersion).indexOf("MSIE 6.")!=-1) BrowserName = "Internet Explorer 6";
if ((navigator.appVersion).indexOf("MSIE 7.")!=-1) BrowserName = "Internet Explorer 7";
if ((navigator.appVersion).indexOf("MSIE 8.")!=-1) BrowserName = "Internet Explorer 8";
if (navigator.appName=="Netscape") BrowserName = "Netscape";
if ((navigator.userAgent.toLowerCase()).indexOf("opera")!=-1) BrowserName = "Opera";
if ((navigator.userAgent.toLowerCase()).indexOf("firefox")!=-1) BrowserName = "Mozilla Firefox";
if ((navigator.userAgent.toLowerCase()).indexOf("avant")!=-1) BrowserName = "Avant Browser";
if ((navigator.userAgent.toLowerCase()).indexOf("safari")!=-1) BrowserName = "Safari";
if ((navigator.userAgent.toLowerCase()).indexOf("omniweb")!=-1) BrowserName = "Omni Web";
if ((navigator.userAgent.toLowerCase()).indexOf("webtv")!=-1) BrowserName = "WebTV";
if ((navigator.userAgent.toLowerCase()).indexOf("icab")!=-1) BrowserName = "Icab";
if ((navigator.userAgent.toLowerCase()).indexOf("aol")!=-1) BrowserName = "AOL";
if ((navigator.userAgent.toLowerCase()).indexOf("konqueror")!=-1) BrowserName = "Konqueror";
if ((navigator.userAgent.toLowerCase()).indexOf("firebird")!=-1) BrowserName = "FireBird";
if ((navigator.userAgent.toLowerCase()).indexOf("java")!=-1) BrowserName = "Java";
if ((navigator.userAgent.toLowerCase()).indexOf("hotjava")!=-1) BrowserName = "HotJava";
if ((navigator.userAgent.toLowerCase()).indexOf("chrome")>-1) BrowserName = "Google Chrome";

// DETECT USER SCREEN SIZE
var ScreenSize = "Otra";
if (parseInt(navigator.appVersion)>3) 
{
 screenW = screen.width;
 screenH = screen.height;
 ScreenSize = screenW + "x" + screenH;
}
else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)==3 && navigator.javaEnabled()) 
{
 var jToolkit = java.awt.Toolkit.getDefaultToolkit();
 var jScreenSize = jToolkit.getScreenSize();
 screenW = jScreenSize.width;
 screenH = jScreenSize.height;
 ScreenSize = screenW + "x" + screenH;
}

// DETECT COLOUR DEPTH
var Colours = "Configuracion de Color Desconocido";
if (document.colordepth != "") Colours = screen.colorDepth;

// MAKE SURE THE COUNT PAGE IS CALLED BY PREVENTING THE BROWSER FROM TAKING A CACHED IMAGE
var RndNum=Math.random();

// SEND THIS CLIENTSIDE INFO TO AN ASP SCRIPT VIA THE IMG SRC-TAG

document.write("<a href='" + ScriptLoc 
		+ "stats.asp'><img alt='centrogeo' src='" + ScriptLoc + "count.asp?" 
		+ "OSName=" + OSName 
		+ "&PageReferrer=" + PageReferrer 
		+ "&BrowserName=" + BrowserName
		+ "&ScreenSize=" + ScreenSize
		+ "&Colours=" + Colours 
		+ "&DocLocation=" + DocLocation
		+ "&NoCache=" + RndNum
		+ "' border='0'></a>");

//alert(OSName + "\n" + PageReferrer  + "\n" +  BrowserName + "\n" + ScreenSize  + "\n" + Colours  + "\n" + DocLocation  + "\n" +  RndNum + "\n");
/*
document.write("<a href='" + ScriptLoc 
		+ "count.asp?" 
		+ "OSName=" + OSName 
		+ "&PageReferrer=" + PageReferrer 
		+ "&BrowserName=" + BrowserName
		+ "&ScreenSize=" + ScreenSize
		+ "&Colours=" + Colours 
		+ "&DocLocation=" + DocLocation
		+ "&NoCache=" + RndNum
		+ "'></a>");

*/

} //Fin de la función



