﻿// JScript 文件

function MqObj(obj,width,height,speed,direct){
	obj.contWidth=obj.offsetWidth;// offsetWidth
	obj.stopscroll=false;
	obj.nowscroll=0;
	with(obj){
		scrollLeft=0;//
		innerHTML+=innerHTML;
		style.width=width;
		style.height=height;
		style.overflowX="hidden";//
		style.overflowY="visible";//
		noWrap=true;
		onmouseover=function(){stopscroll=true};
		onmouseout=function(){stopscroll=false};
	}
	eval("setInterval('doScroll("+obj.id+")',"+speed+")");
}
function doScroll(obj){
	if(obj.stopscroll==true) return;
	if(obj.nowscroll<obj.contWidth){ // 
	obj.scrollLeft=obj.nowscroll++;//scrollLeft
	}else{
	obj.scrollLeft=0;//scrollLeft
	obj.nowscroll=0;
	}
}
window.onload=function(){
	MqObj(tbmq,"965","58","10")
	
}



function ijiajia(id)
{
if(document.getElementById("yk"+id.substr(3)).value!="" )
document.getElementById("yk"+id.substr(3)).value=parseInt(document.getElementById("yk"+id.substr(3)).value)+1;
else
document.getElementById("yk"+id.substr(3)).value=1;
//alert("1");
}

function ijiajia2(id)
{
if(document.getElementById("yk"+id.substr(3)).value!="" && parseInt(document.getElementById("yk"+id.substr(3)).value) < parseInt(document.getElementById("ykold"+id.substr(3)).value) )
document.getElementById("yk"+id.substr(3)).value=parseInt(document.getElementById("yk"+id.substr(3)).value)+1;
else
document.getElementById("yk"+id.substr(3)).value=1;
//alert("1");
}

function ijianjian(id)
{
if(document.getElementById("yk"+id.substr(3)).value!="" && parseInt(document.getElementById("yk"+id.substr(3)).value)>0)
document.getElementById("yk"+id.substr(3)).value=parseInt(document.getElementById("yk"+id.substr(3)).value)-1;
else
document.getElementById("yk"+id.substr(3)).value=0;
//alert("1");
}

function but(id)
{

if(document.getElementById(id).value=="zg")
{
	var arrAll=document.all;
    for(var i=0;i<arrAll.length;i++)
    {
       if(arrAll[i].type=='checkbox')
       { 
            document.getElementById(arrAll[i].id).checked=document.getElementById(id).checked;
       }
	}
}

if(document.getElementById(id).value=="gs" && id.substr!="ch" )
{
	var arrAll=document.all;
    for(var i=0;i<arrAll.length;i++)
    {
		//alert((arrAll[i].id).substr(0,3));
       if(arrAll[i].type=='checkbox' && arrAll[i].id.substr(0,3)==id )
       {
            document.getElementById(arrAll[i].id).checked=document.getElementById(id).checked;
       }
	}
}

    var arrAll=document.all;
    document.getElementById("typeA").value=document.getElementById("typeA").value="";
    document.getElementById("_ctl0_ContentPlaceHolder1_TextBox2").value="";
    for(var j=0;j<arrAll.length;j++)
    {
        if(arrAll[j].type=='checkbox')
        {
            //alert(arrAll[j].id.substr(3,2));
            if(document.getElementById(arrAll[j].id).checked && arrAll[j].id.substr(3,2)=="ch" )
            {
                
                document.getElementById("typeA").value=document.getElementById("typeA").value+document.getElementById("ykv"+(arrAll[j].id).substr(5)).value+",";
                document.getElementById("_ctl0_ContentPlaceHolder1_TextBox2").value=document.getElementById("_ctl0_ContentPlaceHolder1_TextBox2").value+document.getElementById("ykv"+(arrAll[j].id).substr(5)).value+",";
            }
        }
    }

}

