function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function contact(head,show){
	if(show=='') show = head.toLowerCase()+'@gt-thai.com';
	document.write('<a href="mailto:'+head.toLowerCase()+'@gt-thai.com">'+show+'</a>');
}

function subscribe(head,show,subject){
	if(show=='') show = head.toLowerCase()+'@gt-thai.com';
	document.write('<a href="mailto:'+head.toLowerCase()+'@gt-thai.com?subject='+subject+'">'+show+'</a>');
}

//recruitment
function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, \'" + id + "\', \'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=500,left = 192,top = 144\');");
}

function submit_resume_onclick(){
	apos=document.Mainform.txtEmail.value.indexOf("@")
	dotpos=document.Mainform.txtEmail.value.lastIndexOf(".")

	if(document.Mainform.txtFName.value==''){
		alert('Please, Input First Name');
		document.Mainform.txtFName.focus();
	}else if(document.Mainform.txtLName.value==''){
		alert('Please, Input Last Name');
		document.Mainform.txtLName.focus();
	}else if(document.Mainform.txtEmail.value==''){
		alert('Please, Input Email Address');
		document.Mainform.txtEmail.focus();
	}else if (apos<1||dotpos-apos<2){
		alert('Please, Input a valid Email Address');
		document.Mainform.txtEmail.focus();
	}else if(document.Mainform.cboCBusiness.value==0){
		alert('Please, Select Current Type of Business');
		document.Mainform.cboCBusiness.focus();
	}else if(document.Mainform.cboCFunction.value==0){
		alert('Please, Select Current Function');
		document.Mainform.cboCFunction.focus();
	}else if(document.Mainform.file_attach.value==''){
		alert('Please, Input Attached File');
		document.Mainform.file_attach.focus();
	}else if(document.Mainform.file_attach.value.substr(document.Mainform.file_attach.value.length-4,4).toUpperCase().search('.DOC')==-1 && document.Mainform.file_attach.value.substr(document.Mainform.file_attach.value.length-4,4).toUpperCase().search('.PDF')==-1 && document.Mainform.file_attach.value.substr(document.Mainform.file_attach.value.length-4,4).toUpperCase().search('.PPT')==-1 && document.Mainform.file_attach.value.substr(document.Mainform.file_attach.value.length-4,4).toUpperCase().search('.TIF')==-1 && document.Mainform.file_attach.value.substr(document.Mainform.file_attach.value.length-4,4).toUpperCase().search('.XLS')==-1 && document.Mainform.file_attach.value.substr(document.Mainform.file_attach.value.length-5,5).toUpperCase().search('.DOCX')==-1){
		alert('Please use .doc, .docx, .pdf, .ppt, .tif or .xls files only.');
		document.Mainform.file_attach.focus();
	}else{
		document.Mainform.submit();
	}
}

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
//if (document.layers)
//{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
//else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

//document.oncontextmenu=new Function("return false")
// -->