function insertFlashTV() {
document.write('<object id="movie2" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="133" height="122">');
      document.write('<param name="allowScriptAccess" value="sameDomain" />');
      document.write('<param name="movie" id="movie2" value="../x_flash/tv-bears.swf" />');
	  document.write('<param name="wmode" value="transparent" />');
      document.write('<param name="quality" value="high" />');
      document.write('<embed id="movie2" name="movie2" bgcolor="#ffffff" wmode="transparent" src="../x_flash/tv-bears.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="133" height="122" />');
document.write('</object>');
} 

function insertFlashBanner() {
document.write('<object id="movie" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="770" height="116">');
      document.write('<param name="allowScriptAccess" value="sameDomain" />');
      document.write('<param name="movie" id="movie" value="../x_flash/heartbanner.swf" />');
	  document.write('<param name="wmode" value="transparent" />');
      document.write('<param name="quality" value="high" />');
      //document.write('<param name="bgcolor" value="#662A85" />');
      document.write('<embed id="movie" name="movie" wmode="transparent" src="../x_flash/heartbanner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="116" />');
document.write('</object>');
} 

function insertFlashFun() {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="590" height="600">');
      document.write('<param name="allowScriptAccess" value="sameDomain" />');
      document.write('<param name="movie" value="../x_flash/fun-page.swf" />');
	  document.write('<param name="wmode" value="transparent" />');
      document.write('<param name="quality" value="high" />');
      //document.write('<param name="bgcolor" value="#662A85" />');
      document.write('<embed wmode="transparent" src="../x_flash/fun-page.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="590" height="600" />');
document.write('</object>');
} 

// launch the "book" pop-up
function popBook() {
	newwindow=window.open('../book/','book','height=571,width=800,top=15,left=15');
	newwindow.focus();
}

// launch the "art" pop-up
function popArt() {
	newwindow=window.open('../art/','art','height=571,width=800,top=15,left=15');
	newwindow.focus();
}

// launch the "competition" pop-up
function popComp() {
	newwindow=window.open('../competition/','comp','height=550,width=770,top=15,left=15');
	newwindow.focus();
}

// launch the "wallpaper" pop-up
function popWallpaper() {
	newwindow=window.open('../wallpaper/','wallpaper','height=550,width=770,top=15,left=15');
	newwindow.focus();
}

// launch the "games" pop-up
function popGames() {
	flashPause();
	newwindow=window.open('../games/','games','height=550,width=770,top=15,left=15');
	newwindow.focus();
}

// launch the "holiday snaps" pop-up
function popHoliday() {
	newwindow=window.open('../holiday-snaps/?bear=1','holiday','height=550,width=770,top=15,left=15');
	newwindow.focus();
}

// Flash control functions - for pausing the top banner Flash when games running
function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  	if (navigator.appName.indexOf ("Microsoft") !=-1) {
   		return window[movieName]
  	} else {
    	return document[movieName]
 	}
}
function flashPause() {
	thisMovie('movie').StopPlay();
	thisMovie('movie2').StopPlay();
}
function flashUnPause() {
	thisMovie('movie').Play();
	thisMovie('movie2').Play()
}


sfHover = function() {
	var sfEls = document.getElementById("globalnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);