// JavaScript Document

function swapframedMovie(){
	 //alert("got the bodytag!");
	 
//alert(nameofclass);{
if(document.getElementById('framedMovie')){
		 var divname = document.getElementById("News");
		if(divname){
    var nameofclass = divname.getAttribute("class");
		if(!nameofclass){nameofclass =divname.className;}
		//alert(nameofclass);
		}
		
		
	//alert(nameofclass);
    if(nameofclass =="Collection"){
      var framee=document.getElementById("framedclip");	
      var frameedy=document.getElementById("framedMovie");
      var righty = document.getElementById("rightMovie");
      var lefty = document.getElementById("leftMovie");
      //framee.style.border = "4px solid #ff0000";
      framee.style.backgroundImage = "none";
      
      righty.style.display='none'
      lefty.style.display='none';
      frameedy.style.backgroundImage='none';
      frameedy.style.margin = "0px";
      framee.style.margin = "0px";
      framee.style.width = "384px";
    } 
  else
    {	
  	var preCode='';
  	var postCode='';	
  	preCode+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="149" height="304" id="left" align="middle">';
  	preCode+='<param name="allowScriptAccess" value="sameDomain" />';
  	preCode+='<param name="movie" value="/flash/yfa/left.swf" />';
  	preCode+='<param name="quality" value="high" />';
  	preCode+='<param name="bgcolor" value="#cfcbcc" />';
  	preCode+='<embed src="/flash/yfa/left.swf" quality="high" bgcolor="#cfcbcc" width="149" height="304" name="left" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
  	preCode+='</object>';
  	
  	//postCode+='<div id="rightMovie" >';
  	//postCode+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="149" height="315" id="right" align="middle">';
  	//postCode+='<param name="allowScriptAccess" value="sameDomain" />';
  	//postCode+='<param name="movie" value="/flash/yfa/left.swf" />';
  	//postCode+='<param name="quality" value="high" />';
  	//postCode+='<param name="bgcolor" value="#d8d8d8" />';
  	//postCode+='<embed src="/flash/yfa/right.swf" quality="high" bgcolor="#d8d8d8" width="149" height="315" name="right" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
  	//postCode+='</object>';
  	//postCode+='</div>';
  	
  	postCode+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="149" height="304" id="right" align="middle">';
  	postCode+='<param name="allowScriptAccess" value="sameDomain" />';
  	postCode+='<param name="movie" value="/flash/yfa/right.swf" />';
  	postCode+='<param name="quality" value="high" />';
  	postCode+='<param name="scale" value="exactfit" />';
  	postCode+='<param name="bgcolor" value="#cfcbcc" />';
  	postCode+='<param name="wmode" value="opaque" />';
  	postCode+='<embed src="/flash/yfa/right.swf" quality="high" scale="exactfit" bgcolor="#cfcbcc" width="149" height="304" name="right" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
  	postCode+='</object>';
  		
  	
    var rightMovie=document.getElementById('rightMovie');
    var leftMovie=document.getElementById('leftMovie');
    
    rightMovie.innerHTML=postCode;
    leftMovie.innerHTML=preCode;
   //alert('replaced?');
  
  
  
	//var ifsrc="<iframe src=\"\" width=\"200\" height=\"200\" name=\"ifsrc\"></iframe>";	 
  
  //f.childNodes[0].outerHTML=preCode+f.childNodes[0].outerHTML+postCode;
  //var g=document.getElementById('framedclip');
  
  
  //qtm[0].outerHTML=qtm[0].outerHTML;
  //f.innerHTML=preCode+movclip+postCode;
  
  
  
  
  //var mobjects=f.getElementsByTagName('embed');
  //alert(mobjects[0].innerHTML);
  //f.outerHTML=f.outerHTML;
  //alert(f.outerHTML);
  //alert(f.innerHTML);
  //ifsrc.document.write="<html><body>"+movclip+"<html><body>";
  
  }
  //else{
  //if(document.getElementById('rightMovie')){
  //  document.getElementById('rightMovie').style.display="none";
  //  document.getElementById('leftMovie').style.display="none";
 // }
  }
}

function loadfunctions(clipno){
	var clipno=clipno;
	drawMenus();
	if(document.getElementById('navmenu')){
					  var themenu=document.getElementById('navmenu');
					  {
						  themenu.style.display='none';
					  }
		}
	if(document.getElementById('staticmenu')){
					  var thestaticmenu=document.getElementById('staticmenu');
					  {
						 thestaticmenu.style.visibility='hidden';
						}
		}
		
		if(isFlashInstalled){
			if(clipno!=''){
			var thefilmstrip="/flash/yfa/loadmovieV3.swf?intfilmid="+clipno+"";
			}else{
			var thefilmstrip="/flash/yfa/loadmovieV3.swf";
			}
			//alert(thefilmstrip);
			//document.write('<div id="flashbanner">');
			//document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="559" height="113 " title="banneranim">');
			//document.write('<param name="movie" value="/flash/yfa/banneranim_3.swf" />');
			//document.write('<param name="quality" value="high" />');
			//document.write('<embed src="/flash/yfa/banneranim_3.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="559" height="113"></embed>');
			//document.write('</object>');
			var bannermov="";//document.write('</div>');
			
			//bannermov+=('<div id="flashbanner">');
			//bannermov+=('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="559" height="113 " title="banneranim">');
			//bannermov+=('<param name="movie" value="/flash/yfa/banneranim_3.swf" />');
			//bannermov+=('<param name="quality" value="high" />');
			//bannermov+=('<embed src="/flash/yfa/banneranim_3.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="559" height="113"></embed>');
			//bannermov+=('</object>');
			//bannermov+=('</div>');
			//alert(bannermov);
			var headerdiv=document.getElementById('header');
			
			headerdiv.innerHTML=headerdiv.innerHTML+bannermov;
			headerdiv.style.backgroundImage="";
			//alert(headerdiv.style.backgroundImage);
			
			//document.write('<div id="flashtoy">');
			//document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="118" height="500" title="toy">');
			//document.write('<param name="movie" value="'+thefilmstrip+'" />');
			//document.write('<param name="quality" value="high" />');
			//document.write('<embed src="'+thefilmstrip+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="118" height="500"></embed>');
			//document.write('</object>');
			//document.write('</div>');
			
			
			swapframedMovie();
		}
		
}
if(filmID==undefined){
var filmID='';	
}
document.onload=loadfunctions(filmID);
