function writeSWF(url,width,height,key,merchantid)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" id="FF" align="middle"><param name="allowScriptAccess" value="always" /><param name="movie" value="'+url+'Main.swf?screenwidth='+width+'&screenheight='+height+'&key='+key+'&merchantid='+merchantid+'&path='+url+'" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed src="'+url+'Main.swf?screenwidth='+width+'&screenheight='+height+'&key='+key+'&merchantid='+merchantid+'&path='+url+'" allowFullScreen="true" quality="high" bgcolor="#FFFFFF" width="'+width+'" height="'+height+'" name="FF" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
	//document.write('http://furniturefirst.planningwiz.com/Main.swf?screenwidth='+width+'&screenheight='+height+'&key='+key+'&merchantid='+merchantid);
}
function getSize() 
{
    var myWidth = 0;
    var myHeight = 0;
    if (typeof(window.innerWidth) == 'number') 
    {
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } 
    else 
    {
        if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) 
        {
            myWidth = document.documentElement.clientWidth;
            myHeight = document.documentElement.clientHeight;
        } 
        else 
        {
            if (document.body && (document.body.clientWidth || document.body.clientHeight)) 
            {
                myWidth = document.body.clientWidth;
                myHeight = document.body.clientHeight;
            }
        }
    }
    return [myWidth, myHeight];
}
function resize()
{
	var s = getSize();
	var width = s[0];
	var height = s[1];
	var browser=navigator.appName;
	//alert(browser);
	if(browser!='Netscape')
	{
		document.getElementById('PlanningWiz').width=width;
		document.getElementById('PlanningWiz').height=height;
	}
	else
	{
		document.getElementById('PlanningWiz_movie').width=width;
		document.getElementById('PlanningWiz').width=width;
		document.getElementById('PlanningWiz_movie').height=height;
		document.getElementById('PlanningWiz').height=height;
	}
}
function MaximizeW()
{
	var s = getSize();
	var width = s[0];
	var height = s[1];
	var w_temp = screen.availWidth/width;
	var h_temp = screen.availHeight/height;
	if (w_temp >= 1.29 || h_temp >= 2.08) {
		window.moveTo(0,0);
		window.resizeTo(screen.availWidth ,screen.availHeight);
	}
}