$(document).ready(function() {
	//Tooltip
	$('.toolTip').hover(
		function() {
			this.tip = this.title;
			$(this).append('<span class="toolTipInfo"><img src="images/tooltip_arrow.gif" class="toolTipArrow"/>'+this.tip+'</span>');
			this.title = "";			
			$('.toolTipInfo',this).fadeIn(300);
	},
		function() {
			$('.toolTipInfo',this).fadeOut(100);
			this.title = this.tip;
		}
	);
});

// Return false, specially for windows vista ie 7
function retFalse()
{
	try
	{
		// VISTA IE 7
		window.event.returnValue = false;
	} catch (error)
	{
		// ALL OTHER (MOZILLA, OPERA, SAFARI, IE 6 & 7 ON XP)
		return false;
	}
}

function windowHeight() {
  var myWidth = 0, myHeight = 0;
  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;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  return myHeight;
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}
