﻿var obj;
var winModalWindow;

var emailID = "";

var errorMsg  = "För att öppna aktiviteten direkt, måste du använda Internet Explorer, och ha Windows Live Messenger installerat."
//In the code variable declarations above, the AppID variable is assigned the value of the game Hexic (1003) for users//within the US (1033). You should substitute the correct value assigned to your application (by the Support team)//for your desired market.

function invite(AppID)
{
	// Test #1: Launch with no email variable value causing the user to have to select another user to interact with.
	
	// var AppID = "10441574";
	CheckMessenger();
	LaunchApp(AppID, "");
}

function LaunchApp(AppID, emailID)
{
	if (obj != null)
	{
		obj.LaunchApp(AppID, emailID);
	}
}
function CheckMessenger()
{
	eval ('try {obj = new ActiveXObject("MSNMessenger.P4QuickLaunch"); } catch (e) {obj = null;}');
//	var strErrorPage = "http://" + [HOSTNAME] + "/Error.aspx"
	
	
	/*
	if (!isIE)// from AC_RunActiveContent
	{
		alert(errorMsg);
		//ShowWindow(strErrorPage, 410, 130);		
	}	
	*/
	if (obj == null)
	{
		alert(errorMsg);
		//ShowWindow(strErrorPage, 410, 225);
	}
	
	
}

function IgnoreEvents(e)
{
  return false
}
