var zipArray0 =  new Array("0");

var zipArray1 =  new Array("0","100","103","104","105","106","108","110","111","112","114","115","116");
var zipArray2 =  new Array("0","200","201","202","203","204","205","206");
var zipArray3 =  new Array("0","207","208","220","221","222","223","224","226","227","228","231","232","233",
"234","235","236","237","238","239","241","242","243","244","247","248","249","251","252","253");

var zipArray4 =  new Array("0","260","261","262","263","264","265","266","267","268","269","270","272");

var zipArray5 =  new Array("0","300");

var zipArray6 =  new Array("0","302","303","304","305","306","307","308","310","311","312","313","314","315");

var zipArray7 =  new Array("0","320","324","325","326","327","328","330","333","334","335","336","337","338");

var zipArray8 =  new Array("0","350","351","352","353","354","356","357","358","360","361","362","363","364",
"365","366","367","368","369");

var zipArray9 =  new Array("0","400","401","402","403","404","406","407","408");

var zipArray10 =  new Array("0","411","412","413","414","420","421","422","423","424","426","427","428","429",
"432","433","434","435","436","437","438","439");

var zipArray11 =  new Array("0","500","502","503","504","505","506","507","508","509","510","511","512","513",
"514","515","516","520","521","522","523","524","525","526","527","528","530");

var zipArray12 =  new Array("0","540","541","542","544","545","546","551","552","553","555","556","557","558");
var zipArray13 =  new Array("0","600");
var zipArray14 =  new Array("0","602","603","604","605","606","607","608","611","612","613","614","615",
"616","621","622","623","624","625");

var zipArray15 =  new Array("0","630","631","632","633","634","635","636","637","638","640","643","646","647",
"648","649","651","652","653","654","655");
var zipArray16 =  new Array("0","700","701","702","703","704","708","709");
var zipArray17 =  new Array("0","710","711","712","713","714","715","716","717","718","719","720","721","722","723","724","725","726","727","730","731","732","733","734","735","736","737","741","742","743","744","745");
var zipArray18 =  new Array("0","800","801","802","803","804","805","806","807","811","812","813");
var zipArray19 =  new Array("0","814","815","820","821","822","823","824","825","826","827","828","829","830","831","832","833","840","842","843","844","845","846","847","848","849","851","852");
var zipArray20 =  new Array("0","880","881","882","883","884","885");
var zipArray21 =  new Array("0","890","891","892","893","894","896");
var zipArray22 =  new Array("0","900","901","902","903","904","905","906","907","908","909","911","912","913","920","921","922",
"923","924","925","926","927","928","929","931","932","940","941","942","943","944","945","946","947");
var zipArray23 =  new Array("0","950","951","952","953","954","955","956","957","958","959","961","962","963","964","965","966");
var zipArray24 =  new Array("0","970","971","972","973","974","975","976","977","978","979","981","982","983");
var zipArray25 =  new Array("0","209","210","211","212");
var zipArray26 =  new Array("0","817","819");
var zipArray27 =  new Array("0","290");

function check_city(theform)
{
	if  ((theform.usr_arealive.selectedIndex == 27) ||(theform.usr_arealive.selectedIndex == 13) || (theform.usr_arealive.selectedIndex == 5)) { 
		//theform.Address.focus();
	}
}

function assign_addr(theform)
{
	if  ((theform.usr_arealive.selectedIndex == 27) ||(theform.usr_arealive.selectedIndex == 13) || (theform.usr_arealive.selectedIndex == 5)) { 
		return false;
	}
	/*var ls_str = theform.Address.value;
	li_pos = ls_str.indexOf("南海諸島東沙");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 6, ls_str.length);	}	

	li_pos = ls_str.indexOf("南海諸島南沙");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 6, ls_str.length);	}	
	
	li_pos = ls_str.indexOf("釣魚台列嶼");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 5, ls_str.length);	}	
	
	li_pos = ls_str.indexOf("鄉");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 1, ls_str.length);	}
	
	li_pos = ls_str.indexOf("鎮");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 1, ls_str.length);	}
	
	li_pos = ls_str.indexOf("區");
	if ( li_pos > 0 ) {	   ls_str = ls_str.substring(li_pos + 1, ls_str.length); }	
	
	li_pos = ls_str.indexOf("縣");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 1, ls_str.length);	}
	
	li_pos = ls_str.indexOf("市");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 1, ls_str.length);	}

	theform.Address.value = theform.City.value + theform.District.options[theform.District.selectedIndex].text + ls_str;*/
	
	var ZipArray = eval("zipArray" + theform.usr_arealive.selectedIndex );
	theform.ZIP.value = ZipArray[theform.usr_arealive1.selectedIndex];
	
	return true;
}
function born_addr(theform)
{
	if  ((theform.usr_areaborn.selectedIndex == 27) ||(theform.usr_areaborn.selectedIndex == 13) || (theform.usr_areaborn.selectedIndex == 5)) { 
		return false;
	}
	/*var ls_str = theform.Address.value;
	li_pos = ls_str.indexOf("南海諸島東沙");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 6, ls_str.length);	}	

	li_pos = ls_str.indexOf("南海諸島南沙");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 6, ls_str.length);	}	
	
	li_pos = ls_str.indexOf("釣魚台列嶼");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 5, ls_str.length);	}	
	
	li_pos = ls_str.indexOf("鄉");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 1, ls_str.length);	}
	
	li_pos = ls_str.indexOf("鎮");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 1, ls_str.length);	}
	
	li_pos = ls_str.indexOf("區");
	if ( li_pos > 0 ) {	   ls_str = ls_str.substring(li_pos + 1, ls_str.length); }	
	
	li_pos = ls_str.indexOf("縣");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 1, ls_str.length);	}
	
	li_pos = ls_str.indexOf("市");
	if ( li_pos > 0 ) {   ls_str = ls_str.substring(li_pos + 1, ls_str.length);	}

	theform.Address.value = theform.City.value + theform.District.options[theform.District.selectedIndex].text + ls_str;*/
	
	var ZipArray = eval("zipArray" + theform.usr_areaborn.selectedIndex );
	theform.ZIP1.value = ZipArray[theform.usr_areaborn1.selectedIndex];
	
	return true;
}