
// JavaScript Document
//控制一系列选框多选
function selall(id1,id2)
{
		for(i=0;i<id2.length;i++)
		{
			if(id1.checked==true)
			{		
				id2[i].checked=true;
			}
			else
			{
				id2[i].checked=false;
			}
		}
}
/*控制鼠标事件的样式改变   itemname = 栏目名称（+1）  itemclass = 栏目要显示的样式名，showid要显示的栏目，NUM=栏目总数*/
function itemshow(itemname,showid,num,tagclassid,clsname)
{
	var clsarr=new Array(2);
	if(clsname.indexOf("|")>0)
	{
		clsarr[0] = clsname.split("|")[0];
		clsarr[1] = clsname.split("|")[1];
	}
	else
	{
		clsarr[0] = clsname;
		clsarr[1] = "";
	}
	for(i=1;i<num+1;i++)
	{
		if(document.getElementById(itemname+i)!=null)
		{document.getElementById(itemname+i).style.display="none";}
		if(document.getElementById(tagclassid+i)!=null)
		{
		document.getElementById(tagclassid+i).className = clsarr[1];
		}
		if(showid==i)
		{
			if(document.getElementById(itemname+i)!=null)
			{
				document.getElementById(itemname+i).style.display= "";
			}
			if(document.getElementById(tagclassid+i)!=null)
			{document.getElementById(tagclassid+i).className = clsarr[0];}
		}
	}
}
//创建动态层
function createDiv(newName,vis,htmlTxt)
{
	var newDiv=document.createElement("div");
	newDiv.id=newName;
	newDiv.style.visibility = vis;
	newDiv.setAttibute = ("name",newName);
	newDiv.style.position = "absolute";
	newDiv.style.width = "100";
	newDiv.style.top="50";
	newDiv.style.backgroundColor = "#cccccc";
	newDiv.innerHTML=htmlTxt;
	document.body.appendChild(newDiv);
}
function settime()
{
		var ssss = "dsfs  dfsdf";
		var aaa = ssss.substr(0,3);
	var fushu = -2;
	var jueduizhi = Math.abs(fushu);
	alert(screen.width.toString());
	alert(location.pathname);
	open('','_blank','width=400,height=100,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no');
}
	
//取消动态层
function cancelDiv(newName)
{
	document.getElementById(newName).style.visibility="hidden";
}

