
	// Popup Window Code
	function popup(winname, winurl, winopt, winwidth, winheight)
	{
		//var winname = "Popup";
		height = screen.availHeight;
		height = (height - winheight) / 2;
		width  = screen.availWidth;
		width  = (width - winwidth) / 2;
		winopt = winopt + ",left=" + width + ",top=" + height + ",width=" + winwidth + ",height=" + winheight;
		var newwin  = window.open(winurl,winname,winopt);
                return newwin;
	}

 // Choose Judges Popup Window
        function JudgesPopup( itemid )
        {
           top.newwin = popup('JudgesPopup','http://www.newyorkfestivals.tv/nyfajudges/','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,resizable=0','810','400')
        }


        // Choose Category Popup Window
        function ChooseCategory( cmptnid )
        {
           top.newwin = popup('CategorySelect','pop/category.php?CmptnID=' + cmptnid,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,copyhistory=0,resizable=0','500','550')
        }


        // Choose Category Popup Window
        function CreditsPopup( itemid )
        {
           top.newwin = popup('CreditsPopup','main.php?ItemID=' + itemid,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,copyhistory=0,resizable=0','500','550')
        }


        // ShowInstructions
        function ShowInstructions( path, section )
        {
           var randomNumber = Math.floor(Math.random() * 200000)
           top.newwin = popup('ShowInstructions','main.php?p=' + path + '&rand='+ randomNumber + '#' + section,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,copyhistory=0,resizable=0','500','550')
           }
           
    // Episode Select
	   function test(what)
	   {
	       if(what == 0)
	       {
	       if (document.Entry.plid[what].checked)
	            document.Entry.t1.disabled=false;
	            document.getElementById('layer1').style.display = 'none';
	       }
	       else
	       {
	       if (document.Entry.plid[what].checked)
	            document.Entry.t1.disabled=false;
	            document.getElementById('layer1').style.display = 'block';
	       }
	   }
	   
	   
function setIDContents(id,string)
{
  if (document.getElementById)
  {
    theVisibleDiv           = document.getElementById(id);
    theVisibleDiv.innerHTML = string;
  }
}
