



// Cross-browser event listener
	function listenForEventIn(obj,type,func,bubble){
		if (obj.addEventListener){
			obj.addEventListener(type,func,bubble); // For Presto and Gecko
		}else if ( obj.attachEvent ){
			obj.attachEvent("on" + type, func); // For Trident
		}
	}
	function check(e){
		
		var k;
		if (e.charCode){
			k = e.charCode; // For Gecko
		}else if (e.keyCode){
			k = e.keyCode; // For Presto
		}
		
		if(!isInteger(String.fromCharCode(k)) && k!=8 && k!=9){				
			if ( e.preventDefault ){
				e.preventDefault(); // For Presto and Gecko
			}else{
				return false; // For Trident
			}				
		}
	}
	// Window.onload
	function listenForPhone(itemId){
		var n ;
	
		if(n = document.getElementById(itemId)){				
			if (window.addEventListener || window.attachEvent){
				listenForEventIn(n, "keypress", check, false); // For Presto and Gecko
			}else{
				listenForEventIn(n, "keydown", check, false); // For Trident
			}
		}
	}
	