function changAdvType(obj)
{
	var type = obj.value;
	var advid = $("#advid").val();  //可能存在的广告ID
	var code = "";
	$.ajax({
		  url: APP+"?"+VAR_MODULE+"=Adv&"+VAR_ACTION+"=getAdvInfo&id="+advid,
		  cache: false,
		  success:function(data)
		  {
			data = $.evalJSON(data);
			if(data!=null)
			{
				code = data.code;
			}	
			
			var html ="";
			if(type==1||type==2)
			{
				if(type==1)
				{
					$("#urlrow").show();
				}
				else
				{
					$("#urlrow").hide();
				}
				$("#sizerow").show();
				html = "<input type='file' name='code' />";
				if(code!="")
				{
					html += "&nbsp;&nbsp;<a href='"+ROOT_PATH+code+"' target='_blank'>"+VIEW+"</a>";
				}
			}
			else
			{
				$("#sizerow").hide();
				$("#urlrow").hide();
				html ="<textarea name='code' class='bLeft' cols='50' rows='2' >"+code+"</textarea>";
			}
			$("#code").html(html);
		  }
		}); 

	
}