/*window.onbeforeunload = function (evt) {
  var message = 'create a free user account in order to save their trading portfolio.';
  if (typeof evt == 'undefined') {
  	alert("1111111111111111");
    evt = window.event;
  }
  if (evt) {
    evt.returnValue = message;
  }
  return message;
}*/
var myWidth = 0;
var myHeight = 0;
function calsize() {
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
    
    
  }
  
  	myWidth = (myWidth -347)/2;
  	myHeight = (myHeight - 235)/2;
}

function showTellAFriendWindow()
{	
	window.open("http://wd.sharethis.com/share3x/lightbox.4.0.0-rc5.html","tellafrind","menubar=0,resizable=no,left="+myWidth+",top="+myHeight+",width=347,height=235");
	//http://wd.sharethis.com/share3x/lightbox.4.0.0-rc5.html

}
function getUrl()
{
	return window.location;
}


 