function WriteFlash(SWFfile, width, height)
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'">');
    document.write('<param name="movie" value="'+SWFfile+'">');
    document.write('<param name="quality" value="high">');
    document.write('<embed src="'+SWFfile+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
    document.write('</object>');
}

function WriteFlashCheckSize(SWFfile)
{
      if (screen.availWidth > 1024 && screen.availHeight > 768)
		WriteFlash(SWFfile, '750', '1020');
      else
		WriteFlash(SWFfile, '750', '1020');
}
function popUp(url)
{
	var win = window.open(url,"a", "width="+screen.availWidth+",height="+screen.availHeight+",top=0,left=0,resizable=no,status=no");
	if (document.all) 
	{
		win.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById) 
	{
		if (win.outerHeight<screen.availHeight||win.outerWidth<screen.availWidth)
		{
			win.outerHeight = screen.availHeight;
			win.outerWidth = screen.availWidth;
		}	
	}	
}
