function openvrmWindow(url, name) {
	var a;
	a=openvrmWindow.arguments; 
	if (a.length > 2 ) {
		winWidth = a[2];
		winHeight = a[3];
	}
	else {
		winWidth = 550;
		winHeight = 450;
	}
	
	popupWin = window.open(url, name,"menubar=no,toolbar=no,location=no,status=yes,resizable,dependent,scrollbars,width="+winWidth+",height="+winHeight+",left=250,top=50");
	if (window.focus) { 
 		popupWin.focus();
	}
	
}

function ValEmail (obj, msg) {
    var str = obj.value;
    if ( str != "" ) {
		if ( !str.match(/^\w+([\.\-]\w+)*@\w+([\.\-]\w+)*\.\w+$/)) {
			if ( msg == "" ) {
                alert('Please check your email address to make sure it is correct!');
            }
            else {
                alert(msg);
            }
			obj.focus();  //
			return false;
		}
		else {
			return true;
		}
	}
	else {	
		alert ('Please enter your Email Address!');
		obj.focus();
		return false;
	}
}

function checkFax (objFaxField,msg)  {

    var str = objFaxField.value;
    if ( str != "" ) {

	if ( !str.match(/^[01\+]([ \(\)\.\-\w])*$/) ) {
			if ( msg == "" ) {
                alert('Fax number must start with 1 for US and Canada\nand with + for all other countries.  \n             Examples:\nUS and Canada: 1-800-123-7654\nOther countries: +971-1-233-5516');
            }
            else {
                alert(msg);
            }
			objFaxField.focus();  //
			return false;
	}
	}
	return true;
}

