function addLoadEvent(func)
{
var oldonload = window.onload;
if (typeof window.onload != 'function')
{
window.onload = func;
}
else
{
window.onload = function()
{
if (oldonload)
{
oldonload();
}
func();
}
}
}
function launchLogo()
{
//putting this here to simplify the add load event on homepage
setTimeout("objFlashLogo.write('flash_logo_animated')",3000);
setTimeout("resetLogo()",5500);
}
function resetLogo()
{
//this needs to happen because flash logo overlays active elements below the header and renders them unreachable by mouse in some browsers
//there was no way to put these elements over the flash but under the dropdown navs while also keeping flash over the background image of the header across all browsers
//so flash movie is replaced by image and containing div is shrunk to reveal elements
strImage="
";
document.getElementById('flash_logo_animated').innerHTML=strImage;
if(navigator.userAgent.indexOf("Macintosh")>-1 && navigator.userAgent.indexOf("Firefox")>-1)
{
document.getElementById("flash_logo_animated").style.zIndex = 'auto';
}
}
function openPile(videoKey) {
var params = '';
if (videoKey != null)
params = '?fromPilePlayer=true&video_key=' + videoKey;
//new video detail page
var url = 'http://www.g4tv.com/video_detail.aspx' + params;
location.href = url;
return;
}
function openPileTab(categoryKey) {
var params = '';
if (categoryKey != null)
params = '?fromPilePlayer=true&category_key=' + categoryKey;
//new video detail page
var url = 'http://www.g4tv.com/video_detail.aspx' + params;
location.href = url;
return;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function playsound(SoundFileUrl) {
new Insertion.Bottom(document.body, "