function CreateFlash(divId, width, height, url)
{
	var d = document.getElementById(divId);
	d.innerHTML = '<embed pluginspage=http://www.macromedia.com/go/getflashplayer align=baseline src='+url+' width='+width+' height='+height+' type=application/x-shockwave-flash quality="high"></embed>';
}
function FormatCost(cost, currencySymbol, decimalPlaces)
{
    var iDecimalPlaces = parseInt(decimalPlaces);
    var multiplier = Math.pow(10, iDecimalPlaces);
    var fCost = parseFloat(cost);
    fCost = Math.round(fCost*multiplier) / (multiplier*1.0);
    var sCost = currencySymbol+fCost;
    var indexOfPoint = sCost.indexOf('.');
    var extraZeros;
    if (indexOfPoint == -1)
    {
        sCost += '.';
        extraZeros = decimalPlaces;
    }
    else
        extraZeros = indexOfPoint - (sCost.length-iDecimalPlaces-1);
    for (var i=0; i<extraZeros; i++)
        sCost += '0';
    return sCost;
}
function getWindowHeight()
{
    var windowHeight = 0;
    if (typeof(window.innerHeight) == 'number')
	    windowHeight = window.innerHeight;
	else
	{
	    if (document.documentElement && document.documentElement.clientHeight)
		    windowHeight = document.documentElement.clientHeight;
	    else if (document.body && document.body.clientHeight)
			windowHeight = document.body.clientHeight;
	}
    return windowHeight;
}
function getWindowWidth()
{
    var windowWidth = 0;
    if (typeof(window.innerWidth) == 'number')
	    windowWidth = window.innerWidth;
	else
	{
	    if (document.documentElement && document.documentElement.clientWidth)
		    windowWidth = document.documentElement.clientWidth;
	    else if (document.body && document.body.clientWidth)
			windowWidth = document.body.clientWidth;
	}
    return windowWidth;
}