
// ----------------------------------------------------------- This file compiled by Michael Taylor 2004-05-26 from MnetGlobal.js

function OpenPopup(strUrl, blnIsSecure, intSiteId, intWidth, intHeight, strSettings) {

	if(blnIsSecure == null || blnIsSecure.length == 0) var blnIsSecure = false;
	if(intSiteId == null || intSiteId.length == 0) var intSiteId = 4; // default to mnetchannel
	if(intWidth == null || intWidth.length == 0) var intWidth = parseInt(screen.width)/2;
	if(intHeight == null || intHeight.length == 0) var intHeight = parseInt(screen.height)/2;
	if(strSettings == null || strSettings.length == 0) var strSettings = "scrollbars=yes";
	
	var intWinX = (parseInt(screen.width)/2) - (intWidth/2);
	var intWinY = (parseInt(screen.height)/2) - (intHeight/2) - 20;
	
	strSettings += ",width=" + intWidth + ",height=" + intHeight + ",left=" + intWinX + ",top=" + intWinY + "";
	
	if( blnIsSecure && getCookie("smimid").length == 0 ) {
		// this visitor must still login
		top.location.href = strGlobalBaseUrl + "/GlobalTools/Community/SecurityCheck.asp?popupUrl=" + strUrl.replace(/&/gi, '[~AMP~]') + "&popupSettings=" + strSettings + "&returnUrl=" + top.location.href.replace(/&/gi, '[~AMP~]') + "&globalSiteId=" + intSiteId;
	}
	else {
		// this popup is not secure or this member is logged into SMI
		window.open( strUrl, "popupForSite" + intSiteId, strSettings );
	}
}

function drawCube(pixelSize, useRelativeURL, africa) {
	var html = '';
	html += ' <OBJECT ';
	html += 	' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  ';
	html += 	' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"  ';
	html += 	' WIDTH="'+pixelSize+'"  ';
	html += 	' HEIGHT="'+pixelSize+'"  ';
	html += 	' id="cube">  ';
	if (africa) {
		var linkVar = '/GlobalTools/Flash/MNA_Cube.swf';
	} else {
		var linkVar = '/GlobalTools/Flash/MND_Cube.swf';
	}
	useRelativeURL ? linkVar += '?linkType=relative' : null;
	html += ' <PARAM NAME="movie" VALUE="'+linkVar+'">  ';
	html += ' <PARAM NAME="wmode" VALUE="transparent">  ';
	html += ' <EMBED  ';
	html += 	' src="'+linkVar+'"  ';
	html += 	' wmode="transparent"  ';
	html += 	' WIDTH="'+pixelSize+'"  ';
	html += 	' HEIGHT="'+pixelSize+'"  ';
	html += 	' NAME="cube"  ';
	html += 	' TYPE="application/x-shockwave-flash"  ';
	html += 	' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">  ';
	html += ' </EMBED>  ';
	html += ' </OBJECT>  ';
	document.write(html);
}
