var popup_window;

function fullScreen(section, index) {
	popup('fullScreen.php?section='+section+'&index='+index);
}

function closeFullScreen() {
	if (popup_window) {
		popup_window.close();
		popup_window = null;
	}
}

function closeSelf() {
	if (window.opener && !window.opener.closed) {
		window.opener.stopPlaying();
	}
	window.close();
}

function popup(URL) {
	var features =
		'width=' + screen.availWidth + 
		',height=' + screen.availHeight + 
		',left=0' + 
		',top=0' +
		',resizable=yes' +
		',scrollbars=no';
			
	if (!popup_window) 
	{
		popup_window = window.open (URL, 'Go2Productions', features);
		if (popup_window) popup_window.focus();
	}
}

function resumePlaying() {
	if (window.opener && !window.opener.closed) {
		window.opener.continuePlaying();
	}
}

function continuePlaying() {
	popup_window = null;
	getSWF().continuePlaying();
}

function stopPlaying() {
	popup_window = null;
	getSWF().stopPlaying();
}

function getSWF() {
	var movieName = 'swf';
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    } else {
        return document[movieName];
    }
}

function mailTo(){
	var a,b,c,d;a=mailTo.arguments;var b=a[0];var c="";for(var i=0;i<10;i++){var d=b.indexOf(i)+1;c+=a[d];}document.write(c);
}

function showEnter() {
	var el = document.getElementById('enter');
	el.innerHTML = '<a href="http://www.adamadgroup.com/">Click to Enter</a>';
}