//打印 
function doPrint() {
bdhtml=window.document.body.innerHTML;    
sprnstr="<!--startprint-->";    
eprnstr="<!--endprint-->";    
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);    
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));    
window.document.body.innerHTML=prnhtml;    
window.print();    
}    
//点击复制
function doCopy(){
	var clipBoardContent="";
	//clipBoardContent+=document.title;
	//clipBoardContent+="\n";
	clipBoardContent=this.location.href; //获取地址
	window.clipboardData.setData("Text",clipBoardContent);
	alert("复制成功");
}
//
function smsg(name,string){
	obj('s'+name).innerHTML=string;
}
//
function obj(iid){
	return document.getElementById(iid);
}
//验证码的js
function checkcode(){
	document.write("<img src='class/code.php' id='code-php' onclick='recheckcode(this)' style='cursor:pointer' title='看不清，点击图片换一张。'/>");
}
function recheckcode(obj){
	obj.src='/class/code.php?id='+Math.random();
}

function mupfile(htmlid,dirname,width,height,top,left){
	window.open('?file=upload&dirname='+dirname+'&htmlid='+htmlid,'datetime',"Scrollbars=no,Toolbar=no,Location=no,Direction=no,Resizeable=no,width="+width+" ,height="+height+",top="+top+",left="+left);
}

function GetCheckValue(ids){
	var Sid=document.getElementsByName(ids);
	var value='';
	for(var i=0;i<Sid.length;i++){
		if(Sid[i].checked==true){
			value=value+Sid[i].value+',';
		}
	}
	value=value.substring(0,value.length-1);
	return value;
}
function GetId(ids){
	return document.getElementById(ids);
}

