function Is()
{
	this.subscriber = false;
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
	this.ie   = (agent.indexOf("msie") != -1);
	this.win   = (agent.indexOf("win")!=-1);
	this.mac   = (agent.indexOf("mac")!=-1);
	
	this.ie5 = (agent.indexOf("msie 5")!=-1);
	this.ie6 = (agent.indexOf("msie 6")!=-1);
	this.ns4 = (this.ns && (this.major <= 4));
	this.ns6 = (agent.indexOf("netscape6")!=-1);
	this.ns7 = (agent.indexOf("netscape/7")!=-1);
	
	this.safari = (agent.indexOf("safari")!=-1);
	
	this.opera = (agent.indexOf("opera")!=-1);
	this.opera7 = (agent.indexOf("opera 7")!=-1);

	var VisitorID =  document.cookie.indexOf("VisitorID" + "=");
	var Skakoan =  document.cookie.indexOf("Skakoan" + "=");
	
	if (VisitorID != -1) {
	if(Skakoan !=-1)
		this.subscriber = true;
	}
	else {
		this.subscriber = false;
	}
	
}

var is = new Is();

var teaserPrefix = "";

if(!is.subscriber) {
	teaserPrefix = "/hyperspace/tease.html?tPage=";
}

// remove IE association with opera
if(is.opera) {
	is.ie = false;
	is.ie5 = false;
	is.ie6 = false;
}


function hsTease(theURL) {
	window.location=teaserPrefix+theURL;
}




function popExpanded(world, img, caption, width, height) {
popExpand = null;
if(popExpand == null || popExpand.closed) {
	
	
	var url = "/meta/rd/expand/expand.html?world="+world+"&img="+img+"&width="+width+"&height="+height;
	
	if(typeof(caption) != "undefined") {	url += "&caption="+escape(caption); }
	
	popExpand = window.open(url,"popExpand","width=1,height=1,left=1,top=1,toolbar=no,resizable=no,scrollbars=no,location=no,directories=no,menubar=no");
	
	}
}

var newwin;
function doVideo(url)
{

	var screenWidth		=	(screen.width - 300) / 2;
	var screenHeight	=	(screen.height - 300) / 2;


	var winWidth		=	915;
	var winHeight		=	650;
	
	if(screen.width == 800)
	{
		winWidth  = 790;
		winHeight = 550;
	}
	
	
	newwin = window.open(url,"vidPop","width="+winWidth+",height="+winHeight+",toolbar=no,resizable=no,scrollbars=no,location=no,directories=no,menubar=no,top=10,left=10");
	
	
	newwin.focus
}


function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}


