//多行表格选择框
function checkChanged(isChecked,name)
{
	for(i=0;i<document.forms[0].elements.length;i++)
		if(document.forms[0].elements[i].type=="checkbox")
		    if(name!="")
		    {
		        if(document.forms[0].elements[i].name==name)
		    	    document.forms[0].elements[i].checked=isChecked;
		    }
		    else
		    	document.forms[0].elements[i].checked=isChecked;
}
//---------------------------------------------------------------------------------
//弹出对话框
function popUpWindow(URLStr, width, height)
{
   left1=screen.width-width;
   left1=left1/2;
   top1=screen.height-height;
   top1=top1/2;
   window.open(URLStr, '', 'toolbar=no,location=no,directories=no,status=yes,menub ar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left1+', top='+top1+',screenX='+left1+',screenY='+top1+'');
   return false;
}
function ShowDialog(pagePath, args, width, height)
{
	return showModalDialog(pagePath, args, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:yes;status:no");
}
//---------------------------------------------------
//设置页面bodyd的onload和onunload事件

function Body_Onload()
{
  try{InitDoc();}catch(e){}
}
function Body_Onunload()
{
  try{CloseDoc();}catch(e){}
}
function Body_Resize()
{
 try{ResizeDoc();}catch(e){}
}
//-------------------------------------------------------------
//Html编辑
var sBasePath = "../common/editor/"
var isManager=false;
function CreatEditor(name,toolbar,value)
{
    var oFCKeditor = new FCKeditor( name ) ;
    oFCKeditor.BasePath	= sBasePath ;
    if(!isManager)
    {
        oFCKeditor.Config["LinkBrowser"] = false ;
        oFCKeditor.Config["ImageBrowser"] = false ;
        oFCKeditor.Config["FlashBrowser"] = false ;
        oFCKeditor.Config["LinkUpload"] = false ;
        oFCKeditor.Config["ImageUpload"] = false ;
        oFCKeditor.Config["FlashUpload"] = false ;
    }
    oFCKeditor.ToolbarSet=toolbar;
    oFCKeditor.Create() ;
}
function ReplaceTextArea(areaname,toolbar)
{
    var oFCKeditor = new FCKeditor(areaname ) ;
    oFCKeditor.BasePath	= sBasePath ;
    if(!isManager)
    {
        oFCKeditor.Config["LinkBrowser"] = false ;
        oFCKeditor.Config["ImageBrowser"] = false ;
        oFCKeditor.Config["FlashBrowser"] = false ;
        oFCKeditor.Config["LinkUpload"] = false ;
        oFCKeditor.Config["ImageUpload"] = false ;
        oFCKeditor.Config["FlashUpload"] = false ;
    }
    oFCKeditor.Height="200px";
    oFCKeditor.ToolbarSet=toolbar
   
    oFCKeditor.ReplaceTextarea() 
}