// JavaScript Document
function opendemo(url, wdth, ht)
{
	if(arguments.length != 3)
	{
			wdth=820;
			ht=640;
	}
	
	var cmdstring="";
	cmdstring=cmdstring.concat("width=", wdth, ",height=", ht, ", toolbar=no, statusbar=no,location=no,scrollbars=no");
	window.open(url, 'demo', cmdstring);
};

function zoomtofit(requiredwdth)
{
    // Do we have a problem?
    if(screen.width < requiredwdth)
    {
        // Are we IE?
        if (navigator.appName == "Microsoft Internet Explorer")
        {
            alert('Unfortunately these demos require a minimum of a 1280x1024 resolution screen.\n\nWe will attempt to adjust your browser zoom so that you can view the demos, but you will not be seeing them in their native resolution.')
            document.body.style.zoom=screen.width/(requiredwdth+40);
        }
        else
        {
            var err="";
            err=err.concat('Unfortunately these demos require a minimum of a 1280x1024 resolution screen.  Yours appears to be ', screen.width, 'x', screen.height, '.\n\nPlease either adjust your screen resolution to at least 1280x1024 or use the zoom facility of your browser to zoom out on the page in order to see the full demo.\n\nWe apologise for the inconvenience!\n\n(N.b. If you are able to run the demos in Microsoft Internet Explorer you will find that we are able to automatically scale the demo window to fit your screen.)');
            alert(err);
        }
    }
};