﻿var logged = false;
function ShowBlock(blockId, event)
{	
    document.images["imgShowType"].src="images/Blocks/"+ blockId +".jpg";
//    if (! logged)
//    {
//        LogUser("BlockTypes");
//        logged = true;
//    }
}
function HideBlock()
{
    document.images["imgShowType"].src="images/Blocks/2001.jpg";
}
var sel;
function Window_onload()
{
    sel = document.getElementById("tdTypes");
    sel.style.backgroundColor = "Lawngreen";
    var imgs = new Array("images/Walls/Wall.gif", "images/Walls/WallFilled.gif", "images/Walls/WallFilledReo.gif", "images/Walls/WallFilledReo2.gif");   
    for (var i=0; i< imgs.length; i++)
    {
        var pre = new Image();
        pre.src = imgs[i];
    }
}
function LogUser(app)
{
    var bug = new Image(); 
    bug.src = "http://www.blocklayer.com/Logger.ashx?p="+ escape(document.location.href.substring(11)) +"&a="+ app;
}
function ShowWall(td, t)
{     
    sel.style.backgroundColor = "";
    td.style.backgroundColor = "Lawngreen";
    sel = td;
    switch (t)
    {
	    case 0:
		    document.images["imgWall"].src = "images/Walls/Wall.gif";
		    break;
	    case 1:
		    document.images["imgWall"].src = "images/Walls/WallTypes.gif";
		    break;
	    case 2:
		    document.images["imgWall"].src = "images/Walls/WallFilled.gif";
		    break;
	    case 3:
		    document.images["imgWall"].src = "images/Walls/WallFilledReo.gif";
		    break;
	    case 4:
		    document.images["imgWall"].src = "images/Walls/WallFilledReo2.gif";
		    break;
    }
}