/*******************************************************************************
*
* © 2010 Copyright A-Vision
*
* File description :       Web site / application COMMON.JS
* 
* Created by       :       Arnold Velzel
* Created on       :       DD/MM/YYYY
*
* Last changed by  :       Arnold Velzel
* Last changed on  :       <LastChanged>
* 
*******************************************************************************/

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

function isNum( value)
{
 var str = new String( value);
 return( str.isNum());
}
function isFloat( value)
{
 var str = new String( value);
 return( str.isFloat());
}

String.prototype.isNum = function() {
 if (this=="") return(false);
 var regex = /[^0-9\-]/;
 return !regex.test( this);
};

String.prototype.isFloat = function()
{
 if (this=="") return(false);
 var regex = /[^0-9\.\-]/;
 return !regex.test( this);
}

function cancelEvent(e)
{
 if ( !e) e = window.event;
 if ( e.stopPropagation) e.stopPropagation();
 e.cancelBubble = true;
}

