var isNav4, isIE4, isNav6 = false; var range = ""; var styleObj = "";
if (navigator.appVersion.charAt(0) >= 4) {
	if (navigator.appName == "Netscape") { if (navigator.appVersion.charAt(0) >= 5) {isNav6 = true;} else {isNav4 = true;}}
	else {isIE4 = true; range = "all."; styleObj = ".style";}
}
function getObject(obj) {var theObj;
	if (typeof obj == "string") {
		if (isNav6) {theObj = document.getElementById(obj); if (theObj != null) theObj = theObj.style;}
		else {theObj = eval("document." + range + obj); if (theObj != null) theObj = eval("theObj" + styleObj);}}
	else {theObj = obj;} return theObj;
}
function show () {var theObj;
	for (var i = 0; i < show.arguments.length; i++) { 
		theObj = getObject(show.arguments[i]);
		if (theObj != null) {
			theObj.display = "block"; theObj.visibility = "visible";
		}
	}
}
function hide () {var theObj;
	for (var i = 0; i < hide.arguments.length; i++) { theObj = getObject(hide.arguments[i]);
		if (theObj != null) { theObj.display = "none"; theObj.visibility = "hidden";}}
}

function play(target, movid, vars){
	document.getElementById(''+target+'').innerHTML= '<embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="'+ vidWidth +'" height="'+ vidHeight +'" wmode="transparent" id="'+movid+'" name="'+movid+'" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="'+vars+'"><\/embed>'
}

function positionVid(linkID, vidBox){
		mavGetObjectPosition(linkID);
		document.getElementById(''+vidBox+'').style.top = eval(yPos-200)+"px";				 
}

function clearVids(vidTarget){
	document.getElementById(''+vidTarget+'').innerHTML= '0'
	document.getElementById(''+vidTarget+'').innerHTML= '0'
}

var offsetTop = 341;

function setSize(){
	theTop = document.body.scrollTop;
	
    if (document.getElementById("videoContainer1") != null) { 
        document.getElementById('videoContainer1').style.top = eval(theTop+offsetTop)+"px"; 
	}

	vidDivHeight = document.getElementById('main').scrollHeight;
	
	if (window.innerWidth) {
		vidDivWidth = window.innerWidth;
	}
	else {
		vidDivWidth = document.body.clientWidth;
	}
	
	document.getElementById('scrim').style.height = eval(vidDivHeight+207)+"px";
	document.getElementById('scrim').style.width = vidDivWidth+"px";	
}

var vidWidth = 432;
var vidHeight = 364;
var thisInfo;

function playVid(vidNum, vidVar) {
	//thisVid = 'vidBoxViewer' + vidNum;
	thisInfo = 'vidInfo' + vidNum;
	show ('scrim', 'videoContainer1', 'vidBoxViewer1', thisInfo);
	setSize ();
	play ('vidBoxViewer1', 'msn_soapbox1', vidVar)
}
function closeIt(){
	hide(thisInfo, 'scrim','videoContainer1'); clearVids('vidBoxViewer1');
}
