﻿var docEle = function() {
	return document.getElementById(arguments[0]) || false;
}

function $L(v) { return(document.getElementById(v)); }
function openTuiDiv(_id) {
	//$L("shopSearch").style.display = 'none';
	var m = "mask";
	if (docEle(_id)) document.removeChild(docEle(_id));
	if (docEle(m)) document.removeChild(docEle(m));
	// 新激活图层
	var sedDiv = document.createElement("div");
	sedDiv.id = _id;
	sedDiv.style.position = "absolute";
	sedDiv.style.zIndex = "9999";
	sedDiv.style.width = "527px";
	sedDiv.style.height = "100%";
	sedDiv.style.top =  "116px";
	//sedDiv.style.top = document.body.scrollTop + "px";
	sedDiv.style.left = (parseInt(document.body.scrollWidth) - 630) / 2 + "px";
	sedDiv.style.background = "#ffffff";
	sedDiv.style.border = "0px";
	sedDiv.style.padding = "0px";
	
	//sedDiv.innerHTML = "<table width='527' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td colspan='3'><img src='images/news_top.gif' width='527' height='27' /></td></tr><tr><td width='11' height='510' valign='top' style='background: url(images/news_leftbg.gif) repeat-y;'><img src='images/news_left.gif' width='11' height='505' /></td><td width='503' valign='top' style='background: url(images/news_bg.jpg) repeat-x top; background-color:#ffffff;'><table width='90%' border='0' align='center' cellpadding='0' cellspacing='0' class='font7'><tr><td height='30' align='right'><a href='#' onclick='closetui()'><img src='images/close.gif' width='21' height='21' border='0'/></a></td></tr><tr><td align='center' style='font-weight:bold;'><FORM name=form1 action=test.php method=post><TABLE class=font cellSpacing=0 cellPadding=0 width=92% align=center border=0><TBODY><TR><TD height='25' colSpan=3 align='left' class='font7'><STRONG>填表须知：</STRONG></TD></TR><TR><TD height='40' colSpan=3 align='left' class='font7'>敬请详细填写此表，我们将根据您所填写的内容进行资格初审，并在3个工作日内回复，如有疑问请致电：010-87670820 </TD></TR><TR><TD width=155>&nbsp;</TD><TD colSpan=2 align='left'>&nbsp;</TD></TR><TR><TD height=25 align='left' class='font7'>*申请代理区域：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=apply></TD></TR><TR><TD height=25 align='left' class='font7'>*公司名称：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=comname></TD></TR><TR><TD height=25 align='left' class='font7'>公司电话：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=comphone></TD></TR><TR><TD height=25 align='left' class='font7'>公司传真：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=comfax></TD></TR><TR><TD height=25 align='left' class='font7'>公司联系地址：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=touchadd></TD></TR><TR><TD height=25 align='left' class='font7'>邮编：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=post></TD></TR><TR><TD height=25 align='left' class='font7'>公司网址：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=web></TD></TR><TR><TD height=25 align='left' class='font7'>公司成立时间：</TD> <TD colSpan=2 align='left'><INPUT class=logintxt name=time></TD></TR><TR><TD height=25 align='left' class='font7'>注册资金：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=bankroll></TD></TR><TR><TD height=25 align='left' class='font7'>公司注册地址：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=logadd></TD></TR><TR><TD height=25 align='left' class='font7'>员工人数：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=employee></TD></TR><TR><TD height=25 align='left' class='font7'>公司性质：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=kind></TD></TR><TR><TD height=25 align='left' class='font7'>现经营范围：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=bound></TD></TR><TR><TD height=25 align='left' class='font7'>法人代表姓名：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=person></TD></TR><TR><TD height=25 align='left' class='font7'>*联系人：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=relation></TD></TR><TR><TD height=25 align='left' class='font7'>*联系电话：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=personphone></TD></TR><TR><TD height=25 align='left' class='font7'>*Email：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=personmail></TD></TR><TR><TD height=25 align='left' class='font7'>目前代理的业务：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=operation></TD></TR><TR><TD height=25 align='left' class='font7'>备注：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=remark></TD></TR><TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR><TR><TD height=30>&nbsp;</TD><TD width=90><INPUT id=取消！ type=image height=24 width=81 src='images/reg_form_02.jpg' value=取消！ name=b1></TD><TD width=192><INPUT id=提交！ type=image height=24 width=81 src='images/reg_form_03.jpg' value=提交！ name=b2></TD></TR><TR><TD>&nbsp;</TD><TD colSpan=2 align='left'>&nbsp;</TD></TR></TBODY></TABLE></FORM></td></tr></table></td> <td width='13' valign='top' style='background: url(images/news_rightbg.gif) repeat-y;'><img src='images/news_right.gif' width='13' height='505' /></td> </tr><tr><td colspan='3'><img src='images/news_bottom.gif' width='527' height='31' /></td></tr></table>";
	sedDiv.innerHTML = "<table width='527' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td colspan='3'><img src='images/news_top.gif' width='527' height='27' /></td></tr><tr><td width='11' height='510' valign='top' style='background: url(images/news_leftbg.gif) repeat-y;'><img src='images/news_left.gif' width='11' height='505' /></td><td width='503' valign='top' style='background: url(images/news_bg.jpg) repeat-x top; background-color:#ffffff;'><table width='90%' border='0' align='center' cellpadding='0' cellspacing='0' class='font7'><tr><td height='30' align='right'><a href='#' onclick='closetui()'><img src='images/close.gif' width='21' height='21' border='0'/></a></td></tr><tr><td align='center' style='font-weight:bold;'><FORM name=form1 action=test.php method=post onSubmit='javascript:return CheckForm()'><TABLE class=font cellSpacing=0 cellPadding=0 width=92% align=center border=0><TBODY><TR><TD height='25' colSpan=3 align='left' class='font7'><STRONG>填表须知：</STRONG></TD></TR><TR><TD height='40' colSpan=3 align='left' class='font7'>敬请详细填写此表，我们将根据您所填写的内容进行资格初审，并在3个工作日内回复，如有疑问请致电：010-87670820 </TD></TR><TR><TD width=155>&nbsp;</TD><TD colSpan=2 align='left'>&nbsp;</TD></TR><TR><TD height=25 align='left' class='font7'>*申请代理区域：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=apply></TD></TR><TR><TD height=25 align='left' class='font7'>*公司名称：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=comname></TD></TR><TR><TD height=25 align='left' class='font7'>公司电话：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=comphone></TD></TR><TR><TD height=25 align='left' class='font7'>公司传真：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=comfax></TD></TR><TR><TD height=25 align='left' class='font7'>公司联系地址：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=touchadd></TD></TR><TR><TD height=25 align='left' class='font7'>邮编：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=post></TD></TR><TR><TD height=25 align='left' class='font7'>公司网址：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=web></TD></TR><TR><TD height=25 align='left' class='font7'>公司成立时间：</TD> <TD colSpan=2 align='left'><INPUT class=logintxt name=time></TD></TR><TR><TD height=25 align='left' class='font7'>注册资金：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=bankroll></TD></TR><TR><TD height=25 align='left' class='font7'>公司注册地址：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=logadd></TD></TR><TR><TD height=25 align='left' class='font7'>员工人数：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=employee></TD></TR><TR><TD height=25 align='left' class='font7'>公司性质：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=kind></TD></TR><TR><TD height=25 align='left' class='font7'>现经营范围：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=bound></TD></TR><TR><TD height=25 align='left' class='font7'>法人代表姓名：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=person></TD></TR><TR><TD height=25 align='left' class='font7'>*联系人：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=relation></TD></TR><TR><TD height=25 align='left' class='font7'>*联系电话：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=personphone></TD></TR><TR><TD height=25 align='left' class='font7'>*Email：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=personmail></TD></TR><TR><TD height=25 align='left' class='font7'>目前代理的业务：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=operation></TD></TR><TR><TD height=25 align='left' class='font7'>备注：</TD><TD colSpan=2 align='left'><INPUT class=logintxt name=remark></TD></TR><TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR><TR><TD height=30>&nbsp;</TD><TD width=90><INPUT id=取消！ type=image height=24 width=81 src='images/reg_form_02.jpg' value=取消！ name=b1></TD><TD width=192><img height=24 width=81 src='images/reg_form_03.jpg' border='0' onclick='javascript:return resetform()' style='cursor:pointer;'></TD></TR><TR><TD>&nbsp;</TD><TD colSpan=2 align='left'>&nbsp;</TD></TR></TBODY></TABLE></FORM></td></tr></table></td> <td width='13' valign='top' style='background: url(images/news_rightbg.gif) repeat-y;'><img src='images/news_right.gif' width='13' height='505' /></td> </tr><tr><td colspan='3'><img src='images/news_bottom.gif' width='527' height='31' /></td></tr></table>";
	
	//sedDiv.style.position = "absolute";
	//sedDiv.style.top=document.body.scrollTop + "px";
	document.body.appendChild(sedDiv);
	
	var loader = document.getElementsByTagName("head")[0];
	var element = document.createElement("script");
	element.type = "text/javascript";
	element.language = "javascript";
	element.charset = "gb2312";
//	var loginurl = "js/rc_452.js";
//	element.src = loginurl;
//	loader.appendChild(element);
	
//	GetProvince(452,document.myf1.biz_serv_1,'请选择类型');
//	GetProvince(24266,document.myf1.biz_bd_1,'请选择地区');
	
	//window.onscroll= function(){
	//	sedDiv.style.top = document.body.scrollTop + "px";
	//}
	// mask图层
	var sedMask = document.createElement("div");
	sedMask.id = m;
	sedMask.style.position = "absolute";
	sedMask.style.zIndex = "1";
	sedMask.style.width = document.body.scrollWidth + "px";
	sedMask.style.height = document.body.scrollHeight + "px";
	sedMask.style.top = "0px";
	sedMask.style.left = "0px";
	sedMask.style.background = "#000000";
	sedMask.style.filter = "alpha(opacity=50)";
	sedMask.style.opacity = "0.40";
	document.body.appendChild(sedMask);
}

function Creat_XmlHttpRequest() 
{
	if(window.ActiveXObject)
	{
		xmlobj = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if(window.XMLHttpRequest)
	{
		xmlobj = new XMLHttpRequest();
	}
	return xmlobj;
}

function closetui()
{
	//$L("shopSearch").style.display = '';
	var m = "mask";
	document.body.removeChild(docEle('tuiDiv'));
	document.body.removeChild(docEle(m));
}
function resetform()
{
document.form1.apply.value="";
document.form1.comname.value="";
document.form1.comphone.value="";
document.form1.comfax.value="";
document.form1.touchadd.value="";
document.form1.post.value="";
document.form1.web.value="";
document.form1.time.value="";
document.form1.bankroll.value="";
document.form1.logadd.value="";
document.form1.employee.value="";
document.form1.kind.value="";
document.form1.bound.value="";
document.form1.person.value="";
document.form1.relation.value="";
document.form1.personphone.value="";
document.form1.personmail.value="";
document.form1.operation.value="";
document.form1.remark.value="";
	
}
function CheckForm()
{ 

  if (document.form1.apply.value=="")
  {
    alert("请输入申请代理区域！");
	document.form1.apply.focus();
	return false;
  }
  if (document.form1.comname.value=="")
  {
    alert("请输入公司名称！");
	document.form1.comname.focus();
	return false;
  }

  if (document.form1.relation.value=="")
  {
    alert("请输入联系人姓名！");
	document.form1.relation.focus();
	return false;
  }
  

  if (document.form1.personphone.value=="")
  {
    alert("请输入联系电话！");
	document.form1.personphone.focus();
	return false;
  }
  
  if (document.form1.personmail.value=="")
  {
    alert("请输入email！");
	document.form1.personmail.focus();
	return false;
  }
  
  
  return true;  
}
