var busoption = 0;
function jobList()
{
	showWin();
	$.ajaxSetup ({cache: false}); //关闭AJAX相应的缓存
	var url = '?action=joblist';
	url+= getUrl();
	if(arguments.length != 0){
		url+= '&curr='+arguments[0];
	}
	$('#jobList').load(url,function(){
		closeWin();
		$('#jobIDAll2').attr("checked",'');
		$('#offer').focus();
	});
}
function getUrl()
{
	var url ='';
	if($('#offer').val()!=''){
		var offer = $.trim($('#offer').val());
		if($("#typeId").attr("checked"))
		{
			var typeId=2;
		}else
		{
			var typeId=1;
		}
		if(typeId==2)
		{
			if(offer.match('示例：业务经理 或 软件工程师')==null)
			{
				url+= '&offer='+escape(offer);
			}
		}else
		{
			if(offer.match('示例：业务经理 或 软件工程师')==null)
			{
				url+= '&company='+escape(offer);
			}
		}
	}else
	{
		$('#offer').val('示例：业务经理 或 软件工程师');
		var obj=document.getElementById('offer');
		obj.style.color='#989898';
	}
	if($('#tradeId').val()!=''){
		url+= '&tradeId='+$('#tradeId').val();
	}
	if($('#degreeId').val()!=''){
		url+= '&degreeId='+$('#degreeId').val();
	}
	if($('#workYearsId').val()!=''){
		url+= '&workYearsId='+$('#workYearsId').val();
	}
	if($('#wageId').val()!=''){
		url+= '&wageId='+$('#wageId').val();
	}
	if($('#districtId').val()!=''){
		url+= '&districtId='+$('#districtId').val();
	}
	if($('#day').val()!=''){
		url+= '&day='+$('#day').val();
	}
	if($('#busId').val()!=''){
		url+= '&busId='+$('#busId').val();
	}
	if($('#stationId').val()!=''){
		url+= '&stationId='+$('#stationId').val();
	}
	//职位类别
	if($('#jobTypeId').val()>50){
		url+= '&jobTypeId='+$('#jobTypeId').val();
	}
	//专/兼
	if($('#jobTypeId').val()=='12'){
		url+= '&workModeId=12';
	}
	return url;
}

function searchByStation(stationId,obj)
{
	document.getElementById('stationId').value = stationId;
	jobList();
	obj.style.color = "#aa3333";
}
//关键字查询
function key(word,name)
{
	document.getElementById('offer').value = word;
	var obj=document.getElementById('offer');
	$("#typeId").attr("checked",'checked');
	$("#typeId2").attr("checked",'');
	obj.style.color='#000000';
	jobList();

}
//首页-今日职位
function daymessage()
{
	//showWin();
	$.ajaxSetup ({cache: false}); //关闭AJAX相应的缓存
	var url = '?action=datemessage';
	$('#daymessage').load(url,function(){
		//closeWin();
		//$('#offer').focus();
	});
}
//变换信息(沈阳最新兼职信息)
function convertworkModeId()
{
	if($('#workModeId').val()>0)
	{
		$('#workModeId').val(0);
		document.getElementById("modeId").innerHTML="沈阳最新兼职信息";
	}else{
		$('#workModeId').val(12);
		document.getElementById("modeId").innerHTML="全部招聘信息";
	}
	jobList();
}
//#获取服务器的系统时间
function createXMLHttpRequest () {
	var request = false;
	if(window.XMLHttpRequest) {
		request = new XMLHttpRequest();
		if(request.overrideMimeType) {
			request.overrideMimeType('text/xml');
		}
	} else if(window.ActiveXObject) {
		var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0', 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP'];
		for(var i=0; i<versions.length; i++) {
			try {
				request = new ActiveXObject(versions[i]);
				if(request) {
					return request;
				}
			} catch(e) {
				//alert(e.message);
			}
		}
	}
	return request;
}
function showserverTime()
{
	var http = createXMLHttpRequest();
	http.open("HEAD", ".", false);
	http.send(null);
	var curDate = new Date;
	var offsetTime = curDate - Date.parse(http.getResponseHeader("Date"));
	curDate.setTime(new Date - offsetTime);
	var hours =curDate.getHours();
	var min =curDate.getMinutes();
	var strtime="";
	if(hours<10)
	{
		strtime="0";
	}
	strtime+=hours+':';
	if(min<10)
	{
		strtime+="0";
	}
	strtime+=min;
	//curDate.format('HH:MM')
	document.getElementById("spnTime").innerHTML=strtime;
	setTimeout(showserverTime,60000);
}
//按职位类别进行搜索
//参数名 name
function jobTypeId(name)
{
	var id = new Array();
	id['ct1']='55';
	id['ct2']='57';
	id['ct3']='59';
	id['ct4']='58';
	id['ct5']='56';
	if(name.match('ct6')=="ct6")
	{
		window.location.href=window.location.href;
	}else{
		//所属行业
		document.getElementById('tradeId').value = "";
		//学历要求
		document.getElementById('degreeId').value= "";
		//工作经历
		document.getElementById('workYearsId').value= "";
		//薪酬待遇
		document.getElementById('wageId').value = "";
		//工作区域
		document.getElementById('districtId').value= "";
		//时间
		document.getElementById('day').value= "";
		//公交车
		document.getElementById('busId').value= "";
		//职位类别检索,清空职位名称
		document.getElementById('offer').value ="";
		//职位检索
		document.getElementById('top_search_input').value="示例：业务经理 或 软件工程师";
		//企业名称
		document.getElementById('company').value= "";
		//职位类别
		if(name.match('ct7')=="ct7")
		{
			document.getElementById('jobTypeId').value ='';
			document.getElementById('workModeId').value =12;
		}else
		{
			document.getElementById('jobTypeId').value = id[name];
			document.getElementById('workModeId').value ='';
		}
		jobList();
	}
}
function searchStation(busId)
{
	//if(busId == "") busId = 139;
	document.getElementById('stationId').value = '';
	jobList();
	$("#stationShow").load("?controller=admBus&action=searchStationIndex&busId="+busId);
	$("#busInfo").load("?controller=admBus&action=searchBusInfo&busId="+busId);

}
//////////////////////////////////////
function searchStation1(busId,obj)
{
	obj.style.background = "#aa3333";
}
function userLogin()
{
	var username = escape(document.getElementById('username').value);
	var password = escape(document.getElementById('password').value);
	var url = '?controller=member&action=MemberLogin';
	$.get(url,{userName:username,password:password},function(data){
		if(data=="1"){
			window.location = '?controller=member';
		}else{
			alert('用户名或密码有误！');
		}
	});

}
//获取今天的日期字符串
function getToday()
{
	var today = new Date();
	var iYear = today.getFullYear();
	var iMonth = today.getMonth() + 1;
	var iDay = today.getDate();
	var week = '日一二三四五六'.charAt(today.getDay());
	var strToday = iYear + "年" + iMonth + "月" + iDay + "日" +" 星期"+ week;
	return strToday;
}
function srcMarquee(){
	this.ID = document.getElementById(arguments[0]);
	if(!this.ID){this.ID = -1;return;}
	this.Direction = this.Width = this.Height = this.DelayTime = this.WaitTime = this.Correct = this.CTL = this.StartID = this.Stop = this.MouseOver = 0;
	this.Step = 1;
	this.Timer = 30;
	this.DirectionArray = {"top":0 , "bottom":1 , "left":2 , "right":3};
	if(typeof arguments[1] == "number")this.Direction = arguments[1];
	if(typeof arguments[2] == "number")this.Step = arguments[2];
	if(typeof arguments[3] == "number")this.Width = arguments[3];
	if(typeof arguments[4] == "number")this.Height = arguments[4];
	if(typeof arguments[5] == "number")this.Timer = arguments[5];
	if(typeof arguments[6] == "number")this.DelayTime = arguments[6];
	if(typeof arguments[7] == "number")this.WaitTime = arguments[7];
	if(typeof arguments[8] == "number")this.ScrollStep = arguments[8]
	this.ID.style.overflow = this.ID.style.overflowX = this.ID.style.overflowY = "hidden";
	this.ID.noWrap = true;
	this.IsNotOpera = (navigator.userAgent.toLowerCase().indexOf("opera") == -1);
	if(arguments.length >= 7)this.Start();
}
srcMarquee.prototype.Start = function(){
	if(this.ID == -1)return;
	if(this.WaitTime < 800)this.WaitTime = 800;
	if(this.Timer < 20)this.Timer = 20;
	if(this.Width == 0)this.Width = parseInt(this.ID.style.width);
	if(this.Height == 0)this.Height = parseInt(this.ID.style.height);
	if(typeof this.Direction == "string")this.Direction = this.DirectionArray[this.Direction.toString().toLowerCase()];
	this.HalfWidth = Math.round(this.Width / 2);
	this.BakStep = this.Step;
	this.ID.style.width = this.Width;
	this.ID.style.height = this.Height;
	if(typeof this.ScrollStep != "number")this.ScrollStep = this.Direction > 1 ? this.Width : this.Height;
	var msobj = this;
	var timer = this.Timer;
	var delaytime = this.DelayTime;
	var waittime = this.WaitTime;
	msobj.StartID = function(){msobj.Scroll()}
	msobj.Continue = function(){
		if(msobj.MouseOver == 1){
			setTimeout(msobj.Continue,delaytime);
		}
		else{ clearInterval(msobj.TimerID);
		msobj.CTL = msobj.Stop = 0;
		msobj.TimerID = setInterval(msobj.StartID,timer);
		}
	}
	msobj.Pause = function(){
		msobj.Stop = 1;
		clearInterval(msobj.TimerID);
		setTimeout(msobj.Continue,delaytime);
	}
	msobj.Begin = function(){
		msobj.ClientScroll = msobj.Direction > 1 ? msobj.ID.scrollWidth : msobj.ID.scrollHeight;
		if((msobj.Direction <= 1 && msobj.ClientScroll <msobj.Height) || (msobj.Direction > 1 && msobj.ClientScroll <msobj.Width))return;
		msobj.ID.innerHTML += msobj.ID.innerHTML;
		msobj.TimerID = setInterval(msobj.StartID,timer);
		if(msobj.ScrollStep < 0)return;
		msobj.ID.onmousemove = function(event){
			if(msobj.ScrollStep == 0 && msobj.Direction > 1){
				var event = event || window.event;
				if(window.event){
					if(msobj.IsNotOpera){msobj.EventLeft = event.srcElement.id == msobj.ID.id ? event.offsetX - msobj.ID.scrollLeft : event.srcElement.offsetLeft - msobj.ID.scrollLeft + event.offsetX;}
					else{msobj.ScrollStep = null;return;}
				}
				else{msobj.EventLeft = event.layerX - msobj.ID.scrollLeft;}
				msobj.Direction = msobj.EventLeft > msobj.HalfWidth ? 3 : 2;
				msobj.AbsCenter = Math.abs(msobj.HalfWidth - msobj.EventLeft);
				msobj.Step = Math.round(msobj.AbsCenter * (msobj.BakStep*2) / msobj.HalfWidth);
			}
		}
		msobj.ID.onmouseover = function(){
			if(msobj.ScrollStep == 0)return;
			msobj.MouseOver = 1;
			clearInterval(msobj.TimerID);
		}
		msobj.ID.onmouseout = function(){
			if(msobj.ScrollStep == 0){
				if(msobj.Step == 0)msobj.Step = 1;
				return;
			}
			msobj.MouseOver = 0;
			if(msobj.Stop == 0){
				clearInterval(msobj.TimerID);
				msobj.TimerID = setInterval(msobj.StartID,timer);
			}}}
			setTimeout(msobj.Begin,waittime);
}
srcMarquee.prototype.Scroll = function(){
	switch(this.Direction){
		case 0:
		this.CTL += this.Step;
		if(this.CTL >= this.ScrollStep && this.DelayTime > 0){
			this.ID.scrollTop += this.ScrollStep + this.Step - this.CTL;
			this.Pause();
			return;
		}
		else{
			if(this.ID.scrollTop >= this.ClientScroll){this.ID.scrollTop -= this.ClientScroll;}
			this.ID.scrollTop += this.Step;
		}
		break;
		case 1:
		this.CTL += this.Step;
		if(this.CTL >= this.ScrollStep && this.DelayTime > 0){
			this.ID.scrollTop -= this.ScrollStep + this.Step - this.CTL;
			this.Pause();
			return;
		}
		else{
			if(this.ID.scrollTop <= 0){this.ID.scrollTop += this.ClientScroll;}
			this.ID.scrollTop -= this.Step;
		}
		break;
		case 2:
		this.CTL += this.Step;
		if(this.CTL >= this.ScrollStep && this.DelayTime > 0){
			this.ID.scrollLeft += this.ScrollStep + this.Step - this.CTL;
			this.Pause();
			return;
		}
		else{
			if(this.ID.scrollLeft >= this.ClientScroll){this.ID.scrollLeft -= this.ClientScroll;}
			this.ID.scrollLeft += this.Step;
		}
		break;
		case 3:
		this.CTL += this.Step;
		if(this.CTL >= this.ScrollStep && this.DelayTime > 0){
			this.ID.scrollLeft -= this.ScrollStep + this.Step - this.CTL;
			this.Pause();
			return;
		}
		else{
			if(this.ID.scrollLeft <= 0){this.ID.scrollLeft += this.ClientScroll;}
			this.ID.scrollLeft -= this.Step;
		}
		break;
	}
}
//名企招聘
function imgs()
{
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=205749&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_18.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=197083&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_16.gif' /></a></div>");
	document.write("<div class='iad_195'><a href='/?action=jobinfo&jobId=191407&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_18.gif' /></a></div>");
	document.write("<div class='iad_185'><a href='/?action=jobinfo&jobId=213587&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_17.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=206306&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_15.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=213313&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_17.gif' /></a></div>");
	document.write("<div class='iad_195'><a href='/?action=jobinfo&jobId=192366&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_16.gif' /></a></div>");
	document.write("<div class='iad_185'><a href='/?action=jobinfo&jobId=198099&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_19.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=199140&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_05.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=211555&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_14.gif' /></a></div>");
	document.write("<div class='iad_195'><a href='/?action=jobinfo&jobId=204543&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_20.gif' /></a></div>");
	document.write("<div class='iad_185'><a href='/?action=jobinfo&jobId=190757&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_21.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=187576&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_07.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=212938&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_08.gif' /></a></div>");
	document.write("<div class='iad_195'><a href='/?action=jobinfo&jobId=205679&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_07.gif' /></a></div>");
	document.write(" <div class='iad_185'><a href='/?action=jobinfo&jobId=186186&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_08.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=203062&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_01.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=204432&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_02.gif' /></a></div>");
	document.write(" <div class='iad_195'><a href='/?action=jobinfo&jobId=200018&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_02.gif' /></a></div>");
	document.write("<div class='iad_185'><a href='/?action=jobinfo&jobId=196119&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_01.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='http://www.guanyaenglish.com/' target='_blank'><img src='/images/index/iad300_03.gif' /></a></div>");
	document.write(" <div class='iad_300'><a href='/?action=jobinfo&jobId=187597&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_04.gif' /></a></div>");
	document.write("<div class='iad_195'><a href='http://www.yuandacn.com/' target='_blank'><img src='/images/index/iad185_03.gif' /></a></div>");
	document.write("<div class='iad_185'><a href='/?action=jobinfo&jobId=200680&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_14.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='http://www.sypts.com/' target='_blank'><img src='/images/index/iad300_13.gif' /></a></div>");
	document.write("<div class='iad_300'><a href='/?action=jobinfo&jobId=197201&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad300_06.gif' /></a></div>");
	document.write("<div class='iad_195'><a href='/?action=jobinfo&jobId=200505&ctime=0&s=0&e=1' target='_blank'><img src='/images/index/iad185_13.gif' /></a></div>");
	document.write("<div class='iad_185'><a href='http://www.siasun.com/' target='_blank'><img src='/images/index/iad185_04.gif' /></a></div>");
}
/*
function bookmarkit()
{
	try
	{
		window.external.addFavorite(' http://www.chuangjob.com','闯行天下招聘网');
	}
	catch (e)
	{
		try
		{
			window.sidebar.addPanel('闯行天下招聘网',' http://www.chuangjob.com','');
		}
		catch (e)
		{
			alert("加入收藏失败，请您手动添加收藏。");
		}
	}
}*/
function bookmarkit()
{
	var url=location.href;
	try
	{
		window.external.addFavorite(url,'闯行天下招聘网');
	}
	catch (e)
	{
		try
		{
			window.sidebar.addPanel('闯行天下招聘网',url,'');
		}
		catch (e)
		{
			alert("加入收藏失败，请您手动添加收藏。");
		}
	}

}
//首页js
function TabChange(show)
{
	if(show==2)
	{
		daymessage();
	}
	for(var i=1;i<3;i++){
		if(i==show){
			document.getElementById("div"+show).style.display="block";
		}else{
			document.getElementById("div"+i).style.display="none";
		}
	}

}
function InitImage( )
{
	document.getElementById("div2").style.display="none";
}
function loadBlockUI()
{
	$.blockUI.defaults.overlayCSS.opacity = '0.3';
	$.blockUI.defaults.overlayCSS.cursor = 'auto';

	var Url   = '/templates/userlogin.htm';
	var DivId = 'loginDiv';
	var loadWidth = 400/2;

	$('#'+DivId).load(Url,
	function(){
		$.blockUI({
			message: $('#'+DivId),
			css: {
				top:  '10%',
				left: ($(window).width()/2-loadWidth) + 'px',
				cursor : 'auto',
				border: '0px',
				width: 'auto'
			}
		});
	}
	)
}
//#函数:全选
function checkAllJob()
{
	var arrChk=$("input[name='jobID[]']");
	if($('#jobIDAll').attr('checked'))
	{
		$(arrChk).each(function(){
			$(this).attr("checked",'true');
		});
		$('#jobIDAll2').attr("checked",'true');
	}else{
		$(arrChk).each(function(){
			$(this).attr("checked",'');
		});
		$('#jobIDAll2').attr("checked",'');
	}
}
//#函数:全选
function checkAllJob2()
{
	var arrChk=$("input[name='jobID[]']");
	if($('#jobIDAll2').attr('checked'))
	{
		$(arrChk).each(function(){
			$(this).attr("checked",'true');
		});
		$('#jobIDAll').attr("checked",'true');
	}else{
		$(arrChk).each(function(){
			$(this).attr("checked",'');
		});
		$('#jobIDAll').attr("checked",'');
	}
}
//#函数:文字-全选
function checkAllJob3()
{
	if($('#jobIDAll').attr('checked'))
	{
		$('#jobIDAll').attr("checked",'');
	}else
	{
		$('#jobIDAll').attr("checked",'true');
	}
	checkAllJob();
}
function submitJobId()
{
	var arrChk=$("input[name='jobID[]'][checked]");
	var jobIdList = '';
	var cnt=0;
	$(arrChk).each(function(i){
		if(i == 0){
			jobIdList+= this.value;
		}else{
			jobIdList+= ','+this.value;
		}
		cnt++;
	});
	if(jobIdList == '')
	{
		alert('请选择职位');
	}
	else
	{
		if(confirm('你共选中'+cnt+'个职位,是否发送简历!'))
		{
			var url = '?controller=person&action=applyjob';
			$.post(url,{jobIdList:jobIdList},function(uid){
				if(uid>0)
				{
					alert('职位申请成功!');
					var arrChk=$("input[name='jobID[]']");
					$(arrChk).each(function(){
						$(this).attr("checked",'');
					});
					if($('#jobIDAll').attr('checked'))
					{
						$('#jobIDAll').attr("checked",'');
						$('#jobIDAll2').attr("checked",'');
					}
				}
				else
				{
					alert('您今日申请的职位已超过最多申请次数!');
				}
			});
		}
	}
}

function submitSelect()
{
	if(userIsLogin == 'Y')
	{
		submitJobId();
	}else
	{
		loadBlockUI();
	}
}
//jobinfo js
//申请职位信息
function submitSelect2(jobId)
{
	if(userIsLogin == 'Y')
	{
		applyjob(jobId);
	}else
	{
		loadBlockUI();
	}
}
function applyjob(jobId)
{
	var jobIdList=jobId;
	var url = '?controller=person&action=applyjob';
	$.post(url,{jobIdList:jobIdList},function(uid){
		if(uid>0)
		{
			alert('职位申请成功!');
		}else
		{
			alert('您今日申请的职位已超过最多申请次数!');
		}
	});
}
function duilian()
{
	var showad = true;
	var Toppx = 60;    //上端位置
	var AdDivW = 100;   //宽度
	var AdDivH = 300;   //高度
	var PageWidth = 800; //页面多少宽度象素下正好不出现左右滚动条
	var MinScreenW = 1024; //显示广告的最小屏幕宽度象素
	var ClosebuttonHtml = '<div align="right" style="position: absolute;top:0px;right:0px;margin:2px;padding:2px;z-index:2000;"><a href="javascript:;" onclick="hidead()" style="color:red;text-decoration:none;font-size:12px;">关闭</a></div>'
	var AdContentHtml = '<div align="center" style="color:green;font-size:23pt;font-family:黑体;"><br><br>广<br>告<br>内<br>容</div>';
	document.write ('<div id="Javascript.LeftDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');
	document.write ('<div id="Javascript.RightDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');
	function scall(){
	if(!showad){return;}
	if (window.screen.width<MinScreenW){
	alert("临时提示：\n\n显示器分辨率宽度小于"+MinScreenW+",不显示广告");
	showad = false;
	document.getElementById("Javascript.LeftDiv").style.display="none";
	document.getElementById("Javascript.RightDiv").style.display="none";
	return;
	}
	var Borderpx = ((window.screen.width-PageWidth)/2-AdDivW)/2;
	document.getElementById("Javascript.LeftDiv").style.display="";
	document.getElementById("Javascript.LeftDiv").style.top=document.body.scrollTop+Toppx;
	document.getElementById("Javascript.LeftDiv").style.left=document.body.scrollLeft+Borderpx;
	document.getElementById("Javascript.RightDiv").style.display="";
	document.getElementById("Javascript.RightDiv").style.top=document.body.scrollTop+Toppx;
	document.getElementById("Javascript.RightDiv").style.left=document.body.scrollLeft+document.body.clientWidth-document.getElementById("Javascript.RightDiv").offsetWidth-Borderpx;
	}
	function hidead()
	{
	showad = false;
	document.getElementById("Javascript.LeftDiv").style.display="none";
	document.getElementById("Javascript.RightDiv").style.display="none";
	}
	window.onscroll=scall;
	window.onresize=scall;
	window.onload=scall;
}