/**************************************************Iframe上传文件 Start*************************************************************/
function LoadUploadIframe(IframeName,EditName,UpPath,Filelx,EditValue,ButtonIndex,TableName,FieldName)
{
/*
函数功能：加载上传框架
IframeName：内置框架
EditName：表单
UpPath：上传路径
Filelx：文件类型
EditValue：表单值
ButtonIndex：按钮索引
TableName：表名
FieldName：字段名
*/

   var Url;
   Url="/Include/Upload.asp?EditName=" + EditName
   Url=Url + "&UpPath=" + UpPath
   Url=Url + "&Filelx=" + Filelx               
   Url=Url + "&ButtonIndex=" + ButtonIndex               
   Url=Url + "&TableName=" + TableName
   Url=Url + "&FieldName=" + FieldName

   window.frames.item(IframeName).location=Url;

   if(EditValue==""){ArrButton[ButtonIndex].style.display="none";}
}
/**************************************************Iframe上传文件 End*************************************************************/




/**************************************************Iframe上传文件 Start*************************************************************/
function LoadUploadIframeAgent(FormName,IframeName,EditName,UpPath,Filelx,EditValue)
{
/*
函数功能：加载上传框架
IframeName：内置框架
EditName：表单
UpPath：上传路径
Filelx：文件类型
EditValue：表单值
ButtonIndex：按钮索引
TableName：表名
FieldName：字段名
*/

   var Url;
   Url="/Agent/Upload.asp?FormName=" + FormName
   Url=Url + "&EditName=" + EditName
   Url=Url + "&UpPath=" + UpPath
   Url=Url + "&Filelx=" + Filelx               
   Url=Url + "&EditValue=" + EditValue

   window.frames.item(IframeName).location=Url;
}
/**************************************************Iframe上传文件 End*************************************************************/


/*****************************************************功能函数:Trim Start****************************************************************/
String.prototype.trim = function()
{   return this.replace(/(^[\s]*)|([\s]*$)/g, "");   }
/*****************************************************功能函数:Trim End****************************************************************/



/*************************************************功能函数:SafeConvert Start************************************************************/
String.prototype.SafeConvert = function()
{
//return this.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/[\s]/g, "&nbsp;");
return this.replace(/</g, "&lt;").replace(/>/g, "&gt;");
}
/*************************************************功能函数:SafeConvert End************************************************************/



/*************************************************功能函数:Remove Start************************************************************/
function Remove(Str)
{
   Str=Str.replace(/[\s]/g, "");
   Str=Str.replace(/\?/g, "");
   Str=Str.replace(/#/g, "");
   Str=Str.replace(/&/g, "");
   return Str;   
}
/*************************************************功能函数:Remove End************************************************************/



/*************************************************功能函数:Opposite Start************************************************************/
function Opposite(ArrCheckBoxName)
{
   var blnTemp
   blnTemp=true;

   if (ArrCheckBoxName[0].checked==false){blnTemp=false;}

   for (var i=1; i < ArrCheckBoxName.length; i++)
   {ArrCheckBoxName[i].checked=blnTemp;}
}
/*************************************************功能函数:Opposite End************************************************************/


