/*
         ___                         _____       __
        /  /\        ________       /    /\     / /\
(-----//  /  \//----/_____/__\\--) /____/  \___/_/ //--------------------------)
      /  /   /      \     | //     \    \  /    /\/    this code was created by
     /__/   /        \    |///-----\\____\/____/  \                       sigea
(---\\  \  /   (-----\\___|/        /    /\    \  /       
      \__\/                        /____/ /\____\/            __       sigea.ch
                                   \____\/  \  /             /\_\--------------)
                                         \___\//-------------\/_/  

*/

addLoadEvent(function(){
	try {
		piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
		var width = -1;
		var height = -1;		
		if (typeof window.innerWidth != "undefined"){
			width = window.innerWidth;
			height = window.innerHeight;
		}else if (document.documentElement && typeof document.documentElement.offsetWidth != "undefined" && document.documentElement.offsetWidth != 0){
			width = document.documentElement.offsetWidth;
			height = document.documentElement.offsetHeight;
		}else if (document.body && typeof document.body.offsetWidth != "undefined"){
			width = d.body.offsetWidth;
			height = d.body.offsetHeight;
		};
		if(width>0){
			piwikTracker.setCustomVariable(1,'window',width+'x'+height);
		}
		piwikTracker.trackPageView();
		piwikTracker.enableLinkTracking();
	} catch( err ) {}
});
