﻿function track( tag ){
	pageTracker._trackPageview( tag );
}

function arquiteto(){
	pop("arquiteto");
}

function manual(){
	pop("manual");
}

// firebug console like for IE
if(location.href.indexOf("debug") > -1 && !console) {
	var console = {
		log: function(msg) {
			if(!this.consoleWindow) {
				this.consoleWindow = window.open("about:blank", "console");
				this.consoleWindow.document.write("<pre id=\"console\"></pre>");
				this.consoleWindow.document.close();
			}
			this.consoleWindow.document.getElementById("console").innerHTML += msg + "<br />";
		}
	};
}

function pop( id ) {
		var page;
		var name;
		var w;
		var h;
		
		switch( id ){
		
			case "skank1":
			case "skank2":
			case "skank3":
				page = "http://flashs.sky.com.br/hotsite/hdtv/skank/"+id+".html";
				name = id;
				w = 640;
				h = 480;
				break;
				
			case "manual":
				page = "/manual-online/default.aspx";
				name = "manual";
				w = 967;
				h = 521;
				break;
				
			case "arquiteto":
				page = "/arquitetovirtual/index.html";
				name = "arquiteto";
				w = 1000;
				h = 600;
				break;
				
			case "adesao":
				page = "http://assine.sky.com.br/pacotes/pop-adesao.aspx";
				name = "adesao";
				w = 540;
				h = 520;
				break;
		}
	
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
		if (winl < 0) winl = 0;
		if (wint < 0) wint = 0;
		var settings = 'height=' + h + ',';
		settings += 'width=' + w + ',';
		settings += 'top=' + wint + ',';
		settings += 'left=' + winl + ',';
		settings += 'location=no,';
		settings += 'status=no,';
		settings += 'titlebar=no';
		
		var win = window.open(page,name,settings);
		if(window.focus){
			win.focus();
		}
	}
