﻿// 隐藏窗体加载效果
function hideLayer(_hidden)
{
	this._hidden = _hidden?_hidden:"hidden";
	// IE5+, NN6+
	if (document.getElementById)
	{
		oElement = document.getElementById("ie");
	// IE4
	}else if (document.all){
		oElement = document.all("ie");
	// NN4
	}else if (document.layers){
		oElement = document.layers["ns"];
	}
	if (oElement != null && document.layers)
	{
		oElement.visibility = this._hidden;
	}else if (oElement != null){
		oElement.style.visibility = this._hidden;
	}
}
//falsh显示
function flash(url,width,height,wmode)
{
 document.write(
  '<embed src="' + url + '" wmode=' + wmode +
  ' quality="high" pluginspage=http://www.macromedia.com/go/getflashplayer type="application/x-shockwave-flash" width="' + width +
  '" height="' + height + '"></embed>');
}
// JavaScript Document
//获取对象
function $obj(_sId){
	return document.getElementById(_sId);
}
//获取对象
function $Name(_sId){
	return document.getElementsByName(_sId);
}
//空白函数
function blank(){}
//刷新页面
function _renovate(){
	location.reload();
}
function href(url,frm){
	if(frm==null){
		location.href=url;
	}else{
		frm.location.href=url;
	}
}
//打开连接
function OpenUrl1(Url,Width,Height,scrollbars)
{
window.open(""+Url,"","Width="+Width+",Height="+Height+",top=100,left=100,status=no,scrollbars="+scrollbars)
}
//打开连接
function OpenUrl(Url,Width,Height,scrollbars)
{
window.showModelessDialog("print.html?url="+Url+"&random="+Math.random(), "qq", "dialogHeight:" + Height + "px;dialogWidth:" + Width + "px;help:no;resizable:no;status:no;scroll:no;");
}
//打开连接
function OpenReckoning(Url,Name,Width,Height,scrollbars)
{
window.showModelessDialog("print.html?url="+Url+"&name="+escape(Name)+"&random="+Math.random(), "qq", "dialogHeight:" + Height + "px;dialogWidth:" + Width + "px;help:no;resizable:no;status:no;scroll:no;");
}
//在线客服
function kefu()
{
	window.showModelessDialog("http://www.53kf.com/company.php?arg=caeyee&style=1", "qq", "dialogHeight:470px;dialogWidth:700px;help:no;resizable:no;status:no;scroll:no;");
}
//全选单前form中的所有多选框
function CheckAll(form)
	{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
		if (e.name != 'chkall' && e.disabled != true )
		e.checked = form.chkall.checked;
	}
}
//提交提示事件
function chk_qr()
{
	aa=document.fromlist;
	if(confirm("请确认是否执行此操作!")){
	aa.action="?action=Queren"
	aa.submit();
	}else{
	return false;
	}
}
function if_obj_display(str,obj){	//让对象显示或隐藏
	var response = str;
	var update = new Array();
	if(response.indexOf('|' != -1)) {
	update = response.split('|');
	for(var i=0;i<update.length;i++){
			tt=document.getElementById(update[i]);
			if(tt){
				if (obj==0 || obj.checked==false){
					tt.style.display='none';
				}
				else{
					tt.style.display='';
				}
			}
		}
	}
}
function if_input_disabled(str,obj,vbj){	//限制表单输入
	var response = str;
	var update = new Array();
	if(response.indexOf('|' != -1)) {
	update = response.split('|');
	for(var i=0;i<update.length;i++){
			tt=document.getElementById(update[i]);
			if(tt){
				if (obj==0 || obj.checked==false){
					if(vbj!=1){
					tt.value = "";
					}
					tt.disabled=true;
				}
				else{
					tt.disabled=false;
				}	
			}
		}
	}
}

//显示信息
function ShowInfo(Url){
	if (Url!=""){//验证表单
		Quer=Url;
		new Ajax(Quer,0,"","post",function(obj){iForm(obj,550,530,"信息内容","Z|0#0");});
	}
}
