- Checking your email every ten minutes.
- Having everything finished on your to do list.
- Having an immaculately clean house.
- Trying to please everyone.
- Seeking praise and popularity.



<UserControl x:Class="JavascriptTest.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300"
Name="Xaml1">
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel>
<TextBox Name="NameTxt" Width="500" Height="20"></TextBox>
<Button Name="NameBtn" Content="Send to JS"></Button>
</StackPanel>
</Grid>
</UserControl>
namespace JavascriptTest
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
NameBtn.Click += new RoutedEventHandler(NameBtn_Click);
HtmlPage.RegisterScriptableObject("navObj", this);
}
void NameBtn_Click(object sender, RoutedEventArgs e)
{
HtmlPage.Window.Invoke("ExecuteAnimation", NameTxt.Text);
}
[ScriptableMember()]
public void SendMessage(string state)
{
MessageBox.Show("Message reached SL");
}
}
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>JavascriptTest</title>
<script type="text/javascript">
function ExecuteAnimation(params) {
loadexcel(params);
alert("Hello, World");
}
function load() {
var ctrl = $get("Silverlight1");
ctrl.Content.navObj.SendMessage('Hello');
}
function loadexcel(params) {
var ExcelSheet;
ExcelSheet = new ActiveXObject("Excel.Application");
ExcelSheet.Workbooks.Open(params);
//ExcelSheet.Visible = true;
// Place some text in the first cell of the sheet.
ExcelSheet.ActiveSheet.Cells(1, 1).Value = "This is column A, row 1";
// Save the sheet.
ExcelSheet.SaveAs("C:\\TEST.XLS");
// Close Excel with the Quit method on the Application object.
ExcelSheet.Quit();
// Release the object variable.
ExcelSheet = "";
}
</script>
<style type="text/css">
html, body {
height: 100%;
overflow: auto;
}
body {
padding: 0;
margin: 0;
}
</style>
</head>
<body >
<form id="form1" runat="server" style="height:100%;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div style="height:90%;">
<asp:Silverlight ID="Silverlight1" runat="server" Source="~/ClientBin/JavascriptTest.xap" MinimumVersion="3.0.40307.0" Width="100%" Height="100%" />
</div>
<input type="submit" onclick="load()" />
<input type="submit" onclick="loadexcel()" />
</form>
</body>
</html>

Image by Jodene via Flickr
Promised bailouts mean that anyone lending money to Wall Street — ranging from small-time savers like you and me to the Chinese government — doesn’t have to worry about losing that money. The United States Treasury (which, in the end, is also you and me) will cover the losses.
The knowledge among lenders that their money will ultimately be returned, no matter what, clearly brings a terrible downside. It keeps the lenders from asking tough questions about how their money is being used.
When people are protected from the consequences of risky behavior, they behave in a pretty risky fashion. Bankers can make long-shot investments, knowing that they will keep the profits if they succeed, while the taxpayers will cover the losses.
Merrill Lynch’s losses from the last two years wiped out its profits from the previous decade.
Banks borrowed money from lenders around the world. The bankers then kept a big chunk of that money for themselves, calling it “management fees” or “performance bonuses.” Once the investments were exposed as hopeless, the lenders — ordinary savers, foreign countries, other banks, you name it — were repaid with government bailouts. In effect, the bankers had siphoned off this bailout money in advance, years before the government had spent it.
The federal government needs the power and the will to take over a firm as soon as its potential losses exceed its assets. Anything short of that is an invitation to loot.
Image by ...-Wink-... via Flickr
Image by Getty Images via Daylife