	function OpenCustomPopUp(url, width, height, scroll){
		var ar = new Array(width, height);
		width += 6 + (20);
		height += 25 + (58 + 30);
		if (scroll == 1) {
			width += 20;
			height += 20;
		}
		if (window.showModalDialog) {
			window.showModalDialog(url, ar, 'dialogWidth=' + width + 'px;dialogHeight=' + height + 'px;dialogLeft=' + parseInt(parseInt(parseInt(document.body.offsetWidth,10) - width,10)/2,10) + 'px;dialogTop=' + parseInt(parseInt(parseInt(screen.height,10) - height,10)/2,10) + 'px;help=0;status=0;scroll=' + scroll + ';unadorned=1');
		} else {
			window.open(url, 'customPopUp',	'height=' + height + ',width=' + width + ',toolbar=no,left=' + parseInt(parseInt(parseInt(document.body.offsetWidth,10) - width,10)/2,10) + ',top=' + parseInt(parseInt(parseInt(screen.height,10) - height,10)/2,10) + ',directories=no,status=no,menubar=no,scrollbars=' + scroll + ',resizable=no,modal=yes');
		}
	}

	function OpenEVoicePopUp(email){
		if (trim(email) == ''){
			return true;
		}
		width = 300;
		height = 130;
		var ar = new Array(width, height);
		width += 6 + (20);
		height += 25 + (58 + 30);
		if (window.showModalDialog) {
			window.showModalDialog(sEVoiceCallLink + '&email=' + email, ar, 'dialogWidth=' + width + 'px;dialogHeight=' + height + 'px;dialogLeft=' + parseInt(parseInt(parseInt(document.body.offsetWidth,10) - width,10)/2,10) + 'px;dialogTop=' + parseInt(parseInt(parseInt(screen.height,10) - height,10)/2,10) + 'px;help=0;status=0;scroll=0;unadorned=1');
		} else {
			window.open(sEVoiceCallLink + '&email=' + email, 'customPopUp',	'height=' + height + ',width=' + width + ',toolbar=no,left=' + parseInt(parseInt(parseInt(document.body.offsetWidth,10) - width,10)/2,10) + ',top=' + parseInt(parseInt(parseInt(screen.height,10) - height,10)/2,10) + ',directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes');
		}
	}

	function lTrim(s) {
		while (1) {
			if (s.substring(0, 1) != ' ') break;
				s = s.substring(1, s.length);
		}
		return s;
	}
	
	function rTrim(s) {
		while (1) {
			if (s.substring(s.length - 1, s.length) != ' ') break;
			s = s.substring(0, s.length - 1);
		}
		return s;
	}
	
	function trim(s) {
		return rTrim(lTrim(s));
	}
