	function getObject(id) {
		if (document.getElementById(id)) {
			return document.getElementById(id);
		} else if(document.all) {
			return document.all[id];
		} else if(document.layers) {
			return document.layers[id];
		}
	}



	function onchgProv()
	{
		gpm.initCity1(document.getElementById('f_User_Town'), gpm.getSelValue(document.getElementById('f_User_Province')));
		gpm.initCity2(document.getElementById('f_User_City'), '', '');		/* clear city2 select options*/
	}
	function onchgCity1()
	{
		gpm.initCity2(document.getElementById('f_User_City'), gpm.getSelValue(document.getElementById('f_User_Province')), gpm.getSelValue(document.getElementById('f_User_Town')));
	}
	function onchgProvHome()
	{
		gpm.initCity1(document.getElementById('f_User_HomeTown'), gpm.getSelValue(document.getElementById('f_User_HomeProvince')));
		gpm.initCity2(document.getElementById('f_User_HomeCity'), '', '');		/* clear city2 select options*/
	}
	function onchgCity1Home()
	{
		gpm.initCity2(document.getElementById('f_User_HomeCity'), gpm.getSelValue(document.getElementById('f_User_HomeProvince')), gpm.getSelValue(document.getElementById('f_User_HomeTown')));
	}
	
	
	function resizeimg(ImgD,iwidth,iheight) {
     var image=new Image();
     image.src=ImgD.src;
     if(image.width>0 && image.height>0){
        if(image.width/image.height>= iwidth/iheight){
           if(image.width>iwidth){
               ImgD.width=iwidth;
               ImgD.height=(image.height*iwidth)/image.width;
           }else{
                  ImgD.width=image.width;
                  ImgD.height=image.height;
                }
               ImgD.alt=image.width+"×"+image.height;
        }
        else{
                if(image.height>iheight){
                       ImgD.height=iheight;
                       ImgD.width=(image.width*iheight)/image.height;
                }else{
                        ImgD.width=image.width;
                        ImgD.height=image.height;
                     }
               // ImgD.alt=image.width+"×"+image.height;
            }
　　　　　ImgD.style.cursor= "pointer"; //改变鼠标指针
　　　　//　ImgD.onclick = function() { window.open(this.src);} //点击打开大图片
　　　  //  ImgD.title = "点击图片可在新窗口打开";
　　　　　　
    }
}
