﻿function jsWindowClose() {
	var New_mtar = window.open("/th/CmnFiles/CmnFunc/cdbs0110.asp", "mtar_win","height=1,width=1,left=100000,top=100000,screenX=100000,screenY=100000,status=no,titlebar=no,toolbar=no,location=no");
	try {
		New_mtar.close();
	} catch(e){
	}
}

function fncVinChg()
{
	var strSelectedVin = "";

	if (document.Myform.CmbCarVIN.selectedIndex == 0 || document.Myform.CmbCarVIN.options.length <= 3)
	{
		return;
	}

	if (document.Myform.CmbCarVIN.value == "-") {
		return;
	}

//	strSelectedVin = (document.Myform.CmbCarVINValue.length) ?
//		document.Myform.CmbCarVINValue[document.Myform.CmbCarVIN.selectedIndex - 1].value : document.Myform.CmbCarVINValue.value;
//	document.Myform.action = (strSelectedVin != '') ? document.Myform.ActionURLEnabled.value : document.Myform.ActionURLDisabled.value;
	document.Myform.HidCarVINFlg.value = "1";
	document.Myform.submit();
}

function fncIndisAlert() {
	alert('The indispensable input item is not inputted. Please input.');
	return;
}

function fncIndisDateCmbCheck(objYear, objMonth, objDay) {
	if(objYear.options[objYear.selectedIndex].value == "") {
		objYear.focus();
		return false;
	}
	if(objMonth.options[objMonth.selectedIndex].value == "") {
		objMonth.focus();
		return false;
	}
	if(objDay.options[objDay.selectedIndex].value == "") {
		objDay.focus();
		return false;
	}
	return true;
}

function jsSubmitForm(objForm)
{
	if (objForm != null)
	{
		try {objForm.submit();}
		catch(ex) {}
	}
}
