var fullscreenWindow = null;

function detectVersion() {
	version = parseInt(navigator.appVersion);
	return version;
}

function detectOS() {
	if(navigator.userAgent.indexOf('Win') == -1) {
		OS = 'Macintosh';
	} else {
		OS = 'Windows';
	}
	return OS;
}

function detectBrowser() {
	if(navigator.appName.indexOf('Netscape') == -1) {
		browser = 'IE';
	} else {
		browser = 'Netscape';
	}
	return browser;
}

function FullScreen(num, cf, xdoc){

	var adjWidth;
	var adjHeight;

	if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape')) {
		adjWidth = 20;
		adjHeight = 35;
	}
	if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE')) {
		adjWidth = 20;
		adjHeight = 35;
		winOptions = 'fullscreen=yes';
	}
	if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape')) {
		adjWidth = 30;
		adjHeight = 30;
	}
	if(detectVersion() < 4) {
		self.location.href = 'oldbrowser.html';
	} else {
		var winWidth = screen.availWidth - adjWidth;
		var winHeight = screen.availHeight - adjHeight;
		var winSize = 'width=' + winWidth + ',height=' + winHeight;
		fullscreenWindow = '/players/hc_full.html?num=' + num + '&cf=' + cf + '&xmldoc=' + xdoc;
		var thewindow = window.open(fullscreenWindow, 'WindowName', winSize);
		thewindow.moveTo(0,0);
		alert(cf);
	}
}


function MakeItSo(num, cf, xdoc){
	if(detectOS() == 'Windows') {
		filename = '/players/hc_full.html?num=' + num + '&cf=' + cf + '&xmldoc=' + xdoc;
		//filename="hc_full.html";
		//fullscreenWindow = window.open(filename,'wn','width='+swidth+',height='+sheight+',resizable=0');
		if (detectBrowser == 'IE') {
			fullscreenWindow = window.open(filename,'','fullscreen=1, resizable=0, scrollbars=0');
		} else {
			swidth = screen.width;
			sheight = screen.height;
			fullscreenWindow = window.open(filename,'','width='+swidth+', height='+sheight+', resizable=0, scrollbars=0');
		}
		fullscreenWindow.moveTo(0,0);
		//alert(filename);
	} else {
		onload=FullScreen(num, cf, xdoc);
	}
}

function getFullScreenFrame(cFrame) {
	var mainmovie = window.document.flashplayer;
	mainmovie.TPlay("/pageMC/videoMC/stonewall");
	mainmovie.TSetProperty("/pageMC/videoMC/stonewall", 7, 0);
	test = mainmovie.TGetProperty("/pageMC/videoMC/blankMC", 5);
	//alert(test + ", " + cFrame);
	if ((cFrame < test) && (cFrame > test - 2)){		
		mainmovie.TGotoFrame("/pageMC/videoMC/vidControlsMC/playpauseMC/", 1);
		mainmovie.TSetProperty("/pageMC/videoMC/screenshotMC", 7, 1);		
		mainmovie.TGotoFrame("/pageMC/videoMC/blankMC", test);
		mainmovie.TPlay("/pageMC/videoMC/vidControlsMC/disableOtherControls()");
	} else {		
		mainmovie.TGotoFrame("/pageMC/videoMC/vidControlsMC/playpauseMC/", 0);
		mainmovie.TGotoFrame("/pageMC/videoMC/blankMC", cFrame);		
		mainmovie.TPlay("/pageMC/videoMC/blankMC");
	}	
}

function pauseFlashMovie() {
	var mainmovie = window.document.flashplayer;
	mainmovie.TPlay("/pageMC/videoMC/stopSpeech");
	mainmovie.TStopPlay("/pageMC/videoMC/blankMC");	
	mainmovie.TGotoFrame("/pageMC/videoMC/vidControlsMC/playpauseMC/", 1);
}

// -->
