// global.js

function openPopup(url, width, height)
{
	var top			= (screen.height / 2) - (height / 2);
	var left		= (screen.width / 2) - (width / 2);
	var name		= "pop" + Math.floor(Math.random() * 5000)
	var features	= "";

	features += "top=" + top;
	features += ",left=" + left;
	features += ",width=" + width;
	features += ",height=" + height;

	var pop = window.open(url, name, features);
}

function openPixel3D(product)
{
	var url		= "http://www.pixel3d.com.br/sony/prod.asp?id=" + product;
	var width	= 433;
	var height	= 400;
	
	openPopup(url, width, height);
}

function openPixel3D_2(product)
{
	var url		= "http://www.pixel3d.com.br/sony/prod.aspx?id=" + product + "&lang=pt";
	var width	= 433;
	var height	= 400;
	
	openPopup(url, width, height);
}

function track(pageName, channel, hier1) 
{
	s.pageURL = document.location.href.split('/#/');
	if (s.pageURL[1] != 'home') 
	{
		s.pageURL = s.pageURL.join('/');
	}
	else 
	{
		s.pageURL = s.pageURL[0] + '/default.asp';
	}
	s.pageName	= pageName || '';
	s.channel	= channel || '';
	s.hier1		= hier1 || '';

	var s_code = s.t();
	s.referrer = s.pageURL;
}
