var baseUrl = "http://server1.sc-streaming.com/demos/sc/demosPlayer/"

var speed = 10; // Delay between increments.
var initialInc = 20;
var inc = initialInc; // Increment amount -- also changes speed

var fullHeight = 500
var startHeight = fullHeight-125;
var expand;
var current;
var obj;

function setPage() {
	hrefString = document.location.href ? document.location.href : document.location;

	var playerTypeArr = hrefString.split('?')
	var playerType = playerTypeArr[1];
	if (playerType == "players") {
		//retractWin('footer');
		setTimeout(openPlayers, 50)
	}
}
function openPlayers() {
	thisMovie("flash").startAtPlayers();
}

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}

function setStart(id) {
	obj = document.getElementById(id);
	obj.style.top = fullHeight+'px';
	
	javascript:top.frames['frame'].location = baseUrl+'pages/footer.html';
	
	setPage();
}
function resizeExpand(startHeight, fullHeight, current, id) {
		
		i = current + inc;
		inc = inc-(inc*0.15);
		obj.style.top = i+'px';;
		if (current <  fullHeight) {
			var resizeInt = window.setTimeout("resizeExpand("+startHeight+", "+fullHeight+", "+i+", '"+id+"'), speed");
		} else { 
			obj.style.top = fullHeight+'px';;
			inc = initialInc;
		}		
}
function resizeRetract(startHeight, fullHeight, current, id) {
		j = current - inc;
		inc = inc-(inc*0.15);
		obj.style.top = j+'px';;
		if (current > startHeight) {
			var resizeInt = window.setTimeout("resizeRetract("+startHeight+", "+fullHeight+", "+j+", '"+id+"'), speed");
		} else { 
			obj.style.top = startHeight+'px';
			inc = initialInc;
		}		
}
function expandWin(id) {
	resizeExpand(startHeight, fullHeight, startHeight, id)
}
function retractWin(id) {
	resizeRetract(startHeight, fullHeight, fullHeight, id)
}
function openPage(pageName) {
	javascript:top.frames['frame'].location = pageName;
	return true;
}
