﻿// JavaScript Document
$.ajaxSetup({
	beforeSend: function(xhr) {
		var currentURL = document.location.href;
		if( currentURL.lastIndexOf( "?" ) >= 0 ) {
			currentURL = currentURL.substr( 0, currentURL.lastIndexOf( "?" ) );
		}
		xhr.setRequestHeader("Referer", currentURL );
    },
	global: true,
	type: "POST"
});
function check(act) {
	$.ajax({
		url: 'b2b_check.php',
		data: $('#tform').serialize(),
		success: function(msg){
			var tmp = msg.split("@");
			if(tmp[1]=='UN') {
				alert(tmp[0]);
			} else {
				alert('您的意見已經送出！');
			}
		}
	});
}