
var last_id = 1;
var last_id1 = 1;
var last_id2 = 1;
var last_id3 = 1;
var last_id4 = 1;
var last_id5 = 1;
var last_id6 = 1;


function delight(id){
	if(id != last_id){
			document.getElementById("button_" + last_id).className = "cell-button-off";
			document.getElementById("button_" + id).className = "cell-button";
			document.getElementById("content_" + last_id).className = "off";
			document.getElementById("content_" + id).className = "mainso-content";
			last_id = id;
	}
}
function delight1(id){
	if(id != last_id1){
			document.getElementById("button1_" + last_id1).className = "cell-button-off1";
			document.getElementById("button1_" + id).className = "cell-button1";
			document.getElementById("content1_" + last_id1).className = "off1";
			document.getElementById("content1_" + id).className = "mainso-content1";
			last_id1 = id;
	}
}	
function delight2(id){
	if(id != last_id2){
			document.getElementById("button2_" + last_id2).className = "cell-button-off2";
			document.getElementById("button2_" + id).className = "cell-button2";
			document.getElementById("content2_" + last_id2).className = "off2";
			document.getElementById("content2_" + id).className = "mainso-content2";
			last_id2 = id;
	}
}	
function delight3(id){
	if(id != last_id3){
			document.getElementById("button3_" + last_id3).className = "cell-button-off3";
			document.getElementById("button3_" + id).className = "cell-button3";
			document.getElementById("content3_" + last_id3).className = "off3";
			document.getElementById("content3_" + id).className = "mainso-content3";
			last_id3 = id;
	}
}	
function delight4(id){
	if(id != last_id4){
			document.getElementById("button4_" + last_id4).className = "cell-button-off4";
			document.getElementById("button4_" + id).className = "cell-button4";
			document.getElementById("content4_" + last_id4).className = "off4";
			document.getElementById("content4_" + id).className = "mainso-content4";
			last_id4 = id;
	}
}	
function delight5(id){
	if(id != last_id5){
			document.getElementById("button5_" + last_id5).className = "cell-button-off5";
			document.getElementById("button5_" + id).className = "cell-button5";
			document.getElementById("content5_" + last_id5).className = "off5";
			document.getElementById("content5_" + id).className = "mainso-content5";
			last_id5 = id;
	}
}	
function delight6(id){
	if(id != last_id6){
			document.getElementById("button6_" + last_id6).className = "cell-button-off6";
			document.getElementById("button6_" + id).className = "cell-button6";
			document.getElementById("content6_" + last_id6).className = "off6";
			document.getElementById("content6_" + id).className = "mainso-content6";
			last_id6 = id;
	}
}	
	
function myclear(id){
		document.getElementById(id).value="";
		document.getElementById(id).focus();
}
function CheckForm()
{
  document.UserReg.Province.value=document.UserReg.City1.value;
  document.UserReg.City.value=document.UserReg.City2.value;
  document.UserReg.Area.value=document.UserReg.City3.value;
  document.UserReg1.Province.value=document.UserReg1.City4.value;
  document.UserReg1.City.value=document.UserReg1.City5.value;
  document.UserReg1.Area.value=document.UserReg1.City6.value;
  
}

<!-- 
//屏蔽js错误 
function ResumeError() { 
return true; 
} 
window.onerror = ResumeError; 
// --> 
function SetAlpha(){ 
if(document.all){ 
if(oi.filters && oi.filters.Alpha) oi.filters.Alpha.opacity = opacity; 
}else{ 
oi.style.MozOpacity = ((opacity >= 100)? 99:opacity) / 100; 
} 
} 

function ImgSwitch(id, p){ 
if(p){ 
pause = true; 
opacity = 100; 
SetAlpha(); 
} 
oi.src = imgs[id].src; 
document.getElementById("dlink").href = links[id]; 
document.getElementById("it" + lastid).className = "off"; 
document.getElementById("it" + id).className = "on"; 
document.getElementById("titnv").innerHTML = "<b>" + tits[id] + "</b>"; 
curid = lastid = id; 
} 

function ScrollImg(){ 
if(pause && opacity >= 100) return; 
if(sw == 0){ 
opacity += 2; 
if(opacity > delay){ opacity = 100; sw = 1; } 
} 
if(sw == 1){ 
opacity -= 3; 
if(opacity < 10){ opacity = 10; sw = 3; } 
} 
SetAlpha(); 
if(sw != 3) return; 
sw = 0; 
curid++; 
//修改点2：这里的4也是个数 
if(curid > count) curid = 1; 
ImgSwitch(curid, false); 
} 

function Pause(s){ 
pause = s; 
} 

function StartScroll(){ 
setInterval(ScrollImg, speed); 
} 

function CheckLoad(){ 
if (imgs[1].complete == true && imgs[2].complete == true) { 
clearInterval(checkid); 
setTimeout(StartScroll, 5000); 
} 
} 

var checkid = setInterval(CheckLoad, 10); 


 var prox; 
    var proy; 
    var proxc; 
    var proyc; 
	function change() {
		if(document.getElementById("fd").style.display=="none"){
			show("fd");return false;
		}
		else {
			closeed("fd");return false;
		}
	}
    function show(id){/*--打开--*/ 
        clearInterval(prox); 
        clearInterval(proy); 
        clearInterval(proxc); 
        clearInterval(proyc); 
        var o = document.getElementById(id); 
        o.style.display = "block"; 
        o.style.width = "1px"; 
        o.style.height = "1px";  
        prox = setInterval(function(){openx(o,400)},10); 
    }     
    function openx(o,x){/*--打开x--*/ 
        var cx = parseInt(o.style.width); 
        if(cx < x) 
        { 
            o.style.width = (cx + Math.ceil((x-cx)/5)) +"px"; 
        } 
        else 
        { 
            clearInterval(prox); 
            proy = setInterval(function(){openy(o,400)},10); 
        } 
    }     
    function openy(o,y){/*--打开y--*/     
        var cy = parseInt(o.style.height); 
        if(cy < y) 
        { 
            o.style.height = (cy + Math.ceil((y-cy)/5)) +"px"; 
        } 
        else 
        { 
            clearInterval(proy);             
        } 
    }     
    function closeed(id){/*--关闭--*/ 
        clearInterval(prox); 
        clearInterval(proy); 
        clearInterval(proxc); 
        clearInterval(proyc);         
        var o = document.getElementById(id); 
        if(o.style.display == "block") 
        { 
            proyc = setInterval(function(){closey(o)},10);             
        }         
    }     
    function closey(o){/*--打开y--*/     
        var cy = parseInt(o.style.height); 
        if(cy > 0) 
        { 
            o.style.height = (cy - Math.ceil(cy/5)) +"px"; 
        } 
        else 
        { 
            clearInterval(proyc);                 
            proxc = setInterval(function(){closex(o)},10); 
        } 
    }     
    function closex(o){/*--打开x--*/ 
        var cx = parseInt(o.style.width); 
        if(cx > 0) 
        { 
            o.style.width = (cx - Math.ceil(cx/5)) +"px"; 
        } 
        else 
        { 
            clearInterval(proxc); 
            o.style.display = "none"; 
        } 
    }     
     
     
    /*-------------------------鼠标拖动---------------------*/     
    var od = document.getElementById("fd");     
    var dx,dy,mx,my,mouseD; 
    var odrag; 
    var isIE = document.all ? true : false; 
    document.onmousedown = function(e){ 
        var e = e ? e : event; 
        if(e.button == (document.all ? 1 : 0)) 
        { 
            mouseD = true;             
        } 
    } 
    document.onmouseup = function(){ 
        mouseD = false; 
        odrag = ""; 
        if(isIE) 
        { 
            od.releaseCapture(); 
            od.filters.alpha.opacity = 100; 
        } 
        else 
        { 
            window.releaseEvents(od.MOUSEMOVE); 
            od.style.opacity = 1; 
        }         
    } 
     
     
    //function readyMove(e){     
    od.onmousedown = function(e){ 
        odrag = this; 
        var e = e ? e : event; 
        if(e.button == (document.all ? 1 : 0)) 
        { 
            mx = e.clientX; 
            my = e.clientY; 
            od.style.left = od.offsetLeft + "px"; 
            od.style.top = od.offsetTop + "px"; 
            if(isIE) 
            { 
                od.setCapture();                 
                od.filters.alpha.opacity = 50; 
            } 
            else 
            { 
                window.captureEvents(Event.MOUSEMOVE); 
                od.style.opacity = 0.5; 
            } 
             
            //alert(mx); 
            //alert(my); 
             
        }  
    } 
    document.onmousemove = function(e){ 
        var e = e ? e : event; 
         
        //alert(mrx); 
        //alert(e.button);         
        if(mouseD==true && odrag) 
        {         
            var mrx = e.clientX - mx; 
            var mry = e.clientY - my;     
            od.style.left = parseInt(od.style.left) +mrx + "px"; 
            od.style.top = parseInt(od.style.top) + mry + "px";             
            mx = e.clientX; 
            my = e.clientY; 
             
        } 
    } 
	
	 var prox; 
    var proy; 
    var proxc; 
    var proyc; 
	function change() {
		if(document.getElementById("fd").style.display=="none"){
			show("fd");return false;
		}
		else {
			closeed("fd");return false;
		}
	}
    function show(id){/*--打开--*/ 
        clearInterval(prox); 
        clearInterval(proy); 
        clearInterval(proxc); 
        clearInterval(proyc); 
        var o = document.getElementById(id); 
        o.style.display = "block"; 
        o.style.width = "1px"; 
        o.style.height = "1px";  
        prox = setInterval(function(){openx(o,400)},10); 
    }     
    function openx(o,x){/*--打开x--*/ 
        var cx = parseInt(o.style.width); 
        if(cx < x) 
        { 
            o.style.width = (cx + Math.ceil((x-cx)/5)) +"px"; 
        } 
        else 
        { 
            clearInterval(prox); 
            proy = setInterval(function(){openy(o,400)},10); 
        } 
    }     
    function openy(o,y){/*--打开y--*/     
        var cy = parseInt(o.style.height); 
        if(cy < y) 
        { 
            o.style.height = (cy + Math.ceil((y-cy)/5)) +"px"; 
        } 
        else 
        { 
            clearInterval(proy);             
        } 
    }     
    function closeed(id){/*--关闭--*/ 
        clearInterval(prox); 
        clearInterval(proy); 
        clearInterval(proxc); 
        clearInterval(proyc);         
        var o = document.getElementById(id); 
        if(o.style.display == "block") 
        { 
            proyc = setInterval(function(){closey(o)},10);             
        }         
    }     
    function closey(o){/*--打开y--*/     
        var cy = parseInt(o.style.height); 
        if(cy > 0) 
        { 
            o.style.height = (cy - Math.ceil(cy/5)) +"px"; 
        } 
        else 
        { 
            clearInterval(proyc);                 
            proxc = setInterval(function(){closex(o)},10); 
        } 
    }     
    function closex(o){/*--打开x--*/ 
        var cx = parseInt(o.style.width); 
        if(cx > 0) 
        { 
            o.style.width = (cx - Math.ceil(cx/5)) +"px"; 
        } 
        else 
        { 
            clearInterval(proxc); 
            o.style.display = "none"; 
        } 
    }     
     
     
    /*-------------------------鼠标拖动---------------------*/     
    var od = document.getElementById("fd");     
    var dx,dy,mx,my,mouseD; 
    var odrag; 
    var isIE = document.all ? true : false; 
    document.onmousedown = function(e){ 
        var e = e ? e : event; 
        if(e.button == (document.all ? 1 : 0)) 
        { 
            mouseD = true;             
        } 
    } 
    document.onmouseup = function(){ 
        mouseD = false; 
        odrag = ""; 
        if(isIE) 
        { 
            od.releaseCapture(); 
            od.filters.alpha.opacity = 100; 
        } 
        else 
        { 
            window.releaseEvents(od.MOUSEMOVE); 
            od.style.opacity = 1; 
        }         
    } 
     
     
    //function readyMove(e){     
    od.onmousedown = function(e){ 
        odrag = this; 
        var e = e ? e : event; 
        if(e.button == (document.all ? 1 : 0)) 
        { 
            mx = e.clientX; 
            my = e.clientY; 
            od.style.left = od.offsetLeft + "px"; 
            od.style.top = od.offsetTop + "px"; 
            if(isIE) 
            { 
                od.setCapture();                 
                od.filters.alpha.opacity = 50; 
            } 
            else 
            { 
                window.captureEvents(Event.MOUSEMOVE); 
                od.style.opacity = 0.5; 
            } 
             
            //alert(mx); 
            //alert(my); 
             
        }  
    } 
    document.onmousemove = function(e){ 
        var e = e ? e : event; 
         
        //alert(mrx); 
        //alert(e.button);         
        if(mouseD==true && odrag) 
        {         
            var mrx = e.clientX - mx; 
            var mry = e.clientY - my;     
            od.style.left = parseInt(od.style.left) +mrx + "px"; 
            od.style.top = parseInt(od.style.top) + mry + "px";             
            mx = e.clientX; 
            my = e.clientY; 
             
        } 
    } 