﻿// JScript File

function toggleLayer(whichLayer)
    {
    if (document.getElementById)
    {
    // this is the way the standards work
    var style2 = document.getElementById(whichLayer).style;       
    style2.display = style2.display? "":"block";
    }
    else if (document.all)
    {
    // this is the way old msie versions work
    var style2 = document.all[whichLayer].style;
    style2.display = style2.display? "":"block";
    }
    else if (document.layers)
    {
    // this is the way nn4 works
    var style2 = document.layers[whichLayer].style;
    style2.display = style2.display? "":"block";
    }
 }
 
 function showGallery(width, height, moduleid)
{
    day = new Date();
    id = day.getTime();
    width = width;
    height = height;
    
   if( location.host != "localhost" && location.host != "superrtl.synthicon.info")
		URL = "http://" + location.host + "/DesktopModules/EoaGallery/GalleryPopUp.aspx?mid=" + moduleid +"&width=" + width + "&height=" + height;
	
	else if( location.host != "localhost" )
		URL = "http://" + location.host + "/DesktopModules/EoaGallery/GalleryPopUp.aspx?mid=" + moduleid +"&width=" + width + "&height=" + height;
	
	else
		URL = "http://" + location.host + "/superrtl/DesktopModules/EoaGallery/GalleryPopUp.aspx?mid=" + moduleid +"&width=" + width + "&height=" + height;
    
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+ width +',height='+ height +',left = 150, top = 150');");
}

function openTerms(moduleid)
{
day = new Date();
    id = day.getTime();
    width = 400;
    height = 600;
    
   if( location.host != "localhost" && location.host != "superrtl.synthicon.info")
		URL = "http://" + location.host + "/DesktopModules/EoaLottery/TermsOfUse.aspx?mid=" + moduleid;
	
	else if( location.host != "localhost" )
		URL = "http://" + location.host + "/DesktopModules/EoaLottery/TermsOfUse.aspx?mid=" + moduleid;
	
	else
		URL = "http://" + location.host + "/superrtl/DesktopModules/EoaLottery/TermsOfUse.aspx?mid=" + moduleid;
    
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+ width +',height='+ height +',left = 150, top = 150');");
}

function openGame() {
    day = new Date();
    id = day.getTime();
    width = 840;
    height = 620;
    //URL = "http://tcfhe.de/horton/spec_chaser/";
    URL = "http://www.etracker.de/lnkcnt.php?et=SQsMYV&url=http://tcfhe.de/horton/spec_chaser/&lnkname=/Home/Ice Age/Horton/Game/Game/"
    
    window.open(URL, 'horton', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+ width +',height='+ height +',left = 150, top = 150');
}

function showGame(gameID, width, height) {
    day = new Date();
    id = day.getTime();

    if (location.host != "localhost")
        URL = "http://" + location.host + "/DesktopModules/EoaFlashGames/DisplayFlashGame.aspx?game=" + gameID + "&width=" + width + "&height=" + height;
    else
        URL = "http://" + location.host + "/superrtl/DesktopModules/EoaFlashGames/DisplayFlashGame.aspx?game=" + gameID + "&width=" + width + "&height=" + height;


    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+ width +',height='+ height +',left = 150, top = 150');");
}
