	//Init stuff...
              
Rollovers = new Array();

//Functions...

	function FlipItems(state, FlipList)
		{
		for (var item=0; item<FlipList.length; item++)
			{document.getElementById(FlipList[item]).style.display=(state==1)?'inline':'none';}
		}

	function Rollover(state, ImageList)                     
		{
		for (var item=0; item<ImageList.length; item++) 
			{document.getElementById(ImageList[item]).src="/resource/"+ImageList[item]+state+".gif";}
		}

	function CacheRollovers(ImageList)
		{//dummy way of loading into cache; we don't refer to these later...
		for (var item=0; item<ImageList.length; item++) 
			{
			Rollovers[item] = new Image();
			Rollovers[item].src = "/resource/"+ImageList[item]+"1.gif";
			}
		}

	function LoadSubMenu(MenuName) 
		{
		CloseSubMenus();                            
		FlipItems(1,[MenuName]);
		Rollover(1,[MenuName+'_i']);	
		}

	function CloseSubMenus()
		{                     
		FlipItems(0, ['boxoffice','media','tipsscene','interact','tipsinc']);
		Rollover(0, ['boxoffice_i','media_i','tipsscene_i','interact_i','tipsinc_i']);
		ResetWindow();
		}

        function ResetWindow()
        	{           
		/*                                     
		var TableHeight = document.getElementById('main').clientHeight;
		var TopMargin = (document.body.clientHeight - TableHeight)/2;
		if (TopMargin<16) {TopMargin = 16;}
		if (TableHeight<1) {TopMargin = 16;}
		document.body.style.marginTop = TopMargin;
		*/
	        }
	function Validate(FieldArray)
		{
		CompleteForm = true;
		for (var item = 0; item < FieldArray.length; item++)
			{ 
			if (document.getElementById(FieldArray[item]).value.length == 0) {CompleteForm = false;}
			}
		if (!CompleteForm) {alert("Please complete the missing items");}
		return CompleteForm;
		}

	function ValidateSubmit(FieldArray)
		{
		CompleteForm = true;
		for (var item = 0; item < FieldArray.length; item++)
			{ 
			if (document.getElementById(FieldArray[item]).value.length == 0) {CompleteForm = false;}
			}
		if (!CompleteForm)
			{alert("Please complete the missing items");}
		 else
			{document.forms[0].submit();}
		}


	function Newsletter()
		{
		window.open("/interact/newsletter.asp","Newsletter","resizeable=yes,width=200,height=240");		
		}

	function SendMail(MailID)
		{         
		window.open("/mailto.asp?id="+MailID,"SendMail","resizeable=yes,width=400,height=400");		
		}

	function ShowDetail(ID)
		{
		if (ID == '200405280' | ID == '200405290')
			{location.href="/advance/rebirth4life";}
		else
			{window.open("/show.asp?id="+ID,ID);}
		}
	function PastShowDetail(ID)
		{
		location.href="/content/pastshow.asp?id="+ID;
		}
	function FFT2003()
		{
		window.open("/advance/fft2003/fft2003.htm","FFT","dependent=yes,alwaysRaised=yes,resizeable=yes,width=490,height=620,scrollbars=auto");		
		}

	var otliam = "<a href='&#109;&#97;&#105;&#108;&#116;&#111&#58;";
	var ta = "&#64;";
	function MailLink(name, domain, title)
		{
		document.write(otliam+name+ta+domain+"'><name>"+title+"</name></a>");
		}
