﻿<!--
var oob;
function dodisplay(id){
	var a;
	var PY=document.body.scrollTop;
	var PX=document.body.scrollLeft;
	d1.style.pixelLeft=window.event.clientX+PX;
	d1.style.pixelTop=window.event.clientY+PY-10;
	d1.style.display='';
	cal.style.display='';
	cal.sid=id;
	oob=document.all.item(id);
}
//网页打印时去除页眉和页脚
function Printout()
{
	 factory.printing.header="";
	 factory.printing.footer ="";
	 factory.printing.Print();
}
function callRemoteScript(ID,TB)
{
	var t = "dialogLeft:2000;dialogTop:1000;dialogHeight:0;dialogWidth:0;center:no;edge:raised;' +'help:no;show=no;resizable:no;status:no;scroll:no;unadorned:yes"
	var s = "dategain.asp?ID="+ID+"&TB="+TB+"";
	self.showModalDialog(s,Form1,t);
}

// 函数作用： 在某控件里按回车需要执行另外相关按钮的提交动作使用的函数
// 参数： tagButton 为需要触发提交动作的按钮名称
function __toConfirmButton(tagButton)
{
    if (event.keyCode == 13)
    {
        document.getElementById(tagButton).click();
        return false;
    }
}

//检查输入框中的数据是否超出范围
//Myobj需要检查的输入框
//charamount输入框允许输入的字符
//title输入框的名称
function checkchar(Myobj,charamount,title)
{
	if(Myobj.value!="" )
	{
			if(Myobj.value.length > charamount)
			{
				alert(""+title+" 输入框输入的文字不能够超过"+charamount+" 个字符！您现在已经输入了"+Myobj.value.length+" 个字符。");
				Myobj.focus();
			}
	}	
}
//用于图片的放大和缩小
function imgShow_Tx(o){
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
return false;
}
//错误提示
//Error_path错误路径
function ErrorTx(Error_path){
	L = (screen.width - 350)/2-5;
    T = (screen.height- 130)/2-26;
	window.open(""+Error_path+"","Errorts","width=350,height=130,left="+L+",top="+T+"");
}
// JavaScript Document
//*******************************************************************************************************
//方法名 参数 返回值 
//rdShowMessageDialog(message) message:要显示的信息文字 rdConstOK(1) 
//rdShowMessageDialog(message, mode) message:要显示的信息文字
//mode:信息框样式，可以是rdModeInfo(1)或者rdModeError(0) rdConstOK(1) 
//rdShowConfirmDialog(message) message:要显示的信息文字 rdConstOK(1)或者rdConstCancel(0), 取决于用户的点击 
//rdShowConfirmDialog(message， mode) message:要显示的信息文字
//mode:信息框样式，可以是rdModeInfo(1)或者rdModeError(0) rdConstOK(1)或者rdConstCancel(0), 取决于用户的点击 
//rdShowInputDialog(message) message:要显示的信息文字 用户的输入。 
//*****************************************************************************************************

//窗口宽度
var rdBasicWidth = "426px";
//窗口高度
var rdBasicHeight = "227px";
// The mode of dialog
var rdModeError = 0;
var rdModeInfo = 1;
// The return value of the dialog
var rdConstOK = 1;
var rdConstCancel = 0;
var rdConstRetry = 2;
var _g_privateDialogFeatures = "status=no;center=yes;help=no;dialogWidth="+rdBasicWidth+";dialogHeight="+rdBasicHeight+";scroll=yes;resize=no";


//显示的信息文字
function rdShowMessageDialog(message, mode, strUrl) {
	var w;
	var args;
	// Check the parameter "message"
	if (typeof(message) == "undefined")	{
		args = "";
	} else {
		args = message;
	}

	// Check the parameter "mode"
	if (typeof(mode) != "undefined") {
		if (mode == rdModeError || mode == rdModeInfo)
			args = args + "|" + mode;
	}
	
	w = window.showModalDialog(strUrl,args, _g_privateDialogFeatures);
	return w;
}
//显示输入框
function rdShowInputDialog(message, mode, strUrl) {
	var args;
	var w;
	// Check the parameter "messge"
	if (typeof(message) == "undefined")	{
		args = "";
	} else {
		args = message;
	}

	// Check the parameter "mode"
	if (typeof(mode) != "undefined") {
		if (mode == rdModeError || mode == rdModeInfo)
			args = args + "|" + mode;
	}
	var w = window.showModalDialog(strUrl,args, _g_privateDialogFeatures);
	return w;
}
//显示确认界面
function rdShowConfirmDialog(message, mode, strUrl) {
	var args ;
	var w;
	// Check the parameter "message"
	if (typeof(message) == "undefined")	{
		args = "";
	} else {
		args = message;
	}

	// check the parameter "mode"
	if (typeof(mode) != "undefined") {
		if (mode == rdModeError || mode == rdModeInfo)
			args = args + "|" + mode;
	}
	w = window.showModalDialog(strUrl,args, _g_privateDialogFeatures);
	return w;
}
//日期选择
//oBJ需要返回的控件名
//sUrl日期选择页的地址
function DateShow(oBJ,sUrl)
{
	var ShowDate
	if(ShowDate)
    {
		ShowDate.close();
    }
	L = (screen.width - 268)/2-5;
   	T = (screen.height- 158)/2-26;
	ShowDate=window.open(""+sUrl+"?Field="+oBJ+"","ShowDate","width=268,height=158,left="+L+",top="+T+"");
	//status=yes,scrollbars=yes,
}
//检查输入框中的数据是否超出范围
//Myobj需要检查的输入框
//charamount输入框允许输入的最大数
function checkint(Myobj,charamount)
{
	if(Myobj.value!="" )
	{
			if(Myobj.value > charamount)
			{
				alert(" 输入框输入的数字不能大于"+charamount+" ！请重新输入。");
				Myobj.focus();
				Myobj.value="";
			}
	}	
}
//屏蔽F5键如测试时请把该处屏蔽
/*function document.onkeydown() 
{ 
  if ((window.event.altKey)&&
     ((window.event.keyCode==37)||   //屏蔽 Alt+ 方向键 ←
     (window.event.keyCode==39))){  //屏蔽 Alt+ 方向键 →
    event.returnvalue=false;
    }
  if ((event.keyCode == 8) && 
      (event.srcElement.type != "text" && 
      event.srcElement.type != "textarea" && 
      event.srcElement.type != "password") ||           //屏蔽退格删除键   
      (event.keyCode==116)||                            //屏蔽 F5 刷新键
      (event.ctrlKey && event.keyCode==82)){            //Ctrl + R
     event.keyCode=0;
     event.returnvalue=false;
     }
  if ((event.ctrlKey)&&(event.keyCode==78))   //屏蔽 Ctrl+n
     event.returnvalue=false;
  if ((event.shiftKey)&&(event.keyCode==121)) //屏蔽 shift+F10
     event.returnvalue=false;
  if (window.event.srcElement.tagName == "A" && window.event.shiftKey) 
      window.event.returnvalue = false;  //屏蔽 shift 加鼠标左键新开一网页
  if ((window.event.altKey)&&(window.event.keyCode==115)){ //屏蔽Alt+F4
      window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");
      return false;}
}
//屏蔽鼠标右键如测试时请把该处屏蔽
function document.oncontextmenu() 
{ 
  return false; 
} 
*/
//获取DataGrid所有选定行的ID号
function GetSelectedID()
{
	var f = document.forms[0];
	var index = "";
	for(var i = 0; i < f.elements.length; i++)
	{
		if(f.elements[i].type == "checkbox"
			&& f.elements[i].id.indexOf("chkItem") != -1
			&& f.elements[i].checked)
		{
			if(index != "") index += ",";
			index += f.elements[i].value;
		}
	}
	return index;
}
//获取DataGrid所有选中checkbox的文本连接值
function GetCheckedID()
{
	var f = document.forms[0];
	var index = "";
	for(var i = 0; i < f.elements.length; i++)
	{
		if(f.elements[i].type == "checkbox"
			&& f.elements[i].id.indexOf("chkItem") != -1
			&& f.elements[i].checked)
		{
			if(index != "") index += ",";
			index += "'"+f.elements[i].value+"'";
		}
	}
	return index;
}
//获取DataGrid第一个选定行的ID号
function GetSelectedFirstID()
{
	var f = document.forms[0];
	for(var i = 0; i < f.elements.length; i++)
	{
		if(f.elements[i].type == "checkbox"
			&& f.elements[i].id.indexOf("chkItem") != -1
			&& f.elements[i].checked)
		{
			return f.elements[i].value;
		}
	}
	return "";
}
//获取DataGrid第一个选定行的ID号
function GetFirstIdByName(na)
{
	var f = document.forms[0];
	for(var i = 0; i < f.elements.length; i++)
	{
		if(f.elements[i].type == "checkbox"
			&& f.elements[i].id.indexOf(na) != -1
			&& f.elements[i].checked)
		{
			return f.elements[i].value;
		}
	}
	return "";
}

//获取DataGrid所有选定行的ID号
function GetAllIdByName(na)
{
	var f = document.forms[0];
	var index = "";
	for(var i = 0; i < f.elements.length; i++)
	{
		if(f.elements[i].type == "checkbox"
			&& f.elements[i].id.indexOf(na) != -1
			&& f.elements[i].checked)
		{
			if(index != "") index += ",";
			index += f.elements[i].value;
		}
	}
	return index;
}

//用于Open窗口的统一调用
function __newWin(Url,WindowWidth,WindowHeight)
{
	var L = (screen.width - WindowWidth)/2-5;
	var T = (screen.height- WindowHeight)/2-26;
	window.open(Url, "_blank", "width="+WindowWidth+",height="+WindowHeight+",resizable=yes,scrollbars=yes,left="+L+",top="+T+"");
}

//有滚动条可以调整大小的的窗口
function __mnewWin(Url,WindowWidth,WindowHeight)
{
	var L = (screen.width - WindowWidth)/2-5;
	var T = (screen.height- WindowHeight)/2-26;
	window.open(Url, "_blank", "width="+WindowWidth+",height="+WindowHeight+",left="+L+",top="+T+",resizable=yes,scrollbars=yes");
}
//用于Open窗口的统一调用_可以改变窗体大小
function __mnewWin(Url,WindowWidth,WindowHeight)
{
	var L = (screen.width - WindowWidth)/2-5;
	var T = (screen.height- WindowHeight)/2-26;
	window.open(Url, "_blank", "width="+WindowWidth+",height="+WindowHeight+",left="+L+",top="+T+",resizable=yes,scrollbars=yes");
}
//获取查询字符串
function getSearch(search)
{
	if(search == "")
	{
		return "?";
	}
	return search;
}
//控件只能输入数字
function onlyNum()
{
	for(var i=0;i<onlyNum.arguments.length;i++){
		var obj=onlyNum.arguments[i];
		if(obj)
		{
			obj.onpaste=function(){return !clipboardData.getData('text').match(/\D/)};
			obj.onkeypress=function(){return ((event.keyCode>=48 && event.keyCode<=57) || event.keyCode==46)};
		}
	}
}
/*
//点击新增时统一调用
function __Insert(sUrl,iWidth,iHeight)
{
	__mnewWin(sUrl + getSearch(location.search), iWidth, iHeight);
	return false;
}

//点击编辑时统一调用
function __Update(sUrl,iWidth,iHeight)
{
	var id = GetSelectedFirstID();
	if(id == "")
	{
		alert("请选择要编辑的行");
		return false;
	}
	__newWin(sUrl + getSearch(location.search) + "&dataId=" + id, iWidth, iHeight);
	return false;
}
*/
//点击新增时统一调用
function __Insert(sUrl,iWidth,iHeight,strParameter)
{
	//弹出新增界面
	__newWin(sUrl + getSearch(location.search)+strParameter, iWidth, iHeight);
	return false;
}

//点击新增时统一调用
function __mInsert(sUrl,iWidth,iHeight,strParameter)
{
	//弹出新增界面
	__mnewWin(sUrl + getSearch(location.search)+strParameter, iWidth, iHeight);
	return false;
}

//window.open(Url, "_blank", "width="+WindowWidth+",height="+WindowHeight+",left="+L+",top="+T+",resizable=yes,scrollbars=yes");

function __Insert_Iframe(sUrl,iWidth,iHeight,strParameter)
{
	//嵌入式新增界面
	var strUrl=sUrl + getSearch(location.search)+strParameter;
	//在本项目中该为如下
	document.location=strUrl;
	//document.frames("AddEditIframe").location=strUrl;
	//document.getElementById('Tr1').style.display="none";
	//document.getElementById('Tr2').style.display="block";
	
	return false;
}

//点击编辑时统一调用
function __Update(sUrl,iWidth,iHeight,strParameter)
{
	var id = GetSelectedFirstID();
	if(id == "")
	{
		alert("请选择要编辑的行");
		return false;
	}
	//弹出编辑界面
	__newWin(sUrl + getSearch(location.search) + "&dataId=" + id+strParameter, iWidth, iHeight);
	return false;
}

//点击编辑时统一调用
function __mUpdate(sUrl,iWidth,iHeight,strParameter)
{
    if(strParameter == 'undefined')
    {
        strParameter = "";
    }
	var id = GetSelectedFirstID();
	if(id == "")
	{
		alert("请选择要编辑的行");
		return false;
	}
	//弹出编辑界面
	__mnewWin(sUrl + getSearch(location.search) + "&dataId=" + id+strParameter, iWidth, iHeight);
	return false;
}

function __Update_Iframe(sUrl,iWidth,iHeight,strParameter)
{
    if(strParameter == 'undefined')
    {
        strParameter = "";
    }
	var id = GetSelectedFirstID();
	if(id == "")
	{
		alert("请选择要编辑的行");
		return false;
	}
	//嵌入式编辑界面
	var strUrl=sUrl + getSearch(location.search) + "&dataId=" + id+strParameter;
	//在本项目中该为如下
	document.location=strUrl;
	//document.frames("AddEditIframe").location=strUrl;
	//document.getElementById('Tr1').style.display="none";
	//document.getElementById('Tr2').style.display="block";
	
	return false;
}

//返回列表
function __ReturnList(url)
{
	document.location = url ;
}


//点击删除时统一调用
function __Delete()
{
		var id = GetSelectedID();
		if(id == "")
		{
			alert("请选择要删除的行");
			return false;
		}
		if(confirm("确定要删除？"))
		{
			document.all["hnDeleteId"].value = id;
			return true;
		}
		else
		{
			return false;
		}
}

//选中行操作时根据传的提示信息
function __doSelect(msg)
{
	var id = GetSelectedID();
		if(id == "")
		{
			alert("请选择要操作的行");
			return false;
		}
		if(confirm(msg))
		{
			document.all["hnDeleteId"].value = id;
			return true;
		}
		else
		{
			return false;
		}
}

//上传图片打开浏览窗
function UpImgBrowse(Myobj,OType)
{
    var ifUpload;
    var confirmUpload;
    var obj="document.frames(\"" +Myobj.ObjID+"_ifu\")";
    //ifUpload=eval(obj).document.form1;
    ifUpload=eval(obj).document.form1;
    if(OType!="del")
    {
        ifUpload.myFile.click();
    }
    //打开等待提示层
    document.getElementById(""+Myobj.ObjID+"_BusyDivMain").style.display="block";
    document.getElementById(""+Myobj.ObjID+"_BusyDivMainDd").style.display="block";
    //改变类型
    eval(obj).document.form1.oType.value=OType;
    // 文件上传   
    ifUpload.btnSubmit.click();
    return false;
    
}
//设定搞定和宽度
function UpImgSetWh(objID,objWidth,objHeight)
{
    var MyObj=objID+"_UpImg";
    document.getElementById(MyObj).width=objWidth;
    document.getElementById(MyObj).height=objHeight;
} 

//鼠标移动到图片是
function UpImageOnMouseover(obj)
{
    if(obj.ImgReadOnly=="Y")
    {
        document.getElementById(""+obj.ObjID+"_ImagesT").style.width = obj.offsetWidth;
        document.getElementById(""+obj.ObjID+"_ImagesT").style.height = obj.offsetHeight;
       
        document.getElementById(""+obj.ObjID+"_ImagesUpTC").style.width = parseFloat(obj.offsetWidth)-14;
        document.getElementById(""+obj.ObjID+"_ImagesUpBC").style.width = parseFloat(obj.offsetWidth)-14;
        document.getElementById(""+obj.ObjID+"_ImagesUpCL").style.height = parseFloat(obj.offsetHeight)-14;
        document.getElementById(""+obj.ObjID+"_ImagesUpCR").style.height = parseFloat(obj.offsetHeight)-14;
        
        document.getElementById(""+obj.ObjID+"_UpImagesBt").style.display="block";
        document.getElementById(""+obj.ObjID+"_UpImagesK").style.display="block";
    }
}
//鼠标离开是关闭
function UpImageOnMouseout(MyObj)
{
    document.getElementById(""+MyObj+"_UpImagesBt").style.display="none";
    document.getElementById(""+MyObj+"_UpImagesK").style.display="none";
    document.getElementById(""+MyObj+"_BusyDivMain").style.display="none";
    document.getElementById(""+MyObj+"_BusyDivMainDd").style.display="none";

}
//鼠标离开是关闭
function UpImageOnMouseout2(MyObj)
{
    document.getElementById(""+MyObj.ObjID+"_UpImagesBt").style.display="none";
    document.getElementById(""+MyObj.ObjID+"_UpImagesK").style.display="none";
    document.getElementById(""+MyObj.ObjID+"_BusyDivMain").style.display="none";
    document.getElementById(""+MyObj.ObjID+"_BusyDivMainDd").style.display="none";

}
//设定相关值
function SetValue(objID,ReadOnly,PkID,Xh,SetWh,IfUrl)
{
    var MyObj=objID+"_UpImg";
    document.getElementById(MyObj).ImgReadOnly=ReadOnly;
    document.getElementById(MyObj).PkID=PkID;
    document.getElementById(MyObj).Xh=Xh;
    document.getElementById(MyObj).IfUrl=IfUrl;
    document.getElementById(MyObj).ObjID=objID;
    document.getElementById(MyObj).SetWh=SetWh;
    
    var MyObjSctp=objID+"_UpImgSctp";
    document.getElementById(MyObjSctp).ObjID=objID;
    var MyObjCxsc=objID+"_UpImgCxsc";
    document.getElementById(MyObjCxsc).ObjID=objID;
    var MyObjDel=objID+"_UpImgDel";
    document.getElementById(MyObjDel).ObjID=objID;
    var MyObjUk=objID+"_UpImagesK";
    document.getElementById(MyObjUk).ObjID=objID;
    var MyObjUB=objID+"_UpImagesBt";
    document.getElementById(MyObjUB).ObjID=objID;
    
}
//重新设定图片连接
function SetImgUrl(MyObj,UpImgUrl)
{
    if(UpImgUrl!=null)
    {
        document.getElementById(""+MyObj+"_UpImg").src=UpImgUrl;
        if(document.getElementById(""+MyObj+"_UpImg").SetWh!="Y")
        {
            document.getElementById(""+MyObj+"_UpImg").style.width = "auto";
            document.getElementById(""+MyObj+"_UpImg").style.height = "auto";
        }
    }
    document.getElementById(""+MyObj+"_UpImagesBt").style.display="none";
    document.getElementById(""+MyObj+"_UpImagesK").style.display="none";
} 
//重新设定图片连接(宽高)
function SetImgUrlWh(MyObj,UpImgUrl,MyWidth,MyHeight)
{
    if(UpImgUrl!=null)
    {
        document.getElementById(""+MyObj+"_UpImg").src=UpImgUrl;
        document.getElementById(""+MyObj+"_UpImg").style.width = MyWidth;
        document.getElementById(""+MyObj+"_UpImg").style.height = MyHeight;
    }
    document.getElementById(""+MyObj+"_UpImagesBt").style.display="none";
    document.getElementById(""+MyObj+"_UpImagesK").style.display="none";
} 

//改变上层主窗口的高度
function SetMainShowSize()
{
    try
    {
        var hbtm = parseInt(document.body.currentStyle.marginTop);
	    var hbbm = parseInt(document.body.currentStyle.marginBottom);
	    var hh = parseInt(document.body.offsetHeight);
	    var MyHH=hh+hbbm+hbtm;
	    var MyMainTr=document.getElementById("MyMainTable");
	    if(parseInt(parent.document.frames("F_Left").height)>MyHH)
	    {
	        parent.document.frames("F_Main").height=parseInt(parent.document.frames("F_Left").height);
	        parent.document.all.F_MainTd.height=parseInt(parent.document.frames("F_Left").height);
	        if(MyMainTr!=null)
	        {
	            document.getElementById("MyMainTable").height=parseInt(parent.document.frames("F_Left").height)-50;
	        }
	        //alert("1.  "+parent.document.frames("F_Main").height+"   "+document.getElementById("MyMainTable").height);
	    }
	    else
	    {
	        parent.document.frames("F_Main").height=MyHH;
	        parent.document.all.F_MainTd.height=MyHH;
	        if(MyMainTr!=null)
	        {
	            document.getElementById("MyMainTable").height=MyHH-48;
	        }
	        //alert("2.  "+parent.document.frames("F_Main").height+"   "+document.getElementById("MyMainTable").height);
	    }
	}
	catch(e)
	{
	}
}
//改变上层菜单的高度
function SetMenuShowSize()
{
    var hbtm = parseInt(document.body.currentStyle.marginTop);
    var hbbm = parseInt(document.body.currentStyle.marginBottom);
    var hh = parseInt(document.body.offsetHeight);
    var MyHH=hh+hbbm+hbtm;
    try
    {
        parent.document.frames("F_Left").height=MyHH;
        parent.document.all.F_LeftTd.height=MyHH;
    }
    catch (e)
    {
        setInterval("SetMenuShowSize()",1000);
    }
}
//页头使用
function g(o){return document.getElementById(o);}
function HoverLi(n){
for(var i=1;i<=3;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';
}
//信息发布时不可用
function __toSetDisabled(msg)
{
	alert(msg);
	return false;
}
//打开图片预览
function openZoom(pkid,xh)
{
	__newWin("PhotoZoom.aspx?XtPKID="+ pkid +"&XtXH="+xh,1000,800);
	return false;
}

// 增加选择项
function addSelectItem(sourceObj,targetObj)
{
    var sJobFunObj = document.getElementById(sourceObj);
    var jobFunctionObj = document.getElementById(targetObj);
//    if(jobFunctionObj.length == 3)
//    {
//        window.alert("最多选择3个项目！");
//        return false;
//    }
    if(sJobFunObj.value == "")
    {
        window.alert("没有选择添加项目！");
        return false;
    }
    // var selItem = sJobFunObj.options.item(sJobFunObj.selectedIndex);
    var selText = sJobFunObj.options.item(sJobFunObj.selectedIndex).text;
    var selValue = sJobFunObj.value;
    if(jobFunctionObj.innerHTML.indexOf(selValue) > -1 )
    {
        window.alert("已存在该项目！");
        return false;
    }
    jobFunctionObj.options.add(new Option(selText,selValue));
    return true;
}
// 移除选择项
function removeSelectItem(obj)
{
    var jobFunctionObj = document.getElementById(obj);
    if(jobFunctionObj.length == 0)
    {
        window.alert("没有删除项目！");
        return false;
    }
    if(jobFunctionObj.value == "")
    {
        window.alert("请选择删除项目！");
        return false;
    }
    var selIndex = jobFunctionObj.selectedIndex;
    jobFunctionObj.remove(selIndex);
    return true;
}
// 选择所有 select 项目
function SelectedAllItem(s)
{
    try
    {
        var obj = document.getElementById(s);
        for(i=0;i<obj.length;i++)
        {
            obj.options[i].selected = true;
        }   
    }
    catch (e)
    {
    }
}

function openWithIframe(tit,url,w,h){
	var sWidth,sHeight;
	sWidth=document.body.clientWidth;
	sHeight=document.body.scrollHeight;
	if(sHeight<window.screen.height){sHeight=window.screen.height;}
	var bgObj=document.createElement("div");
	bgObj.setAttribute('id','bgDiv');
	bgObj.style.position="absolute";
	bgObj.style.top="0";
	bgObj.style.background="#E1E1E1";
	bgObj.style.filter="Alpha(Opacity=30);";
	bgObj.style.left="0";
	bgObj.style.width=sWidth + "px";
	bgObj.style.height=sHeight + "px";
	bgObj.style.zIndex = "10000";
    document.body.appendChild(bgObj);

//    massage_box.style.left = (document.body.clientWidth - w) / 2;
//    // massage_box.style.top = (screen.height - h) / 2-80;
//	massage_box.style.top = (getHeight() - h) / 2-80;
//	//massage_box.style.top = getHeight() ;
//    massage_box.style.screenx = (document.body.clientWidth - w) / 2;//仅适用于Netscape
//    massage_box.style.screeny = (screen.height - h) / 2-80;//仅适用于Netscape
    massage_box.style.zIndex = "11080";
    massage_box.style.width = w+"px";
    massage_box.style.height = h+"px";
    pop_title.innerHTML=tit;
    massage_box.style.display=''
    var popiframe='<iframe src="'+url+'" width="'+(w-11)+'px"  height="'+(h-36)+'px" frameborder=0 scrolling=no></iframe>';
    pop_iframe.innerHTML=popiframe;
}

function closeWithIframe(){
    // alert("sdf");
    massage_box.style.display="none";
    document.body.removeChild(document.getElementById("bgDiv"));
}

function getCookie(objName){
    //获取指定名称的cookie的值   
    var arrStr = document.cookie.split(";");   
    for(var i = 0;i < arrStr.length;i ++)
    {    
        var temp = arrStr[i].split("=");    
        if(temp[0] == objName) 
            return unescape(temp[1]);   
    } 
}

 function getCookie2(cookieName) {
  // debugger;
    var cookieString = document.cookie;
    //  alert(cookieString);
    var start = cookieString.indexOf(cookieName + '=');
    if (start == -1)
        return null;
    start += cookieName.length + 1;
    var end = cookieString.indexOf(';', start);
    if (end == -1) return decodeURI(cookieString.substring(start));
    return decodeURI(cookieString.substring(start, end));
}
 


document.write('<div id="massage_box" style="display:none;background:#fff;border:3px solid #FFF; progid:DXImageTransform.Microsoft.DropShadow();" class="mydiv">');
document.write('<div style="width:100%; height:100%; background:#E5F0FB;border:1px solid #2873B3;">');
document.write('<div style="background-image:url(/images/searchlisttit_allbg.gif); background-repeat:repeat-x;height:25px;line-height:30px;"><span onClick="return closeWithIframe();" style="float:right; display:inline; cursor:pointer;padding:6px 10px 6px 0;"><img title="关闭此窗口" src="/public/images/searchlistclose.gif" border="0" /></span>');
document.write('<div style="font-size:14px;font-weight:bold;color:#000;cursor:move;padding-left:15px;">');
document.write('<div style="display:inline; width:200px; position:absolute;" id=pop_title></div>');
document.write('</div></div>');
document.write('<div style="padding:5px" id=pop_iframe></div>');
document.write('</div>');
document.write('</div>');

//-->

