|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/conceptlabs1/viateq/demo/ |
Upload File : |
/***************************************************
DATE: May 15, 2017
AUTHOR: VIATEQ CORPORATION / Dennis R. Dunston
DESCRIPTION: This Javascript helps to resolve form inputs and menu behavior.
***************************************************/
var str_html = "";
/*************************
*************************/
function check_date_required(id) {
var d = new Date();
var n = d.getMonth()+1+"/"+d.getDate()+"/"+d.getFullYear();
document.getElementById(id).setAttribute('value',n);
return true;
}
/*************************
*************************/
function noNumbers(e) {
keynum = e.which;
alert(keynum);
if (keynum == 13)
document.getElementById("Address1").focus();
}
/*************************
Sleep - This functions was created for GoogleChrome which does not respond the checkbox quickly.
*************************/
function sleep(delay) {
var start = new Date().getTime();
while (new Date().getTime() < start + delay);
}
/*************************
*************************/
function disableEnterKey(e) {
var key;
if(window.event)
key = window.event.keycode; // IE
else
key = e.which;
return (key !=13);
}
/***************************************************
Check Email
***************************************************/
function check_email(id) {
var regex = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
tel = document.getElementById('Telephone1').value;
if (str.length > 0) {
if (str.length < 3 || str.match(regex) == null) {
alert("請重新輸入電子郵件地址。");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
return true;
}
return true;
}
/***************************************************
Check Email
***************************************************/
function check_email_and_telephone(id) {
var regex = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
tel = document.getElementById('Telephone1').value;
if (str.length > 0) {
if (str.length < 3 || str.match(regex) == null) {
alert("請重新輸入電子郵件地址。");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
return true;
}
else
{
if (str.length == 0 && tel.length == 0) {
alert("請輸入您的電子郵件地址或電話。");
//alert("Required Field. Please enter your email address or telephone.");
document.getElementById('Telephone1').focus();
document.getElementById('Telephone1').select();
return false;
}
}
return true;
}
/***************************************************
Check Email
***************************************************/
function check_email_not_required(id) {
var regex = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.length < 3 || str.match(regex) == null) {
alert("請重新輸入電子郵件地址。");
document.getElementById(id).focus();
document.getElementById(id).select();
//document.getElementById(id).value =" ";
return false;
}
}
return true;
}
/***************************************************
Check Email
***************************************************/
function check_contact_email(id) {
var regex = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.length < 3 || str.match(regex) == null) {
alert("請重新輸入您的聯繫電子郵件地址。");
document.getElementById(id).focus();
document.getElementById(id).select();
//document.getElementById(id).value =" ";
return false;
}
}
return true;
}
/***************************************************
Attorney Email
***************************************************/
function check_attorney_email(id) {
var regex = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.length < 3 || str.match(regex) == null) {
alert("請重新輸入您的代表或律師電子郵件地址。");
document.getElementById(id).focus();
document.getElementById(id).select();
//document.getElementById(id).value =" ";
return false;
}
}
return true;
}
/***************************************************
Check Telephone
***************************************************/
function check_agency_telephone(id) {
//var regex = /^[0-9]+$/;
var regex = /^[0-9-() ]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length < 10 || str.length > 12 || str.match(regex) == null) {
alert("請重新輸入您的代理機構電話號碼999-999-9999。");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
return true;
}
/***************************************************
Check Telephone
***************************************************/
function check_telephone(id) {
//var regex = /^[0-9]+$/;
var regex = /^[0-9-() ]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length < 10 || str.length > 12 || str.match(regex) == null) {
alert("請重新輸入電話號碼999-999-9999。");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
return true;
}
/***************************************************
Company Telephone
***************************************************/
function check_company_telephone(id) {
//var regex = /^[0-9]+$/;
var regex = /^[0-9-() ]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length < 10 || str.length > 12 || str.match(regex) == null) {
alert("請重新輸入電話號碼999-999-9999。");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
return true;
}
/***************************************************
Check Telephone Required
***************************************************/
function check_telephone_required(id) {
var regex = /^[-0-9]+$/;
//var regex = /^[0-9-() ]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
// Check values
str1 = document.getElementById('Home1').checked;
str2 = document.getElementById('Work1').checked;
str3 = document.getElementById('Cell1').checked;
if (str.length < 10 || str.length > 12 || str.match(regex) == null) {
alert("請重新輸入電話號碼999-999-9999。");
document.getElementById(id).focus();
document.getElementById(id).select();
document.getElementById("Home1").checked = false;
document.getElementById("Work1").checked = false;
document.getElementById("Cell1").checked = false;
document.getElementById('Home1').disabled = false;
document.getElementById('Work1').disabled = false;
document.getElementById('Cell1').disabled = false;
return false;
}
else
{
// If none of the boxes are checked select home as default..
if (str1 == false && str2 == false && str3 == false) {
//alert("checkbox home is: false");
document.getElementById("Home1").checked = true;
document.getElementById("Work1").checked = false;
document.getElementById("Cell1").checked = false;
document.getElementById('Home1').disabled = false;
document.getElementById('Work1').disabled = false;
document.getElementById('Cell1').disabled = false;
document.getElementById('Home1').focus();
document.getElementById('Home1').select();
return true;
}
return true;
}
}
/***************************************************
Check Telephone Not Required for complainant
***************************************************/
function check_telephone_not_required2(id) {
var regex = /^[-0-9]+$/;
//var regex = /^[0-9-() ]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
// Check values
str1 = document.getElementById('Home1').checked;
str2 = document.getElementById('Work1').checked;
str3 = document.getElementById('Cell1').checked;
if (str.length > 0) {
if (str.length < 10 || str.length > 12 || str.match(regex) == null) {
alert("請重新輸入電話號碼999-999-9999。");
document.getElementById(id).focus();
document.getElementById(id).select();
document.getElementById("Home1").checked = false;
document.getElementById("Work1").checked = false;
document.getElementById("Cell1").checked = false;
document.getElementById('Home1').disabled = false;
document.getElementById('Work1').disabled = false;
document.getElementById('Cell1').disabled = false;
return false;
}
}
else
{
document.getElementById("Home1").checked = false;
document.getElementById("Work1").checked = false;
document.getElementById("Cell1").checked = false;
document.getElementById('Home1').disabled = false;
document.getElementById('Work1').disabled = false;
document.getElementById('Cell1').disabled = false;
}
return true;
}
/***************************************************
Check Telephone Not Required
***************************************************/
function check_telephone_not_required(id) {
var regex = /^[-0-9]+$/;
//var regex = /^[0-9]-+$/;
//var regex = /^[0-9-() ]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
// Check values
str1 = document.getElementById('Home1').checked;
str2 = document.getElementById('Work1').checked;
str3 = document.getElementById('Cell1').checked;
if (str.length < 10 || str.length > 12 || str.match(regex) == null) {
alert("請重新輸入電話號碼999-999-9999。");
document.getElementById(id).focus();
document.getElementById(id).select();
document.getElementById("Home1").checked = false;
document.getElementById("Work1").checked = false;
document.getElementById("Cell1").checked = false;
document.getElementById('Home1').disabled = true;
document.getElementById('Work1').disabled = true;
document.getElementById('Cell1').disabled = true;
return false;
}
else
{
// If none of the boxes are checked select home as default..
if (str1 == false && str2 == false && str3 == false) {
//alert("checkbox home is: false");
document.getElementById("Home1").checked = true;
document.getElementById("Work1").checked = false;
document.getElementById("Cell1").checked = false;
document.getElementById('Home1').disabled = false;
document.getElementById('Work1').disabled = false;
document.getElementById('Cell1').disabled = false;
document.getElementById('Home1').focus();
document.getElementById('Home1').select();
return true;
}
}
return true;
}
/***************************************************
Telephone for Point of Contact
***************************************************/
function check_contact_telephone(id) {
var regex = /^[-0-9]+$/;
//var regex = /^[0-9]-+$/;
//var regex = /^[0-9-() ]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
// Check values
str1 = document.getElementById('Home2').checked;
str2 = document.getElementById('Work2').checked;
str3 = document.getElementById('Cell2').checked;
if (str.length < 10 || str.length > 12 || str.match(regex) == null) {
alert("請重新輸入您的聯繫電話號碼999-999-9999。");
document.getElementById(id).focus();
document.getElementById(id).select();
document.getElementById("Home2").checked = false;
document.getElementById("Work2").checked = false;
document.getElementById("Cell2").checked = false;
// document.getElementById('Home2').disabled = true;
// document.getElementById('Work2').disabled = true;
// document.getElementById('Cell2').disabled = true;
return false;
}
else
{
// If none of the boxes are checked select home as default..
if (str1 == false && str2 == false && str3 == false) {
//alert("checkbox home is: false");
//document.getElementById("Home2").checked = false;
//document.getElementById("Work2").checked = false;
//document.getElementById("Cell2").checked = false;
//document.getElementById('Home2').disabled = false;
//document.getElementById('Work2').disabled = false;
//document.getElementById('Cell2').disabled = false;
//document.getElementById('Home2').focus();
//document.getElementById('Home2').select();
return true;
}
}
return true;
}
/***************************************************
Telephone for Attorney
***************************************************/
function check_attorney_telephone(id) {
var regex = /^[-0-9]+$/;
//var regex = /^[0-9]-+$/;
//var regex = /^[0-9-() ]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length < 10 || str.length > 12 || str.match(regex) == null) {
alert("請重新輸入您的代表或律師電話號碼999-999-9999。");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
return true;
}
/***************************************************
Check Zip code 2
***************************************************/
function check_zipcode2(id) {
var regex = /^[0-9-+]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請重新輸入郵遞區號:如99999或99999-9999。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check to make sure a state is selected
***************************************************/
function check_state_selected(id) {
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length < 1 ) {
//alert("Required Field. Please select a state from the drop down list.");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
else
{
//document.getElementById('Zipcode1').select();
// document.getElementById('Zipcode1').focus();
return true;
}
}
/***************************************************
Check Zip code
***************************************************/
function check_zipcode(id) {
var regex = /^[0-9-+]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.length == 5 || str.length == 10 || str.length == 9) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請重新輸入郵遞區號:如99999或99999-9999。");
document.getElementById(id).select();
//document.getElementById('Zipcode1').focus();
//document.getElementById('Zipcode1').value =" ";
return false;
}
}
else
{
alert("請重新輸入郵遞區號:如99999或99999-9999。");
document.getElementById(id).select();
return false;
}
}
return true;
}
/***************************************************
Check Zip code
***************************************************/
function check_company_zipcode(id) {
var regex = /^[0-9-+]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.length == 5 || str.length == 10 || str.length == 9) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請重新輸入郵遞區號:如99999或99999-9999。");
document.getElementById(id).select();
//document.getElementById('Zipcode1').focus();
//document.getElementById('Zipcode1').value =" ";
return false;
}
}
else
{
alert("請重新輸入郵遞區號:如99999或99999-9999。");
document.getElementById(id).select();
return false;
}
}
return true;
}
/***************************************************
Contact Zip code
***************************************************/
function check_contact_zipcode(id) {
var regex = /^[0-9-+]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.length == 5 || str.length == 10 || str.length == 9) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請重新輸入您的聯絡郵箱:99999或99999-9999。");
document.getElementById(id).select();
//document.getElementById('Zipcode1').focus();
//document.getElementById('Zipcode1').value =" ";
return false;
}
}
else
{
alert("請重新輸入您的聯絡郵箱:99999或99999-9999。");
document.getElementById(id).select();
return false;
}
}
return true;
}
/***************************************************
Check Zip code
***************************************************/
function check_attorney_zipcode(id) {
var regex = /^[0-9-+]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.length == 5 || str.length == 10 || str.length == 9) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請重新輸入代理人或代理人郵政編碼:99999或99999-9999。");
document.getElementById(id).select();
//document.getElementById('Zipcode1').focus();
//document.getElementById('Zipcode1').value =" ";
return false;
}
}
else
{
alert("請重新輸入代理人或代理人郵政編碼:99999或99999-9999。");
document.getElementById(id).select();
return false;
}
}
return true;
}
/***************************************************
Check State name for special characters and blanks
***************************************************/
function check_state_required(id){
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length < 1) {
alert("必填欄位,請由下拉選單選取州。");
//document.getElementById(id).value ="";
document.getElementById(id).select();
//document.getElementById(id).focus();
return false;
}
else
{
//alert("Required Field. State ok.");
return true;
}
}
/***************************************************
Check State name for special characters and blanks
***************************************************/
function check_state_not_required(id){
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length < 1) {
alert("必填欄位,請由下拉選單選取州。");
//document.getElementById(id).value ="";
document.getElementById(id).select();
//document.getElementById(id).focus();
return false;
}
return true;
}
/***************************************************
***************************************************/
function check_textarea_required(id){
//var regex = /^[a-zA-Z0-9-'\n\r()"*!;?:%#,/\\ .\b]+$/;
var regex = /^[a-zA-Z0-9-'\n\r()"*!;?:%#,/\\ .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") || str.match(".jpeg")) {
alert("必填項目。請重新輸入您的投訴敘述,無特殊字符( ` @ ~ | [ ] { } ^ ).");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
}
else
{
alert("必填項目。你的投訴敘述是空白的,請重新輸入。");
//document.getElementById(id).focus();
//document.getElementById(id).select();
return false;
}
return true;
}
/***************************************************
***************************************************/
function check_company_textarea_required(id){
//var regex = /^[a-zA-Z0-9-'\n\r()"*!;?:%#,/\\ .\b]+$/;
var regex = /^[a-zA-Z0-9-'\n\r()"*!;?:%#,/\\ .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") || str.match(".jpeg")) {
alert("必填項目。請重新輸入您的歧視敘述細節,無特殊字符( ` @ ~ | [ ] { } ^ ).");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
}
else
{
alert("必填項目。你的歧視敘事是空白的。");
document.getElementById(id).focus();
document.getElementById(id).select();
return false;
}
return true;
}
/***************************************************
Check Name (First, Middle, and Last) for special characters and blanks
***************************************************/
function check_name_required(id){
//var regex = /^[x00-xff\n\r .\b]+$/;
var regex = /^[a-zA-Z-'\n\r .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
//var regex = /^[x00-xff a-zA-Z-'\n\r .\b]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請鍵入有效名字、中名及姓氏。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
else
{
alert("必填欄位,請鍵入有效名字、中名及姓氏。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
// document.getElementById(id).select();
// document.getElementById(id).focus();
return true;
}
/***************************************************
Check Name (First, Middle, and Last) for special characters and blanks
***************************************************/
function check_name_not_required(id){
var regex = /^[a-zA-Z-'\n\r .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請鍵入有效名字、中名及姓氏。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check Name (First, Middle, and Last) for special characters and blanks
***************************************************/
function check_contact_name(id){
var regex = /^[a-zA-Z-'\n\r .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請鍵入有效名字、中名及姓氏。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check Name (First, Middle, and Last) for special characters and blanks
***************************************************/
function check_attorney_name(id){
var regex = /^[a-zA-Z-'\n\r .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請鍵入有效名字、中名及姓氏。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Signature
***************************************************/
function check_signature_required(id){
var regex = /^[a-zA-Z-'\n\r .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請鍵入有效名字、中名及姓氏。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
else
{
alert("必填欄位,請鍵入有效名字、中名及姓氏。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
return true;
}
/***************************************************
Check contact name for allegations.
***************************************************/
function check_allegations_contact_name(id){
var regex = /^[a-zA-Z-'\n\r .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請輸入有效的就業歧視聯繫人姓名。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
else
{
alert("請輸入有效的就業歧視聯繫人姓名。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
return true;
}
/***************************************************
Address Company
***************************************************/
function check_company_address_required(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填項目。請輸入有效的公司街道地址。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
else
{
alert("必填項目。請輸入有效的公司街道地址。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
return true;
}
/***************************************************
Check address for special characters and blanks
***************************************************/
function check_address_required(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請鍵入有效街道地址。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check address for special characters and blanks
***************************************************/
function check_address_not_required(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請鍵入有效街道地址。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check address for special characters and blanks
***************************************************/
function check_contact_address(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請輸入聯繫人的有效街道地址。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check address for special characters and blanks
***************************************************/
function check_attorney_address(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請為代表或律師輸入有效的街道地址。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check City name for special characters and blanks
***************************************************/
function check_city_name_required(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請輸入有效城市名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
else
{
alert("必填欄位,請輸入有效城市名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
return true;
}
/***************************************************
Check City name for special characters and blanks
***************************************************/
function check_company_city_name_required(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填項目。請輸入公司的有效城市名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
else
{
alert("必填項目。請輸入公司的有效城市名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
return true;
}
/***************************************************
Check City name for special characters and blanks
***************************************************/
function check_city_name_not_required(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請輸入有效城市名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check City name for special characters and blanks
***************************************************/
function check_contact_city_name(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請輸入聯繫人的有效城市名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check City name for special characters and blanks
***************************************************/
function check_attorney_city_name(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("請為代表或律師輸入有效的城市名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
return true;
}
/***************************************************
Check Agency and Company Name for special characters and blanks
***************************************************/
function check_company_name_required(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填欄位,請鍵入有效公司名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
else
{
alert("必填欄位,請鍵入有效公司名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
return true;
}
/***************************************************
Check Agency and Company Name for special characters and blanks
***************************************************/
function check_agency_name(id){
var regex = /^[a-zA-Z0-9-'#, .\b\u4E00-\u9FA5\uF900-\uFA2D]+$/;
str = document.getElementById(id).value;
str = str.trim();
document.getElementById(id).value = str;
if (str.length > 0) {
if (str.match(regex) == null || str.match("ftp") || str.match(".jpg") || str.match(".png") || str.match(".gif") || str.match("file:") || str.match("http") ) {
alert("必填項,請輸入有效的代理商名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
}
else
{
alert("必填項,請輸入有效的代理商名稱。");
document.getElementById(id).select();
document.getElementById(id).focus();
return false;
}
return true;
}
/***************************************************
MISC -
***************************************************/
function validateForm(id) {
document.myform.submit();
}
function clear_form() {
document.myform.reset();
return false;
}
function print_form22() {
F_Fullname1 = document.getElementById("Fullname1").value;
F_Allegations_Yes = document.getElementById("Allegations_Yes").checked;
F_Allegations_No = document.getElementById("Allegations_No").checked;
alert(padd(F_Fullname1,40));
}
/***************************************************
Print Form
***************************************************/
function print_form() {
F_Fullname1 = document.getElementById("Fullname1").value;
F_Address1 = document.getElementById("Address1").value;
F_City1 = document.getElementById("City1").value;
F_state1 = document.getElementById("state1").value;
F_Zipcode1 = document.getElementById("Zipcode1").value;
F_Telephone1 = document.getElementById("Telephone1").value;
F_Home1 = document.getElementById("Home1").checked;
F_Work1 = document.getElementById("Work1").checked;
F_Cell1 = document.getElementById("Cell1").checked;
F_Email1 = document.getElementById("Email1").value;
F_Allegations_Yes = document.getElementById("Allegations_Yes").checked;
F_Allegations_No = document.getElementById("Allegations_No").checked;
F_Agency_Name1 = document.getElementById("Agency_Name1").value;
F_Agency_POC1 = document.getElementById("Agency_POC1").value;
F_Agency_Telephone1 = document.getElementById("Agency_Telephone1").value;
F_Fullname2 = document.getElementById("Fullname2").value;
F_Address2 = document.getElementById("Address2").value;
F_City2 = document.getElementById("City2").value;
F_state2 = document.getElementById("state2").value;
F_Zipcode2 = document.getElementById("Zipcode2").value;
F_Telephone2 = document.getElementById("Telephone2").value;
F_Home2 = document.getElementById("Home2").checked;
F_Work2 = document.getElementById("Work2").checked;
F_Cell2 = document.getElementById("Cell2").checked;
F_Email2 = document.getElementById("Email2").value;
F_Fullname3 = document.getElementById("Fullname3").value;
F_Address3 = document.getElementById("Address3").value;
F_City3 = document.getElementById("City3").value;
F_state3 = document.getElementById("state3").value;
F_Zipcode3 = document.getElementById("Zipcode3").value;
F_Telephone3 = document.getElementById("Telephone3").value;
F_Narrative5 = document.getElementById("Narrative5").value;
F_Race40 = document.getElementById("Race40").checked;
F_Race41 = document.getElementById("Race41").checked;
F_Race42 = document.getElementById("Race42").checked;
F_Race43 = document.getElementById("Race43").checked;
F_Race44 = document.getElementById("Race44").checked;
F_Race45 = document.getElementById("Race45").checked;
F_National_Origin41 = document.getElementById("National_Origin41").checked;
F_National_Origin411 = document.getElementById("National_Origin411").checked;
F_National_Origin412 = document.getElementById("National_Origin412").checked;
F_Race4_Tribal_Affiliation4 = document.getElementById("Race4_Tribal_Affiliation4").value;
F_Color4 = document.getElementById("Color4").checked;
F_Religion4 = document.getElementById("Religion4").checked;
F_Sex4 = document.getElementById("Sex4").checked;
F_Sexual_Orientation4 = document.getElementById("Sexual_Orientation4").checked;
F_Gender_Identity4 = document.getElementById("Gender_Identity4").checked;
F_Inquiring_About_Pay4 = document.getElementById("Inquiring_About_Pay4").checked;
F_Discussing_Pay4 = document.getElementById("Discussing_Pay4").checked;
F_Disclosing_Pay4 = document.getElementById("Disclosing_Pay4").checked;
F_Protected_Veteran_Status4 = document.getElementById("Protected_Veteran_Status4").checked;
F_Disability4 = document.getElementById("Disability4").checked;
F_Retaliation4 = document.getElementById("Retaliation4").checked;
F_Complaint51 = document.getElementById("Complaint51").checked;
F_Complaint52 = document.getElementById("Complaint52").checked;
F_Complaint53 = document.getElementById("Complaint53").checked;
F_Complaint54 = document.getElementById("Complaint54").checked;
F_Complaint55 = document.getElementById("Complaint55").checked;
F_Complaint56 = document.getElementById("Complaint56").checked;
F_Treated5 = document.getElementById("Treated5").checked;
F_Treated6 = document.getElementById("Treated6").checked;
F_Narrative6 = document.getElementById("Narrative6").value;
F_Attorney5_You = document.getElementById("Attorney5_You").checked;
F_Attorney6_You = document.getElementById("Attorney6_You").checked;
F_Fullname21 = document.getElementById("Fullname21").value;
F_Address21 = document.getElementById("Address21").value;
F_City21 = document.getElementById("City21").value;
F_state21 = document.getElementById("state21").value;
F_Zipcode21 = document.getElementById("Zipcode21").value;
F_Telephone21 = document.getElementById("Telephone21").value;
F_Email21 = document.getElementById("Email21").value;
F_Print_Signature = document.getElementById("Print_Signature").value;
F_Print_Signature_Date = document.getElementById("Print_Signature_Date").value;
str_html = "";
//buildhtml("<html><head></head><body>");
//buildhtml("<table border=1><tr><td>");
//buildhtml(document.getElementById('Narrative6').value.replace(/\n/gi,'<br>'));
//buildhtml("</td></tr></table>");
//buildhtml("</body></html>");
buildhtml("<!DOCTYPE html>");
buildhtml("<html lang='zh-Hans'>");
buildhtml("<head>");
buildhtml("<meta http-equiv='Content-type' content='text/html;charset=UTF-8'>");
buildhtml("<meta http-equiv='Content-Style-Type' content='text/css'>");
buildhtml("<title>OFCCP Complaint Form Chinese Traditional</title>");
buildhtml("<style>");
buildhtml("a, h1, h2, h3, h4, ul, ol, li, p, label, textarea ,td ,tr { font-family: Tahoma, Arial, verdana, sans-serif;}");
buildhtml("a, h1, h2, h3, h4, ul, ol, li, p, label, textarea ,td ,tr { color:black;}");
buildhtml("a, h1, h2, h3, h4, ul, ol, li, p, td, tr { text-align:left;}");
buildhtml("a, h1, h2, h3, h4, ul, ol, li, p, td, tr, label { vertical-align: text-center;}");
buildhtml("p { display:inline-block;}");
buildhtml("h1 { font-size: 16px; letter-spacing: 1px;}");
buildhtml("a, h2, ul, ol, li, p, label, input, textarea, td, tr { font-size: 12px; line-height:150%; letter-spacing: 0px;}");
buildhtml("h3 { font-size: 10px; letter-spacing: 0px;}");
buildhtml("h4 { font-size: 9px; letter-spacing: 0px;}");
buildhtml("h1, h2, h3, h4 { margin:0; padding:0;}");
buildhtml("ol {list-style-type: cjk-ideographic;}");
buildhtml("textarea {");
buildhtml("resize: none;");
buildhtml("border: none;");
buildhtml("overflow: hidden;");
buildhtml("padding-left: 6px;");
buildhtml("border-bottom: 1px solid black");
buildhtml("vertical-align: top;");
buildhtml("}");
buildhtml("textarea.nar6 {");
buildhtml("resize: none;");
buildhtml("overflow: hidden;");
buildhtml("border: none;");
buildhtml("}");
buildhtml("input, select { border:none; border-bottom: 1px solid black;}");
buildhtml("</style>");
buildhtml("</head>");
buildhtml("<body bgcolor=white>");
buildhtml("<table width='670' border='0' cellspacing='0' cellpadding='0' align='center' cols=2>");
buildhtml("<!------------------------");
buildhtml("FORM TITLE");
buildhtml("------------------------->");
buildhtml("<tr valign='top' align='right' >");
buildhtml("<td>");
buildhtml("<br>");
buildhtml("<a style='float: left;' href='https://www.dol.gov'>");
buildhtml("<img src='https://raw.githubusercontent.com/GSA/logo/master/labor.png'");
buildhtml(" align='top' width='45' border='0'");
buildhtml(" alt='United States Department of Labor'");
buildhtml(" title='United States Department of Labor'>");
buildhtml("</a>");
buildhtml("<a style='float: left;' href='https://www.dol.gov/ofccp/aboutof.html'>");
buildhtml("<img src='https://www.dol.gov/sites/default/files/slide47.jpg'");
buildhtml(" align='top' width='155' border='0'");
buildhtml(" alt='Office of Federal Contract Compliance Programs'");
buildhtml(" title='Office of Federal Contract Compliance Programs'>");
buildhtml("</a>");
buildhtml("<br><br>");
buildhtml("OMB: 1250-0002");
buildhtml("<br>");
buildhtml("有效期: 5/31/2020");
buildhtml("<br><br>");
buildhtml("</td>");
buildhtml("<td height=70px valign='top' align=right>");
buildhtml("<br><h1><b>");
buildhtml("涉及联邦政府承包商或分包商的就业歧视投诉");
buildhtml("</b></h1>");
buildhtml("<h4>");
buildhtml("<u>请在填写此表格之前阅读说明。</u>");
buildhtml("<br>");
buildhtml("<br>");
buildhtml("<button style='margin: 0 15px 0 0;' readonly> 重置表单 </button>");
buildhtml("<button style='margin: 0 15px 0 0;' readonly> 打印表单 </button>");
buildhtml("<button style='margin: 0 0 0 0;' readonly> 提交 </button>");
buildhtml("<br>");
buildhtml("</h4>");
buildhtml("</td>");
buildhtml("</tr>");
buildhtml("</table>");
buildhtml("<table width='670' border='1' cellspacing='0' cellpadding='2' align='center'>");
buildhtml("<!------------------------");
buildhtml("SECTION 1");
buildhtml("------------------------->");
buildhtml("<tr>");
buildhtml("<td width='140' valign='top' align=left>");
buildhtml("<h2><b>");
buildhtml("我们如何与您联系?");
buildhtml("</b></h2>");
buildhtml("</td>");
buildhtml("<td width='530'>");
buildhtml("<table width='100%' border='0' cellspacing='0' cellpadding='3'>");
buildhtml("<tr>");
buildhtml("<td>");
buildhtml("姓名(名,中间名,姓氏): " + padd(F_Fullname1,50) + "<br>");
buildhtml("街道地址: " + padd(F_Address1,50) + "<br>");
buildhtml("城市: " + padd(F_City1,50) + "<br>");
buildhtml("州: " + padd(F_state1,3) + " 邮政编码: " + padd(F_Zipcode1,10) + "<br>");
buildhtml("电话号码: " + padd(F_Telephone1,13) + "<br>");
if (F_Home1) {
buildhtml("<font face='verdana' size=3><b>☑</b></font> 宅电");
}
else
{
buildhtml("<font face='verdana' size=3><b>☐</b></font> 宅电");
}
if (F_Work1) {
buildhtml("<font face='verdana' size=3><b>☑</b></font> 是");
}
else
{
buildhtml("<font face='verdana' size=3><b>☐</b></font> 宅电");
}
if (F_Cell1) {
buildhtml("<font face='verdana' size=3><b>☑</b></font> 是");
}
else
{
buildhtml("<font face='verdana' size=3><b>☐</b></font> 宅电");
}
buildhtml("<br>");
buildhtml("电子邮件: " + padd(F_Email1,40) + "<br>");
buildhtml("您是否已经向另一个联邦或地方机构提交了这些有关就业歧视的指控?");
buildhtml("<br>");
if (F_Allegations_Yes) {
buildhtml("<font face='verdana' size=3><b>☑</b></font> 是");
}
else
{
buildhtml("<font face='verdana' size=3><b>☐</b></font> 是");
}
if (F_Allegations_No) {
buildhtml("<font face='verdana' size=3><b>☑</b></font> 否");
}
else
{
buildhtml("<font face='verdana' size=3><b>☐</b></font> 否");
}
buildhtml("<br>");
buildhtml("如果是,哪个机构: " + padd(F_Agency_Name1,40) + "<br>");
buildhtml("联系人姓名: " + padd(F_Agency_POC1,35) + " 电话号码: " + padd(F_Agency_Telephone1,12) + "<br>");
buildhtml("</td>");
buildhtml("</tr>");
buildhtml("</table>");
buildhtml("</td>");
buildhtml("</tr>");
buildhtml("<!------------------------");
buildhtml("SECTION 2");
buildhtml("------------------------->");
buildhtml("<tr>");
buildhtml("<td valign='top' align=left>");
buildhtml("<h2><b>");
buildhtml("如果我們無法與您聯絡,我們聯絡誰?");
buildhtml("</b></h2>");
buildhtml("</td>");
buildhtml("<td>");
buildhtml("<table width='100%' border='0' cellspacing='0' cellpadding='3' >");
buildhtml("<tr>");
buildhtml("<td>");
buildhtml("姓名(名,中間名,姓氏): " + padd(F_Fullname2,40) + "<br>");
buildhtml("街道地址: " + padd(F_Address2,40) + "<br>");
buildhtml("城市: " + padd(F_City2,40) + "<br>");
buildhtml("州: " + padd(F_state2,3) + " 郵遞區號: " + padd(F_Zipcode2,10) + "<br>");
buildhtml("電話號碼: " + padd(F_Telephone2,15) + "<br>");
if (F_Home2) {
buildhtml("<font face='verdana' size=3><b>☑</b></font> 宅电");
}
else
{
buildhtml("<font face='verdana' size=3><b>☐</b></font> 宅电");
}
if (F_Work2) {
buildhtml("<font face='verdana' size=3><b>☑</b></font> 是");
}
else
{
buildhtml("<font face='verdana' size=3><b>☐</b></font> 宅电");
}
if (F_Cell2) {
buildhtml("<font face='verdana' size=3><b>☑</b></font> 是");
}
else
{
buildhtml("<font face='verdana' size=3><b>☐</b></font> 宅电");
}
buildhtml("<br>");
buildhtml("電子郵件: " + padd(F_Email2,50) + "<br>");
buildhtml("</td>");
buildhtml("</tr>");
buildhtml("</table>");
buildhtml("</td>");
buildhtml("</tr>");
buildhtml("<!------------------------");
buildhtml("SECTION 3");
buildhtml("------------------------->");
buildhtml("<tr>");
buildhtml("<td valign='top' align=left>");
buildhtml("<h2><b>");
buildhtml("您認為歧視或報復您的雇主的名字是什麼?");
buildhtml("</b></h2>");
buildhtml("</td>");
buildhtml("<td>");
buildhtml("<table width='100%' border='0' cellspacing='0' cellpadding='3'>");
buildhtml("<tr>");
buildhtml("<td>");
buildhtml("公司名稱: " + padd(F_Fullname3,40) + "<br>");
buildhtml("街道地址: " + padd(F_Address3,40) + "<br>");
buildhtml("城市: " + padd(F_City3,40) + "<br>");
buildhtml("州: " + padd(F_state3,3) + " 郵遞區號: " + padd(F_Zipcode3,12) + "<br><br>");
buildhtml("電話號碼: " + padd(F_Telephone3,15) + "<br>");
buildhtml("<b>");
buildhtml("提供您認為您受到歧視或報復的日期和時間:" + "<br>" );
buildhtml("</b>");
//F_Narrative5 = Replace(F_Narrative5, nlcr, "<br><br>");
buildhtml(F_Narrative5);
buildhtml("<br>");
buildhtml("</td>");
buildhtml("</tr>");
buildhtml("</table>");
buildhtml("</td>");
buildhtml("</tr>");
buildhtml("</table>");
buildhtml("</body>");
buildhtml("</html>");
childWindow = window.open('','childWindow','location=yes, menubar=yes, toolbar=yes');
childWindow.document.open();
childWindow.document.write(str_html);
//childWindow.print();
//childWindow.document.close();
//childWindow.close();
//alert("True");
return true;
}
/***************************************************
Print Form
***************************************************/
function print_form2() {
var area = document.getElementById('Narrative5').value.length;
var area2 = document.getElementById('Narrative6').value.length;
var pagesize = 0;
var adjust = 0;
var str = "nothing";
var numlines = 0;
if (area > 0) {
pagesize = 30;
adjust = Math.round(area / pagesize);
numlines = 140 + (adjust * 16);
document.getElementById('column-right-3').style.height = numlines + 'px';
document.getElementById('column-left-3').style.height = numlines + 'px';
document.getElementById('Narrative5').rows = adjust;
}
if (area2 > 0) {
//document.getElementById('Narrative6').cols = 105;
pagesize = 40;
adjust = Math.round(area2 / pagesize) + 2;
numlines = (adjust * 12);
//document.getElementById('Narrative6').rows = adjust;
//document.getElementById('column-6').style.height = numlines + 'px';
//document.getElementById('Narrative6').s = 105;
}
window.print();
window.close();
return true;
}
/***************************************************
Instructions
***************************************************/
function instructions() {
document.myform2.submit();
return false;
}
/***************************************************
UT8 Check
***************************************************/
function isEmail(email) {
return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(email);
}
/***************************************************
GO BACK
***************************************************/
function goBack() {
window.history.back();
}
/***************************************************
Treatedc - Switches buttons on and off
***************************************************/
function change_button_value(id) {
str = id;
//alert("Element: --->" + str);
if (str.match("Treated5")) {
//document.getElementById("Treated5").value ="1";
//document.getElementById("Treated6").value ="0";
//document.getElementById("Treated5").checked = true;
//document.getElementById("Treated6").checked = false;
if (document.getElementById("Treated5").checked == true) {
//alert("False");
document.getElementById("Treated5").checked = true;
}
else
{
//alert("True");
document.getElementById("Treated5").checked = false;
}
}
if (str.match("Treated6")) {
//document.getElementById("Treated6").value ="0";
//document.getElementById("Treated5").value ="1";
//document.getElementById("Treated6").checked = true;
//document.getElementById("Treated5").checked = false;
if (document.getElementById("Treated6").checked == true) {
document.getElementById("Treated6").checked = true;
}
else
{
document.getElementById("Treated6").checked = false;
}
}
if (str.match("Attorney5_You")) {
//document.getElementById("Attorney5_You").value ="1";
//document.getElementById("Attorney6_You").value ="0";
//document.getElementById("Attorney5_You").checked = true;
//document.getElementById("Attorney6_You").checked = false;
if (document.getElementById("Attorney5_You").checked == true) {
document.getElementById("Attorney5_You").checked = true;
}
else
{
document.getElementById("Attorney5_You").checked = false;
}
}
if (str.match("Attorney6_You")) {
//document.getElementById("Attorney6_You").value ="2";
//document.getElementById("Attorney5_You").value ="0";
//document.getElementById("Attorney6_You").checked = true;
//document.getElementById("Attorney5_You").checked = false;
if (document.getElementById("Attorney6_You").checked == true) {
document.getElementById("Attorney6_You").checked = true;
}
else
{
document.getElementById("Attorney6_You").checked = false;
}
}
if (str.match("Home1")) {
if (document.getElementById("Home1").checked == true) {
//alert("False");
document.getElementById("Home1").checked = true;
}
else
{
//alert("True");
document.getElementById("Home1").checked = false;
}
}
if (str.match("Work1")) {
if (document.getElementById("Work1").checked == true) {
//alert("False");
document.getElementById("Work1").checked = true;
}
else
{
//alert("True");
document.getElementById("Work1").checked = false;
}
}
if (str.match("Cell1")) {
if (document.getElementById("Cell1").checked == true) {
//alert("False");
document.getElementById("Cell1").checked = true;
}
else
{
//alert("True");
document.getElementById("Cell1").checked = false;
}
}
if (str.match("Home2")) {
if (document.getElementById("Home2").checked == true) {
//alert("False");
document.getElementById("Home2").checked = true;
}
else
{
//alert("True");
document.getElementById("Home2").checked = false;
}
}
if (str.match("Work2")) {
if (document.getElementById("Work2").checked == true) {
//alert("False");
document.getElementById("Work2").checked = true;
}
else
{
//alert("True");
document.getElementById("Work2").checked = false;
}
}
if (str.match("Cell2")) {
if (document.getElementById("Cell2").checked == true) {
//alert("False");
document.getElementById("Cell2").checked = true;
}
else
{
//alert("True");
document.getElementById("Cell2").checked = false;
}
}
if (str.match("Allegations_Yes")) {
if (document.getElementById("Allegations_Yes").checked == true) {
//alert("yes - False");
document.getElementById("Allegations_Yes").checked = true;
document.getElementById("Allegations_No").checked = false;
}
else
{
//alert("yes - True");
document.getElementById("Allegations_Yes").checked = false;
//document.getElementById("Allegations_No").checked = false;
}
}
if (str.match("Allegations_No")) {
//alert("All no");
if (document.getElementById("Allegations_No").checked == true) {
alert("no - False");
document.getElementById("Allegations_No").checked = true;
document.getElementById("Allegations_Yes").checked = false;
}
else
{
alert(" no - True");
document.getElementById("Allegations_No").checked = false;
//document.getElementById("Allegations_Yes").checked = false;
}
}
}
/***************************************************
Message some buttons before input.
***************************************************/
function message_for_button(id) {
str = id;
if (str.match("Allegations_Yes")) {
alert("請輸入代理商名稱,代理聯絡點和代理機構電話號碼。");
}
}
/***************************************************
on_off - Switches buttons on and off
***************************************************/
function button_on_off(id) {
str = id;
document.getElementById(id).select();
document.getElementById(id).focus();
/*alert("Element: --->" + str);*/
if (document.getElementById(id).value == 1) {
document.getElementById(id).value = 0;
document.getElementById(id).checked = false;
}
else
{
document.getElementById(id).value = 1;
document.getElementById(id).checked = true;
}
}
/***************************************************
on_or_off - Switches buttons on or off
***************************************************/
function test(event,id,id2) {
//var key;
var key = event.which || event.keyCode;
alert("Keypressed = " + key);
return true;
}
/***************************************************
on_or_off - Switches buttons on or off
***************************************************/
function button_on_or_off(event,id,id2) {
//var key;
var key = event.which || event.keyCode;
//alert("Keypressed = " + key);
//alert("ID = " + document.getElementById(id).checked);
// Opera 8.0+ (UA detection to detect Blink/v8-powered Opera)
isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
// Firefox 1.0+
isFirefox = typeof InstallTrigger !== 'undefined';
// Safari 3.0+
isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || safari.pushNotification);
// Internet Explorer 6-11
isIE = /*@cc_on!@*/false || !!document.documentMode;
// Edge 20+
//isEdge = !isIE && !!window.StyleMedia;
// Chrome 1+
isChrome = !!window.chrome && !!window.chrome.webstore;
// Blink engine detection
//isBlink = (isChrome || isOpera) && !!window.CSS;
//alert("IsOpera :" + isOpera);
//alert("isFirefox :" + isFirefox);
//alert("isSafari :" + isSafari);
//alert("isIE :" + isIE);
//alert("isChrome :" + isChrome);
document.getElementById(id).select();
document.getElementById(id).focus();
//alert("Keypressed = " + key);
if (key == 32) {
if (isIE) {
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
//alert(" ie ID = false");
document.getElementById(id2).checked = false;
document.getElementById(id).checked = true;
//if (document.getElementById(id2).checked == true) {
// document.getElementById(id2).checked = false;
//}
}
else
{
//alert(" ie ID = True");
document.getElementById(id).checked = false;
}
return true;
}
if (isSafari) {
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
// alert("safa ID = false");
document.getElementById(id).checked = false;
}
else
{
document.getElementById(id2).checked = false;
// alert(" safa ID = True");
document.getElementById(id).checked = true;
if (document.getElementById(id2).checked == true) {
document.getElementById(id2).checked = false;
}
}
return true;
}
if (isChrome) {
//alert("o chr ID");
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
// alert("chr ID = false");
document.getElementById(id).checked = false;
}
else
{
//if (document.getElementById(id2).checked == true) {
document.getElementById(id2).checked = false;
//}
// alert("chr ID = True");
document.getElementById(id).checked = true;
}
return true;
}
}
else
{
if (isChrome) {
//alert("chr ID = false");
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
// alert("chr ID = false");
document.getElementById(id).checked = false;
}
else
{
//if (document.getElementById(id2).checked == true) {
document.getElementById(id2).checked = false;
//}
// alert("chr ID = True");
document.getElementById(id).checked = true;
}
return true;
}
if (isFirefox) {
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
//alert("fire ID = false");
document.getElementById(id).checked = false;
}
else
{
document.getElementById(id2).checked = false;
//alert(" fire ID = True");
document.getElementById(id).checked = true;
if (document.getElementById(id2).checked == true) {
document.getElementById(id2).checked = false;
}
}
return true;
}
}
return true;
} //End of Function
/***************************************************
on_or_off 2 just the event and the id - Switches buttons on or off
***************************************************/
function button_on_or_off2(event,id) {
//var key;
var key = event.which || event.keyCode;
//alert("Keypressed = " + key);
//alert("ID = " + document.getElementById(id).checked);
// Opera 8.0+ (UA detection to detect Blink/v8-powered Opera)
isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
// Firefox 1.0+
isFirefox = typeof InstallTrigger !== 'undefined';
// Safari 3.0+
isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || safari.pushNotification);
// Internet Explorer 6-11
isIE = /*@cc_on!@*/false || !!document.documentMode;
// Edge 20+
//isEdge = !isIE && !!window.StyleMedia;
// Chrome 1+
isChrome = !!window.chrome && !!window.chrome.webstore;
// Blink engine detection
//isBlink = (isChrome || isOpera) && !!window.CSS;
//alert("IsOpera :" + isOpera);
//alert("isFirefox :" + isFirefox);
//alert("isSafari :" + isSafari);
//alert("isIE :" + isIE);
//alert("isChrome :" + isChrome);
//alert("Keypressed = " + key);
document.getElementById(id).select();
document.getElementById(id).focus();
if (key == 32) {
if (isIE) {
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
//alert(" ie ID = false");
document.getElementById(id).checked = true;
}
else
{
//alert(" ie ID = True");
document.getElementById(id).checked = false;
}
return true;
}
if (isSafari) {
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
// alert("safa ID = false");
document.getElementById(id).checked = false;
}
else
{
// alert(" safa ID = True");
document.getElementById(id).checked = true;
}
return true;
}
if (isChrome) {
//alert("o chr ID");
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
// alert("chr ID = false");
document.getElementById(id).checked = false;
}
else
{
// alert("chr ID = True");
document.getElementById(id).checked = true;
}
return true;
}
}
else
{
if (isChrome) {
//alert("chr ID = false");
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
// alert("chr ID = false");
document.getElementById(id).checked = false;
}
else
{
// alert("chr ID = True");
document.getElementById(id).checked = true;
}
return true;
}
if (isFirefox) {
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
//alert("fire ID = false");
document.getElementById(id).checked = false;
}
else
{
//alert(" fire ID = True");
document.getElementById(id).checked = true;
}
return true;
}
}
return true;
} //End of Function
/***************************************************
on_or_off - Switches buttons on or off
***************************************************/
function mouse_on_or_off(id,id2) {
document.getElementById(id).select();
document.getElementById(id).focus();
if (document.getElementById(id).checked == "" || document.getElementById(id).checked == false) {
//document.getElementById(id).focus();
//document.getElementById(id).select();
document.getElementById(id).checked = false;
}
else
{
//document.getElementById(id).focus();
//document.getElementById(id).select();
document.getElementById(id).checked = true;
if (document.getElementById(id2).checked == true) {
// document.getElementById(id2).select();
document.getElementById(id2).checked = false;
}
}
} //End of Function
/***************************************************
BUILDHTML
***************************************************/
function buildhtml(text) {
str_html = str_html + text + "\n"
return true;
}
/***************************************************
PADDING
***************************************************/
function padd(text,len) {
fill = " ";
text = text + fill;
//text = "<u><pre>" + text.substring(text, len) + "</pre></u>";
//text = "<u>" + text.substring(text, len) + "</u>";
//text = text.substring(text, len);
text = '<input size=' + len + ' width=auto type=text value="' + text + '">';
return text;
}