function initFlash()
{
    if ( isUpgradeableFlashVersion() )
    {
		var theContentDiv = document.getElementById("content");
		theContentDiv.style.height = "960px";
	}
    else
    {
        showContentWithoutFlash();
    }
}

function showContentWithoutFlash()
{
    var theDataDiv = document.getElementById("data");
    theDataDiv.style.overflow = "visible";
    theDataDiv.style.height = "auto";
}

function loadFlash()
{
    if ( isUpgradeableFlashVersion() )
    {
		var flashvars = { };
		var params = { allowScriptAccess:"always", allowNetworking:"all", swliveconnect:"true",
						salign:"TL", scale:"noscale", bgcolor:"#DFECBB", wmode:"transparent" };
		var attributes = { id:"Smilebox" };
		swfobject.embedSWF("/flash/preloader.swf", 
						   "homeSplashSwf",
						   "840",
						   "510",
						   "8.0.0",
						   false,
						   flashvars, params, attributes);		
    }
}

function elementToString(anElement)
{
    var theElementString = "";
    if (anElement.nodeType == 1)
    {
        theElementString = "<" + anElement.nodeName;
        for (var i = 0; i < anElement.attributes.length; i++)
        {
            if (anElement.attributes[i].nodeValue)
            {
                theElementString += " " + anElement.attributes[i].nodeName + '="'
                                    + anElement.attributes[i].nodeValue + '"';
            }
        }
        theElementString +=  ">";

        if (anElement.childNodes.length > 0)
        {
            for (var j = 0; j < anElement.childNodes.length; j++)
            {
                var theChildElementString = elementToString(anElement.childNodes[j]);
                theElementString += theChildElementString;
            }
        }
        theElementString += "</" + anElement.nodeName + ">";
    }
    else if (anElement.nodeType == 3)
    {
        theElementString = anElement.nodeValue;
    }

    return theElementString;
}

function getElement(anElementId)
{
    var theElement = document.getElementById(anElementId);
    var theElementString = elementToString(theElement);
    return theElementString;
}

