function country(name)
{
	this.name=name;
	this.list=new Array();
	this.addProvince=addProvince;
	//this.getOptions=getOptins;
}

function addProvince(province)
{
	this.list=this.list.concat(province);
}

function province(name)
{
	this.name=name;
}

function onCountryChange()
{
	var curCol=document.getElementById('Country');
	var proCol=document.getElementById('Province');
	var proCol2=document.getElementById('Province2');
	var len=countries[curCol.selectedIndex].list.length;
	if(len>0)
	{
		for(i=0;i<len;i++)
		{
			proCol.options[i]=new Option(countries[curCol.selectedIndex].list[i].name,countries[curCol.selectedIndex].list[i].name)
		}
		proCol2.style.display='none';
		proCol2.disabled='disabled';
		proCol.style.display='';
		proCol.disabled='';
	}
	else
	{
		proCol.style.display='none';
		proCol.disabled='disabled';
		proCol2.style.display='';
		proCol2.disabled='';
	}
}

function onLoadBind(a)
{
	var curCol=document.getElementById('Country');
	var proCol=document.getElementById('Province');
	var proCol2=document.getElementById('Province2');
	for(i=0;i<countries.length;i++)
	{
		curCol.options[i]=new Option(countries[i].name,countries[i].name);
	}
	var defaultSelectIndex=a;
	//alert(defaultSelectIndex);
	var len=countries[defaultSelectIndex].list.length;
	curCol.selectedIndex=defaultSelectIndex;
	if(len>0)
	{
		for(i=0;i<len;i++)
		{
			proCol.options[i]=new Option(countries[curCol.selectedIndex].list[i].name,countries[curCol.selectedIndex].list[i].name)
		}
		proCol2.style.display='none';
		proCol2.disabled='disabled';
		proCol.style.display='';
		proCol.disabled='';
	}
	else
	{
		proCol.style.display='none';
		proCol.disabled='disabled';
		proCol2.style.display='';
		proCol2.disabled='';
	}
}

//绑定国家与省份数据
var countries=new Array();
var cur;
cur=new country('ARGENTINA');countries=countries.concat(cur);
cur=new country('BRAZIL');countries=countries.concat(cur);
cur=new country('CANADA');countries=countries.concat(cur);
cur=new country('CENTRAL AFRICAN');countries=countries.concat(cur);
cur=new country('COSTA RICA');countries=countries.concat(cur);
cur=new country('EGYPT');countries=countries.concat(cur);
cur=new country('FINLAND');countries=countries.concat(cur);
cur=new country('FRANCE');countries=countries.concat(cur);
cur=new country('GERMANY');countries=countries.concat(cur);
cur=new country('GHANA');countries=countries.concat(cur);
cur=new country('GREECE');countries=countries.concat(cur);
cur=new country('HUNGARY');countries=countries.concat(cur);
cur=new country('ICELAND');countries=countries.concat(cur);
cur=new country('INDIA');countries=countries.concat(cur);
cur=new country('INDONESIA');countries=countries.concat(cur);
cur=new country('IRAN');countries=countries.concat(cur);
cur=new country('IRAQ');countries=countries.concat(cur);
cur=new country('IRELAND REP');countries=countries.concat(cur);
cur=new country('ISRAEL');countries=countries.concat(cur);
cur=new country('ITALY');countries=countries.concat(cur);
cur=new country('JAPAN');countries=countries.concat(cur);
cur=new country('JORDAN');countries=countries.concat(cur);
cur=new country('LIBYA');countries=countries.concat(cur);
cur=new country('LITUUANLA');countries=countries.concat(cur);
cur=new country('MALAYSIA');countries=countries.concat(cur);
cur=new country('MEXICO');countries=countries.concat(cur);
cur=new country('MONGOLIA');countries=countries.concat(cur);
cur=new country('MYANMARK(BURMA)');countries=countries.concat(cur);
cur=new country('NETHERLAND');countries=countries.concat(cur);
cur=new country('NEW ZEALAND');countries=countries.concat(cur);
cur=new country('NIGERIA');countries=countries.concat(cur);
cur=new country('NORTH KOREA');countries=countries.concat(cur);
cur=new country('NORWAY');countries=countries.concat(cur);
cur=new country('PHILIPPINES');countries=countries.concat(cur);
cur=new country('POLAND');countries=countries.concat(cur);
cur=new country('PORTUGAL');countries=countries.concat(cur);
cur=new country('RUSSIAN FEDRRATION');countries=countries.concat(cur);
cur=new country('SAUDI ARABIA');countries=countries.concat(cur);
cur=new country('SINGAPORE');countries=countries.concat(cur);
cur=new country('SOUTH KOREA');countries=countries.concat(cur);
cur=new country('SPAIN');countries=countries.concat(cur);
cur=new country('THAILAND');countries=countries.concat(cur);
cur=new country('U.K');countries=countries.concat(cur);
cur=new country('U.S.A');countries=countries.concat(cur);
cur=new country('UKRAINE');countries=countries.concat(cur);
cur=new country('YUGOSLAVIA');countries=countries.concat(cur);
cur=new country('中国');countries=countries.concat(cur);
cur.addProvince(new province('北京'));
cur.addProvince(new province('上海'));
cur.addProvince(new province('广东'));
cur.addProvince(new province('安徽'));
cur.addProvince(new province('重庆'));
cur.addProvince(new province('福建'));
cur.addProvince(new province('浙江'));
cur.addProvince(new province('新疆'));
cur.addProvince(new province('西藏'));
cur.addProvince(new province('天津'));
cur.addProvince(new province('四川'));
cur.addProvince(new province('陕西'));
cur.addProvince(new province('山东'));
cur.addProvince(new province('山西'));
cur.addProvince(new province('青海'));
cur.addProvince(new province('宁夏'));
cur.addProvince(new province('内蒙古'));
cur.addProvince(new province('辽宁'));
cur.addProvince(new province('江西'));
cur.addProvince(new province('江苏'));
cur.addProvince(new province('湖南'));
cur.addProvince(new province('湖北'));
cur.addProvince(new province('黑龙江'));
cur.addProvince(new province('河南'));
cur.addProvince(new province('海南'));
cur.addProvince(new province('贵州'));
cur.addProvince(new province('广西'));
cur.addProvince(new province('甘肃'));
cur.addProvince(new province('云南'));
cur=new country('中国香港');countries=countries.concat(cur);
cur=new country('中国台湾');countries=countries.concat(cur);
cur=new country('中国澳门');countries=countries.concat(cur);
cur=new country('Other Area');countries=countries.concat(cur);
