// JavaScript Document - Contains scripts to display dynamic Flash content.
function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

function HideBtmNav()
{
	var flashMovie=getFlashMovieObject("btm_nav");
	flashMovie.GotoFrame(26);
	flashMovie.Play();
}
function ShowBtmNav()
{
	MM_showHideLayers('btmnav_div','','show');
	var flashMovie=getFlashMovieObject("btm_nav");
	flashMovie.GotoFrame(51);
	flashMovie.Play();
	MM_showHideLayers('maincontentframe','','hide');
}
function ShowMainContent(cid)
{
     var flashMovie=getFlashMovieObject("page_main");
     var currentFrame = flashMovie.TCurrentFrame("/textbox");
	 flashMovie.SetVariable("cid", cid);
	 MM_showHideLayers('maincontentframe','','hide');
	 MM_showHideLayers('youtube','','hide');

	 if (currentFrame <= 143) {
	 flashMovie.TGotoFrame("/textbox", 150);
	 flashMovie.TPlay("/textbox");
     flashMovie.TGotoFrame("/background/singer_movie", 50);
	 flashMovie.TPlay("/background/singer_movie");	
	 flashMovie.TGotoFrame("/circle_navigation_container", 80);
	 flashMovie.TPlay("/circle_navigation_container");	
	 }
	 else {
	 flashMovie.TGotoFrame("/textbox", 400);
	 flashMovie.TPlay("/textbox");
	 document.getElementById('maincontentframe').src = "content.asp";
	 }
}
function SetMainContentID() {
    var flashMovie=getFlashMovieObject("page_main");
	var CIDvalue = flashMovie.GetVariable("cid");
	MM_showHideLayers('maincontentframe','','show');
	document.getElementById('maincontentframe').src = "content.asp?content=main&cid="+CIDvalue;
} 

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
