function poponclick(theURL,winName,features) { //v2.0
  productwindow = window.open(theURL,winName,features);
  productwindow.focus()
}
// JavaScript Document
// Removes leading whitespaces
function LTrim( value ) {
	
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
	
}

// Removes ending whitespaces
function RTrim( value ) {
	
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");
	
}

// Removes leading and ending whitespaces
function trim( value ) {
	
	return LTrim(RTrim(value));
	
}

function check_email(str) 
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str))
	{
		return (true)
	}
	
	return (false)
}


function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||trim(value)=="")
  {alert(alerttxt);return false;}
else {return true}
}
}