/* Javascript functions */

// open map in a new window
function Testik() {
alert('Testik');
}

// Replace white and multiple spaces from the string
function trimString(str) {
  str = str.replace(/\s*$/, "");	// this is RTrim
  str = str.replace(/^\s*/, "");	// this is LTrim
  str = str.replace(/\s+/g, " ");	// replace multiple space
  return str;
}

// replace all non-numerical characters from the string
function checkNumber(str) {
  var s;
  s = str.replace(/\D/g, "");	// replace all non-numerical characters
  return s;
}

// open map in a new window
function ShowMap(xx, num) {
	var fname = 'images/stories/'+xx+'/contact_us/map'+num+'v.gif';
	var params = 'width=520,height=520,toolbar=0,directories=0,menubar=0,status=yes,resizable=1,location=0,copyhistory=0,left=20,top=20';
	window.open(fname, 'mapWin', params);
	// return false;
}
