// JavaScript Document
function flash_focus(){ document.getElementById('flashContainer').focus(); }

function testExternalInterface(parm){
	alert(parm);
}
	
function openServiceMenu(my_href) {
	window.open('http://twinair.fiat500.com/' + my_href + '.htm', 'serviceMenu', 'width=462, height=252');
	_gaq.push(['_trackPageview', '/serviceMenu/' + my_href]);
}

function openServiceMenu1(my_href) {
	window.open('http://www.fiat.it/cgi-bin/pbrand.dll/FIAT_ITALIA/popHelp/pophelp.jsp?contentOID=1074988322');
	_gaq.push(['_trackPageview', '/serviceMenu/webprivacy']);
}

function openLink(my_href) {
	window.open(my_href);
}

function closeMe() {
	$('#serviceMenu').remove();
	document.getElementById('flashContainer').focus();
}
	
$(document).ready(function() {
	$("body").append('<div id="spacer"></div>');
	$(".stat").bind('click', function () {
	callTagAlias($(this).attr('rel'));
	});
});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17313909-1']);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
  
function closeFB() {
	$("#overlay_img").css('display', 'none');
	document.getElementById('flashContainer').focus();
}

function openFB() {
	$("#overlay_img").css('display', 'block');
}

function shareFB(usr){
	window.open('http://www.new.facebook.com/sharer.php?u=http://twinair.fiat500.com/?usr=' + usr);
}
function shareTwitter(usr) {
	window.open('http://twitter.com/home?status=http://twinair.fiat500.com/?usr=' + usr);
}
