	function deleteHtml(objId)
	{
	
		var TempStr;
		TempStr=document.getElementById(objId).value;
		var re=/<\/*[^<>]*>/ig
		TempStr=TempStr.replace(re,'');
		return TempStr;
	}

	//????checkbox????
	function checkAll(form)  {
		for (var i=0;i<form.elements.length;i++){
			var e = form.elements[i];
			if ((e.name.indexOf('ID')!=-1 ||e.name.indexOf('id')!=-1||e.name.indexOf('Id')!=-1)  && !e.disabled){
				e.checked = form.chkall.checked; 
			}
		}
	}
	//????????checkbox????????????????????????
	function getSingleSelectValue(checkboxName)  {
		var oEle = document.getElementsByName(checkboxName);
		var retV = "";
		var chkC = 0;
		for(var i=0;i<oEle.length;i++){
			if(oEle[i].checked){
				retV = oEle[i].value;
				chkC ++;
				if(chkC > 1)
					break;
			}
		}
		if(chkC == 0){
			alert("请选择一条记录！");
			return "";
		}else if(chkC > 1){
			alert("您只能选择一条记录！");
			return "";
		}else{
			return retV;
		}
	}
	//????checkbox???????????????? 
	function checkSelect(checkboxName)  {
		var oEle = document.getElementsByName(checkboxName);
		var checkCount = 0;
		var retValue = "";
		for(var i=0;i<oEle.length;i++){
			if(oEle[i].checked){
				return true;	
			}
		}
		return false;
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
//document.onkeydown=keyDown;

function keyDown()
{
	/*	
	//??????????????Ctrl+n??shift+F10??F5????????????
	if((window.event.altKey)&&
	  ((window.event.keyCode==37)|| //???? Alt+ ?????? ??
	  (window.event.keyCode==39))){ //???? Alt+ ?????? ??
	  alert("??????????ALT+??????????????????????");
	  event.returnValue=false;
	  }
	  
	if ((event.ctrlKey)&&(event.keyCode==78)) //???? Ctrl+n
	    {alert("??????????????");
	    event.returnValue=false;}
	if ((event.shiftKey)&&(event.keyCode==121)) //???? shift+F10
	    {alert("????????????????");
	    event.returnValue=false;}
	 if (window.event.srcElement.tagName == "A" && window.event.shiftKey)
	window.event.returnValue = false; //???? shift ????????????????????
	*/
	if ((event.ctrlKey)&&(event.keyCode==81)) {  //CTRL+Q
		//alert(event.keyCode);
		//event.returnValue=false;
		hideshowAll();
	}

}
//????????????????
function showHelp(){
	alert("????????????????");
	event.returnValue = false; 
}

//????????????
function getYearMonthDay(textDate,path){
	var returnAry;
	if(path == undefined) {
		path = "../../";
	}
	returnAry=window.showModalDialog(path + "js/calendar/calendar.htm","????????","status:0;dialogHeight:188px;dialogWidth:300px;dialogTop: "+event.screenY+"px; dialogLeft: "+event.screenX+"px");	
	if (returnAry !=null) {
		textDate.value=returnAry;
	    focus();
	}
}


function getYearMonth(textMonth,path) {
	if(path == undefined) {
		path = "../../";
	}
	path = path + "js/month/selectmonth.htm";
	strFeatures = "dialogWidth=224px;dialogHeight=126px;center=yes;location=0;resizable=0;titlebar=0;scrollbars=0;help=no";
	var defaultMonth = textMonth.value;
	var returnMonth = showModalDialog(path,defaultMonth,strFeatures);
	if(returnMonth == null)
	{ 
		returnMonth="";
	}
	textMonth.value = returnMonth;
}

function getAddressList(textName, path){
	if(path == undefined) {
		path = "../../";
	}
	
	var retVal = window.showModalDialog(path + 'include/addresslist/addressListTree.htm','','dialogHeight=600px;dialogWidth=320px;');
	if(retVal != undefined && retVal!=null){
		document.all[textName].value=retVal;
	}
	else{
		document.all[textName].value="";
	}
}

function getAddressListValue(path){
	if(path == undefined) {
		path = "../../";
	}
	
	var retVal = window.showModalDialog(path + 'include/addresslist/addressListTree.htm','','dialogHeight=600px;dialogWidth=320px;');
	if(retVal == undefined || retVal == null) {
		retVal = "";	
	}
	return retVal;
}

function getDialog(urlPath, isModelessDialog, windowName, width, height){
	if(urlPath == undefined) {
		return null;	
	}
	if(isModelessDialog == undefined) {
		isModelessDialog = "0";	
	}
	if(windowName == undefined) {
		windowName = "myAnonymousWindow";	
	}
	if(width == undefined) {
		width = "400";	
	}
	if(height == undefined) {
		height = "300";	
	}
	var xposition = 0; 
	var yposition = 0;
	if ((parseInt(navigator.appVersion) >= 4 )) {
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	var windowProperty= "width=" + width + "," 
	+ "height=" + height + "," 
	+ "location=0," 
	+ "menubar=0,"
	+ "resizable=0,"
	+ "scrollbars=1,"
	+ "status=0," 
	+ "titlebar=0,"
	+ "toolbar=0,"
	+ "hotkeys=0,"
	+ "screenx=" + xposition + "," //Netscape
	+ "screeny=" + yposition + "," //Netscape
	+ "left=" + xposition + "," //IE
	+ "top=" + yposition; //IE 
	if(isModelessDialog == "1") {
		window.open( urlPath,windowName,windowProperty );
		return new Object();
	} else {
		var returnObj = window.showModalDialog(urlPath,windowName,windowProperty);
		if(returnObj != undefined) {
			return returnObj;	
		} else {
			return new Object();	
		}
	}
}

function getConfirm(msg) {  //??????????
  	if(msg == undefined || msg == null || msg=="") {
		msg = "???????????????";
	}
  	if(confirm(msg)) {
  		return true;
  	} else {
  		return false;
  	}
}

//??????????
function writeTableTop(pageTitle, path) {
	if(pageTitle == undefined) {
		pageTitle = "????????";	
	}
	if(path == undefined) {
		path = "../../";
	}
	document.write("<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>                                                                 				");																																																																																																																																																												
	document.write("   <tr>                                                                                                                                    			");																																																																																																																																																													
	document.write("     <td width='14' valign='top' height='29'><img src='" + path + "images/con_t_left.jpg' width='14' height='29'></td>                                                    			");																																																																																																																																																													
	document.write("    <td background='" + path + "images/con_t_tabg.jpg' valign='top'><table  border='0' cellpadding='0' cellspacing='0' background='" + path + "images/con_t_bg.jpg'>			");																																																																																																																																																													
	document.write("      <tr>                                                                                                                                 			");																																																																																																																																																													
	document.write("        <td valign='top'><img src='" + path + "images/con_t_m.jpg' width='13' height='29'></td>                                                               			");																																																																																																																																																													
	document.write("        <td class='2bt'>" + pageTitle + "</td>                                                                                                         			");																																																																																																																																																													
	document.write("        <td width='41' valign='top'><img src='" + path + "images/con_t_c.jpg' width='41' height='29'></td>                                                    			");																																																																																																																																																													
	document.write("      </tr>                                                                                                                                			");																																																																																																																																																													
	document.write("    </table></td>                                                                                                                          			");																																																																																																																																																													
	document.write("    <td width='15' valign='top'><img src='" + path + "images/con_t_rig.jpg' width='15' height='29'></td>                                                      			");																																																																																																																																																													
	document.write("  </tr>                                                                                                                                    			");																																																																																																																																																													
	document.write("   <tr>                                                                                                                                    			");																																																																																																																																																													
	document.write("    <td background='" + path + "images/con_l_bg.jpg'>&nbsp;</td>                                                                                 			");																																																																																																																																																													
	document.write("    <td bgcolor='#EDF4FD'>                                                                                                                 			");																																																																																																																																																																									
	document.write("	<table width='100%' height='100%'  border='0' cellpadding='' cellspacing='0'>											");																																																																																																																											
	document.write("       <tr>                                                                   											");																																																																																																																											
	document.write("         <td valign='top'> ");	
}

//??????????
function writeTableBottom(path) {
	if(path == undefined) {
		path = "../../";
	}
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</td>");
	document.write("     <td background='" + path + "images/con_t_rg.jpg'>&nbsp;</td>");
	document.write("   </tr>");
	document.write("   <tr>");
	document.write("     <td valign='bottom' background='" + path + "images/con_l_bg.jpg'><img src='" + path + "images/con_d_left.jpg' width='14' height='15'></td>");
	document.write("     <td height='15' background='" + path + "images/con_d_ng.jpg'>&nbsp;</td>");
	document.write("     <td valign='bottom' background='" + path + "images/con_t_rg.jpg'><img src='" + path + "images/con_d_rig.jpg' width='15' height='15'></td>");
	document.write("   </tr>");
	document.write(" </table>");	
}

//????????????????????????
function writePlaceInfo(palceInfoValue) {
	if(parent == undefined || parent == null || parent.placeFrame == undefined || parent.placeFrame == null)
		return false;
	var thisObj = parent.placeFrame.document.getElementById("placeInfo");
	if(thisObj != undefined && thisObj != null) {
		thisObj.innerHTML = palceInfoValue;	
	}
}

function writeInfoToId(fontId, info) {
	var remainPromptFont;
	if(document.getElementById)
		remainPromptFont = document.getElementById(fontId);
	if(remainPromptFont != null)
		remainPromptFont.innerHTML = info;
}

//??????div????????????
function hideshow(which,img,path,isClosed) {

	if(path == undefined) {
		path = "../../";
	}
	if (!document.getElementById|document.all) {
		return;
	}
	else {
		if (document.getElementById) {
			oWhich = eval ("document.getElementById('" + which + "')")
		} else {
			oWhich = eval ("document.all." + which)
		}
	}

	window.focus()
	if(oWhich != null) {
		if (isClosed || oWhich.style.display=="none") {
			oWhich.style.display="";
			if(img!=undefined)
				img.src=path + "images/icon/07-0.gif";
		}
		else {
			oWhich.style.display="none";
			if(img!=undefined)
				img.src=path + "images/icon/07.gif";
				
		}		
	}
}

//??????div????????????
function hideshowAll()
{
	var div_s = document.getElementsByTagName("DIV"); 
	var flag;
	flag = true;
	var isClosed; //????????????
	for(i=0;i<div_s.length;i++)
	{
		var sId = div_s[i].id;
		if(sId.indexOf("ccParent") != -1 )
		{
			var sChildId = "ccChild" + sId.substr("ccParent".length);
			//alert(sChildId);
			var imgs = div_s[i].getElementsByTagName("IMG"); 
			if(imgs.length !=1) continue;
			var img_src = imgs[0].src;
			if(flag) //???????????????? 
			{
				isClosed = (img_src.indexOf("07-0.gif") == -1);
				flag = !flag;
			}
			hideshow(sChildId,imgs[0],isClosed);
		}
	}
}

//????????????????
function initccExpandible() {
	//hideshow('ccChild0')
	hideshow('ccChild1')
	hideshow('ccChild2')
	hideshow('ccChild3')
	//hideshow('ccChild4')
	//hideshow('ccChild5')
}

//??????????
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}





//????????????????????
// work around bug in xpcdom Mozilla 0.9.1
window.saveNavigator = window.navigator;

// Handy functions
function noop() {}
function noerror() { return true; }

function defaultOnError(msg, url, line)
{
	// customize this for your site
	if (top.location.href.indexOf('_files/errors/') == -1)
		top.location = '/evangelism/xbProjects/_files/errors/index.html?msg=' + escape(msg) + '&url=' + escape(url) + '&line=' + escape(line);
}

// Display Error page...  
// XXX: more work to be done here
//
function reportError(message)
{
	// customize this for your site
	if (top.location.href.indexOf('_files/errors/') == -1)
		top.location = '/evangelism/xbProjects/_files/errors/index.html?msg=' + escape(message);
}

function pageRequires(cond, msg, redirectTo)
{
	if (!cond)
	{
		msg = 'This page requires ' + msg;
		top.location = redirectTo + '?msg=' + escape(msg);
	}
	// return cond so can use in <A> onclick handlers to exclude browsers
	// from pages they do not support.
	return cond;
}

function detectBrowser()
{
	var oldOnError = window.onerror;
	var element = null;
	
	window.onerror = defaultOnError;

	navigator.OS		= '';
	navigator.version	= 0;
	navigator.org		= '';
	navigator.family	= '';

	var platform;
	if (typeof(window.navigator.platform) != 'undefined')
	{
		platform = window.navigator.platform.toLowerCase();
		if (platform.indexOf('win') != -1)
			navigator.OS = 'win';
		else if (platform.indexOf('mac') != -1)
			navigator.OS = 'mac';
		else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
			navigator.OS = 'nix';
	}

	var i = 0;
	var ua = window.navigator.userAgent.toLowerCase();
	
	if (ua.indexOf('opera') != -1)
	{
		i = ua.indexOf('opera');
		navigator.family	= 'opera';
		navigator.org		= 'opera';
		navigator.version	= parseFloat('0' + ua.substr(i+6), 10);
	}
	else if ((i = ua.indexOf('msie')) != -1)
	{
		navigator.org		= 'microsoft';
		navigator.version	= parseFloat('0' + ua.substr(i+5), 10);
		
		if (navigator.version < 4)
			navigator.family = 'ie3';
		else
			navigator.family = 'ie4'
	}
	else if (typeof(window.controllers) != 'undefined' && typeof(window.locationbar) != 'undefined')
	{
		i = ua.lastIndexOf('/')
		navigator.version = parseFloat('0' + ua.substr(i+1), 10);
		navigator.family = 'gecko';

		if (ua.indexOf('netscape') != -1)
			navigator.org = 'netscape';
		else if (ua.indexOf('compuserve') != -1)
			navigator.org = 'compuserve';
		else
			navigator.org = 'mozilla';
	}
	else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
	{
	    var is_major = parseFloat(navigator.appVersion);
    
		if (is_major < 4)
			navigator.version = is_major;
		else
		{
			i = ua.lastIndexOf('/')
			navigator.version = parseFloat('0' + ua.substr(i+1), 10);
		}
		navigator.org = 'netscape';
		navigator.family = 'nn' + parseInt(navigator.appVersion);
	}
	else if ((i = ua.indexOf('aol')) != -1 )
	{
		// aol
		navigator.family	= 'aol';
		navigator.org		= 'aol';
		navigator.version	= parseFloat('0' + ua.substr(i+4), 10);
	}

	navigator.DOMCORE1	= (typeof(document.getElementsByTagName) != 'undefined' && typeof(document.createElement) != 'undefined');
	navigator.DOMCORE2	= (navigator.DOMCORE1 && typeof(document.getElementById) != 'undefined' && typeof(document.createElementNS) != 'undefined');
	navigator.DOMHTML	= (navigator.DOMCORE1 && typeof(document.getElementById) != 'undefined');
	navigator.DOMCSS1	= ( (navigator.family == 'gecko') || (navigator.family == 'ie4') );

	navigator.DOMCSS2   = false;
	if (navigator.DOMCORE1)
	{
		element = document.createElement('p');
		navigator.DOMCSS2 = (typeof(element.style) == 'object');
	}

	navigator.DOMEVENTS	= (typeof(document.createEvent) != 'undefined');

	window.onerror = oldOnError;
}

//??????????????????????option??????????????????value????0??????????????
//????selectName:??????????????moveType??????????????top??????up??????down??????bottom????
function moveSelect_onClick(selectObj,moveType) {
	var sel = selectObj;
	var val = parseInt(sel.value,10);
	
	if(moveType=="top") {
		if(val==0) {
			alert("????????????");
			return false;
		}
		var temp = sel[val].text;
		for(var i=val;i>0;i--) {
			sel[i].text = sel[i-1].text;
		}
		sel[0].text = temp;
		sel.selectedIndex = 0;
	}
	
	if(moveType=="up") {
		if(val==0) {
			alert("????????????");
			return false;
		}
		var temp = sel[val-1].text;
		sel[val-1].text = sel[val].text;
		sel[val].text = temp;
		sel.selectedIndex = val-1;
	}
	
	if(moveType=="down") {
		if(val>=sel.size-1) {
			alert("????????????");
			return false;
		}
		var temp = sel[val+1].text;
		sel[val+1].text = sel[val].text;
		sel[val].text = temp;
		sel.selectedIndex = val+1;
	}
	
	if(moveType=="bottom") {
		if(val>=sel.size-1) {
			alert("????????????");
			return false;
		}
		var temp = sel[val].text;
		for(var i=val;i<sel.size-1;i++) {
			sel[i].text = sel[i+1].text;
		}
		sel[sel.size-1].text = temp;
		sel.selectedIndex = sel.size-1;
	}
}

detectBrowser();

