// JavaScript Document
// 核心JS
document.domain="hljrc.com"
var Navigation={
	isIE:(navigator.appVersion.indexOf("MSIE")!=-1),
	isIE6:(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE"),10).replace(/[^\d.]/g,"").indexOf("6.")!=-1),
	isIE7:(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE"),10).replace(/[^\d.]/g,"").indexOf("7.")!=-1),
	isOpera:navigator.userAgent.indexOf("Opera")!=-1,
	isSafari:navigator.appVersion.indexOf("KHTML")!=-1,
	isFirefox:navigator.userAgent.indexOf("Firefox")!=-1,
	isCamino:navigator.userAgent.indexOf("Camino")!=-1,
	isMozilla:navigator.userAgent.indexOf("Gecko/")!=-1
}

//===================================================================================================================== Prototype
String.prototype.toNum=function(){
	var n=this.match(/\d+/,"")
	if(n) return parseInt(n)
	else return 0
}
String.prototype.toDate=function(){
	var d=this.split(/\D+/)
	if(d[1])d[1]--
	d=eval("new Date("+d.join(",")+")")
	if(isNaN(d))d=new Date()
	return d
}
String.prototype.toHTML=function(){
	return this.htmlFilter().replace(/\r\n|\r|\n/g,"<br/>").replace(/\s/g,"&nbsp;")
}
String.prototype.toAttribute=function(){
	return this.htmlFilter().replace(/\r\n|\r|\n/g,"&#13;&#10;").replace(/\s/g,"&nbsp;")
}
String.prototype.removeBlank=function(){
	return this.replace(/^[\s　]*/mg,"").replace(/[\s　]*$/mg,"").replace(/^[\s　]*$/mg,"")
}
String.prototype.toContent=function(){
	return this.removeBlank().htmlFilter().replace(/^([^\r\n]+)/mg,"<p>$1</p>").replace(/\r\n|\r|\n/g,"").replace(/\s/g,"&nbsp;")
}
String.prototype.htmlFilter=function(){
	return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")
}
String.prototype.toURL=function(){
	return encodeURIComponent(this)
}
String.prototype.toSafeString=function(){
	return this.replace(/\\/g,"\\\\").replace(/\r\n|\r|\n/g,"\\r\\n").replace(/"/g,"\\\"").replace(/'/g,"\\'")
}
String.prototype.toSafeContent=function(){
	return this.replace(/<\/*a[^>]*>/ig,"").replace(/<script/ig,"<&#83;cript").replace(/<style/ig,"<&#83;tyle").replace(/\bon/ig,"&#79;n")
}
String.prototype.toFix=function(length, esp){
	if(this.replace(/[^\x00-\xff]/g,"dd").length<=length)return String(this)
	if(esp!="")esp=esp||"..."
	if(length<esp.length)esp=""
	length-=esp.length
	var text = this.substr(0,length)
	while(text.replace(/[^\x00-\xff]/g,"dd").length>length){
		text=text.substr(0,text.length-1)
	}
	return text+esp
}
var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var base64DecodeChars = new Array(
　　-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
　　-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
　　-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
　　52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
　　-1,　0,　1,　2,　3, 4,　5,　6,　7,　8,　9, 10, 11, 12, 13, 14,
　　15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
　　-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
　　41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
function base64encode(str) {
　var out, i, len;
　var c1, c2, c3;
　len = str.length;
　i = 0;
　out = "";
　while(i < len) {
		c1 = str.charCodeAt(i++) & 0xff;
		if(i == len){
	　　 out += base64EncodeChars.charAt(c1 >> 2);
　	　 out += base64EncodeChars.charAt((c1 & 0x3) << 4);
　　	 out += "==";
	　　 break;
		}
		c2 = str.charCodeAt(i++);
		if(i == len){
　　	out += base64EncodeChars.charAt(c1 >> 2);
　　	out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
　　	out += base64EncodeChars.charAt((c2 & 0xF) << 2);
　　	out += "=";
　　	break;
		}
		c3 = str.charCodeAt(i++);
		out += base64EncodeChars.charAt(c1 >> 2);
		out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
		out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
		out += base64EncodeChars.charAt(c3 & 0x3F);
　}
　return out;
}
function base64decode(str) {
　var c1, c2, c3, c4;
　var i, len, out;
　len = str.length;
　i = 0;
　out = "";
　while(i < len) {
		do {
　　	c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
		} while(i < len && c1 == -1);
		if(c1 == -1)break;
		do {
			c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
		} while(i < len && c2 == -1);
		if(c2 == -1)break;
		out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
		do {
			c3 = str.charCodeAt(i++) & 0xff;
	　　if(c3 == 61)return out;
			c3 = base64DecodeChars[c3];
		} while(i < len && c3 == -1);
		if(c3 == -1)break;
		out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
		do {
　　	c4 = str.charCodeAt(i++) & 0xff;
　　	if(c4 == 61)return out;
			c4 = base64DecodeChars[c4];
		} while(i < len && c4 == -1);
		if(c4 == -1)break;
		out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
　}
　return out;
}
function utf16to8(str) {
　var out, i, len, c;
　out = "";
　len = str.length;
　for(i = 0; i < len; i++) {
		c = str.charCodeAt(i);
		if ((c >= 0x0001) && (c <= 0x007F)) {
　　	out += str.charAt(i);
		} else if (c > 0x07FF) {
　　	out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
　　	out += String.fromCharCode(0x80 | ((c >>　6) & 0x3F));
　　	out += String.fromCharCode(0x80 | ((c >>　0) & 0x3F));
		} else {
　　	out += String.fromCharCode(0xC0 | ((c >>　6) & 0x1F));
　　	out += String.fromCharCode(0x80 | ((c >>　0) & 0x3F));
		}
　}
　return out;
}
function utf8to16(str) {
　var out, i, len, c;
　var char2, char3;
　out = "";
　len = str.length;
　i = 0;
　while(i < len) {
		c = str.charCodeAt(i++);
		switch(c >> 4){
		　case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
	　　	out += str.charAt(i-1);
	　	　break;
　		case 12: case 13:
　　		char2 = str.charCodeAt(i++);
		　　out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
　　 		break;
　		case 14:
　　		char2 = str.charCodeAt(i++);
　　		char3 = str.charCodeAt(i++);
　　		out += String.fromCharCode(((c & 0x0F) << 12) |((char2 & 0x3F) << 6) |((char3 & 0x3F) << 0));
		　　break;
		}
　}
　return out;
}
String.prototype.toBase64=function(){
	return base64encode(utf16to8(this));
}
String.prototype.fromBase64=function(){
	return utf8to16(base64decode(this));
}
Date.prototype.toString=function(){
	return new String(this.getFullYear()+"-0"+(this.getMonth()+1)+"-0"+this.getDate()+" 0"+this.getHours()+":0"+this.getMinutes()+":0"+this.getSeconds()).replace(/(\D)0(\d{2})/g,"$1$2")
}
Date.prototype.addYear=function(year){
	return new Date(this.setFullYear(this.getFullYear()+parseInt(year)))
}
Date.prototype.addMonth=function(month){
	return new Date(this.setMonth(this.getMonth()+parseInt(month)))
}
Date.prototype.addDate=function(date){
	return new Date(this.setDate(this.getDate()+parseInt(date)))
}
Date.prototype.addHours=function(hour){
	return new Date(this.setHours(this.getHours()+parseInt(hour)))
}
Date.prototype.addMinutes=function(minute){
	return new Date(this.setMinutes(this.getMinutes()+parseInt(minute)))
}
Date.prototype.addSeconds=function(second){
	return new Date(this.setSeconds(this.getSeconds()+parseInt(second)))
}
Date.prototype.toSimpleCase=function(){
	return this.toString().replace(/-/g,".")
}
Number.prototype.checkSum=function(number){
	return (this^number)==(this-number)
}
Number.prototype.toIP=function(){
	var ip=this.toString(16).split("")
	for(var o=0; o<ip.length; o=o+2){
		ip[o]=parseInt(ip[o]+ip[o+1],16)
		ip[o+1]=""
	}
	ip=ip.join(".").replace(/\.+/g,".").replace(/^\.|\.$/g,"")
	return ip
}
Number.prototype.minMax=function(v1,v2){
	if(v1>v2){
		var v3=v1
		v1=v2
		v2=v3
	}
	if(this<v1)return v1
	if(this>v2)return v2
	return this
}
//===================================================================================================================== Cookie
var Cookie={}
Cookie.set=function(key, value, expires){
	var root = ""
	var base = ""
	var newCookie=""
	if(!value){
		value = ""
		expires = "1986-7-21 00:00:00"
	}
	if(key.indexOf(".")!=-1){
		var rootName=key.substr(0,key.indexOf("."))
		var subName =key.substr(key.indexOf(".")+1)
		root = Cookie.__getRecursion(document.cookie, rootName, 0)
		if(root){
			root = String(root).split("&")
			for(i=0;i <root.length; i++){
				var cName = root[i].substr(0, root[i].indexOf("="))
				var cValue = root[i].substr(root[i].indexOf("=")+1)
				if (cName != subName){
					base += cName + "=" + encodeURIComponent(cValue) + "&"
				}
			}
		}else{
			base = ""	
		}
		newCookie = rootName + "=" + base + subName + "=" + encodeURIComponent(value)
	}else{
		newCookie = key + "=" + encodeURIComponent(value)
	}
 	if(typeof expires == "string")expires=expires.toDate()
	if(expires)expires = "; expires=" + expires.toGMTString()
	else expires=""
	document.cookie = newCookie + expires + "; domain=.hljrc.com; path=/"
}
Cookie.get=function(key){
	return Cookie.__getRecursion(document.cookie, key, 0)
}
Cookie.__getRecursion=function(string, key, level){ //获取Cookie递归函数
	key = key.split(".")
	if(level==0){
		string = string.split(";")
	}else{
		string = string.split("&")
	}
	for(var i=0;i<string.length;i++){
		var cName = string[i].substr(0, string[i].indexOf("=")).replace(/\s/,"")
		var cValue = string[i].substr(string[i].indexOf("=") + 1)
		if(cName == key[level]){
			if(!key[level+1]){
				return String(decodeURIComponent(cValue.replace(/\+/g," ")))
			}else{
				return Cookie.__getRecursion(cValue, key.join("."), level+1)
			}
		}
	}
	return
}
Cookie.alert=function(){alert(document.cookie)}

var Client={}
Client.isLogin=function(redirect){
	if(Cookie.get("ddLogin.id")) return true
	else{
		Cookie.set("ddLogin")
		if(redirect)openLoginBox()
		return false
	}
}
//===================================================================================================================== DOM
$=function(objName){
	if(typeof objName == "string") return instanceObject(document.getElementById(objName))
	else return instanceObject(document.getElementById(objName)||objName)
}
$$=function(tagName, className, parentNode){
	parentNode=parentNode||(this==window?document:this)
	var searchTag
	tagName=tagName||""
	if(!tagName){
		searchTag="*"
	}else if(tagName.indexOf("|")!=-1){
		searchTag="*"
	}else{
		searchTag=tagName
	}
	var result=[]
	var element=parentNode.getElementsByTagName(searchTag)
	for(var i=0; i<element.length; i++){
		if(!className || (className && (" "+element[i].className+" ").indexOf(" "+className+" ")!=-1)){
			if(tagName.indexOf("|")==-1 || ("|"+tagName+"|").indexOf("|"+element[i].tagName+"|")!=-1){
				result.push(instanceObject(element[i]))
			}
		}
	}
	return result
}
function newElement(tagName, attributes){
	if(tagName.indexOf("<")==0){
		var object=document.createElement("SPAN")
		object.innerHTML=tagName
		object=object.childNodes[0]
	}else{
		var object=document.createElement(tagName)
	}
	if(attributes){
		for(var i in attributes){
			object.setAttribute(i, attributes[i])
			object[i]=attributes[i]
		}
	}
	return instanceObject(object)
}
function instanceObject(){
	for(var i=0; i<arguments.length; i++){
		if(arguments[i]){
			if(!arguments[i].addEventListener)		arguments[i].addEventListener=addEvent
			if(!arguments[i].removeEventListener)	arguments[i].removeEventListener=removeEvent
			if(!arguments[i].show)					arguments[i].show=objectShow
			if(!arguments[i].hide)					arguments[i].hide=objectHide
			if(!arguments[i].getAbsPosition)		arguments[i].getAbsPosition=getAbsPosition
			if(!arguments[i].getInnerText)			arguments[i].getInnerText=getInnerText
			if(!arguments[i].$$)					arguments[i].$$=$$
			if(!arguments[i].insertAfter)			arguments[i].insertAfter=insertAfter
		}
	}
	return arguments[0]
}
function getInnerText(){
	return this.innerText||this.textContent
}
function addEvent(sEvent,func){
	return this.attachEvent("on"+sEvent,func)
}
function removeEvent(sEvent, func){
	return this.detachEvent("on"+sEvent,func);
}
function objectShow(){
	this.style.display=""
}
function objectHide(){
	this.style.display="none"
}

function eventTarget(evt){ // 根据事件返回源对象
	return evt.target||evt.srcElement
}

function insertAfter(newElement,targetElement){
	var parent=targetElement.parentNode;
	if (parent.lastChild==targetElement){
		parent.appendChild(newElement);
	} else {
		parent.insertBefore(newElement,targetElement.nextSibling);
	}
}
function getAbsPosition(){
	var object=this
	var x=0, y=0
	do{
		x+=object.offsetLeft
		y+=object.offsetTop
	}while(object=object.offsetParent);
	return {x:x, y:y}
}

instanceObject(window)
instanceObject(document)
if(Navigation.isIE6)document.execCommand("BackgroundImageCache", false, true)
//==================================================================================================================== Debug
function debug(obj){
	var o=[]
	for(var i in obj)o.push(i+"="+obj[i])
	o.sort(function(a,b){
		if(a>b) return 1
		return -1
	})
	if(!$("debugBox"))document.body.appendChild(newElement("DIV", {id:"debugBox"}))
	$("debugBox").innerHTML = o.join("<br />")
}
function ajaxDebug(){
	var iframe=document.$$("IFRAME")
	for(var i=0; i<iframe.length; i++){
		iframe[i].style.left="0px"
		iframe[i].style.top="0px"
		iframe[i].style.position="fixed"
		iframe[i].style.display=""
	}
}
window.addEventListener("load", function(){if($("spanCopy"))$("spanCopy").addEventListener("click",ajaxDebug,true)}, true)

//=====================================================================================================================Response
function beat(){
	var lastBeat=Cookie.get("beat")
	if(!lastBeat)lastBeat="1986-07-21 00:00:00"
	lastBeat=lastBeat.toDate()
	if(lastBeat<new Date().addMinutes(-5)){
		$("iframeBeat").src="http://www.hljrc.com/do/beat.asp?"+Math.random()
		Cookie.set("beat",new Date().toString())
	}
}
function writeLogin(){
	document.write(getLoginString())
	document.write('<iframe id="iframeBeat" style="display:none"></iframe>')
	setInterval(beat,60*1000)
	beat()
}
function getLoginString(){
	if(Cookie.get("ddLogin.id")){
		var e='<span>欢迎'+(Cookie.get("ddLogin.ddFirstLogin")=="1"?"您":"回来")+', <strong>'+Cookie.get("ddLogin.ddName").toHTML()+'</strong>!</span>'
		if(Cookie.get("ddLogin.ddType")=="0"){
			return e+'<a href="http://www.hljrc.com/do/person/" target="_blank">我的求职中心</a><a href="javascript:;" onclick="viewMyPage()">查看我的简历</a><a id="exitLogin" href="javascript:;" onclick="logout()">退出</a>'
		}else{
			return e+'<a href="http://www.hljrc.com/do/company/" target="_blank">我的招聘中心</a><a href="javascript:;" onclick="viewMyPage()">查看企业资料</a><a id="exitLogin" href="javascript:;" onclick="logout()">退出</a>'
		}
	}else{
		return '<span><strong>游客</strong>, 您好!</span><a href="javascript:;" onclick="openLoginBox(this); return false" id="loginLink">个人/企业登录</a><a href="http://www.hljrc.com/do/register.asp?person" target="_blank">个人求职注册</a><a href="http://www.hljrc.com/do/register.asp?company" target="_blank">企业招聘注册</a>'
	}
}

function getLoginStringIndex(){
	if(Cookie.get("ddLogin.id")){
		var e='<table border="0" cellpadding="0" cellspacing="0"><tr><td class="postHeader">欢迎'+(Cookie.get("ddLogin.ddFirstLogin")=="1"?"您":"回来")+', '+Cookie.get("ddLogin.ddName").toHTML()+'. <br />这是您第 '+Cookie.get("ddLogin.ddLoginCount")+' 次登录.</td></tr><tr><td class="postHeader">'
		if(Cookie.get("ddLogin.ddType")=="0"){
			e+='<a href="http://www.hljrc.com/do/person/" target="_blank">&raquo; 进入我的求职中心</a> <br /> <a href="javascript:;" onclick="viewMyPage()">&raquo; 查看我的简历</a> <br /> <a id="exitLogin" href="javascript:;" onclick="logout()">&raquo; 退出登录</a>'
		}else{
			e+='<a href="http://www.hljrc.com/do/company/" target="_blank">&raquo; 进入我的招聘中心</a> <br /> <a href="javascript:;" onclick="viewMyPage()">&raquo; 查看企业资料</a> <br /> <a id="exitLogin" href="javascript:;" onclick="logout()">&raquo; 退出登录</a>'
		}
		return e+'</td></tr></table>'
	}else{
		return '<form id="frmLogin" name="frmLogin" action="http://www.hljrc.com/do/passport.asp?action=login" method="post" target="loginAjaxDo"><table border="0" cellspacing="0" cellpadding="5"><tr><td colspan="3"><h2>企业/个人登录入口</h2></td></tr><tr><td width="35">账号</td><td><input tabindex="1" name="txtUserName" type="text" class="input" id="txtUserName" size="20" /></td><td rowspan="2"><input tabindex="3" type="submit" id="btnLogin" value="登录" /></td></tr><tr><td>密码</td><td><input tabindex="2" name="txtPassword" type="password" class="input" id="txtPassword" size="20" /></td></tr><tr><td>&nbsp;</td><td colspan="2"><ul><li><a href="http://www.hljrc.com/do/register.asp?company">免费注册企业招聘会员</a></li><li class="p"><a href="http://www.hljrc.com/do/register.asp?person">免费注册个人求职会员</a></li></ul></td></tr></table><iframe style="display: none" name="loginAjaxDo"></iframe></form>'
	}
}
function viewMyPage(){
	var id=Cookie.get("ddLogin.id")
	if(id){
		if(Cookie.get("ddLogin.ddType")==0){
			window.open("http://www.hljrc.com/talents/"+id+"")
		}else{
			window.open("http://www.hljrc.com/enterprise/"+id+"")
		}
	}else{
		openLoginBox()
	}
}
function addBookmark(title,url) {
	if(!title) title="黑龙江人才招聘网"
	if(!url) url="http://www.hljrc.com/"
	if(window.sidebar){ 
		window.sidebar.addPanel(title, url, ""); 
	}else if(document.all){
		window.external.AddFavorite(url, title);
	}
}
function copyToClipboard(txt) {
	var errUnsupport="代码复制操作暂不支持您的浏览器. 您可以使用 Ctrl+C 来手动复制."
	var errNotAllow="您的浏览器不允许脚本执行剪切板操作, 代码复制无法完成!"
	if(window.clipboardData) {   
		window.clipboardData.clearData()
		window.clipboardData.setData("Text", txt)
		return ""
	}else if(navigator.userAgent.indexOf("Opera") != -1) {   
		return errUnsupport
	}else if (window.netscape){
		try {   
			netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
		}catch(e){   
			return errNotAllow+'\n\n如果您正在使用 FireFox 浏览器浏览, 请在地址栏输入 about:config 并按回车键,\n然后将 signed.applets.codebase_principal_support 选项设置为 true.'
			return false
		}
		var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard)
		if (!clip) return errNotAllow
		var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable)
		if (!trans) return errNotAllow
		trans.addDataFlavor('text/unicode')
		var str = new Object()
		var len = new Object()
		var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
		var copytext = txt
		str.data = copytext
		trans.setTransferData("text/unicode",str,copytext.length*2)
		var clipid = Components.interfaces.nsIClipboard
		if (!clip) return errNotAllow
		clip.setData(trans,null,clipid.kGlobalClipboard)
		return ""
	}
	return errUnsupport
} 
function writeFooter(){
	document.write('<script src="http://www.hljrc.com/js/tongji.js" type="text/javascript"></script>')
}
function writeIndexFooter(){
	document.write('<script type="text/javascript" src=" http://web.haodan.com/tiyan/wangzhi/play.js"></script>')
}
//===================================================================================================================== Data

// -----------自定义会话框开始 ---------------
var dLeft, dTop, dWidth, dHeight, flyInWidthSave, flyInHeightSave, exiting
var oldDTop, oldDLeft, button1Save, button2Save, fromObjectSave
function openFrameBox(contentData, button1, button2, fromObject){
	if(!$("frameBox")){
		document.body.appendChild(newElement("span",{innerHTML:'<div id="frameBox" style="display: none;"><table border="0" cellpadding="0" cellspacing="0"><tr><td width="15" height="15" class="b">&nbsp;</td><td class="b">&nbsp;</td><td width="15" class="b">&nbsp;</td></tr><tr><td class="b">&nbsp;</td><td class="title" id="frameTitle">&nbsp;</td><td class="b">&nbsp;</td></tr><tr><td class="b">&nbsp;</td><td class="content"><div class="uiContent"><div id="boxContent"></div></div></td><td class="b">&nbsp;</td></tr><tr><td class="b">&nbsp;</td><td class="buttonContainer"><input type="button" class="button" value="" id="frameBtn1" /><input type="button" class="button button2" value="" id="frameBtn2"/></td><td class="b">&nbsp;</td></tr><tr><td height="15" class="b">&nbsp;</td><td class="b">&nbsp;</td><td class="b">&nbsp;</td></tr></table></div><div id="frameBoxBackground" style="display: none;"><iframe src="about:blank" id="frameBoxBackgroundIframe" frameborder="0"></iframe></div><div id="frameBoxForeground" style="display: none;"></div>'}))
		$("frameTitle").addEventListener("mousedown",function(evt){
			clickX=evt.offsetX||evt.layerX
			clickY=evt.offsetY||evt.layerY
			frameMove=true
			$("frameBoxForeground").style.width=window.document.documentElement.clientWidth+"px"
			$("frameBoxForeground").style.height=window.document.documentElement.clientHeight+"px"
			$("frameBoxForeground").style.left=(window.document.documentElement.scrollLeft||window.document.body.scrollLeft)+"px"
			$("frameBoxForeground").style.top=(window.document.documentElement.scrollTop||window.document.body.scrollTop)+"px"
			$("frameBoxForeground").show()
			if(!Navigation.isIE)$("frameBox").className="frameBoxClicked"
			evt.returnValue=false
			if(evt.preventDefault)evt.preventDefault()
			return false
		},true)
		$("frameBoxForeground").addEventListener("mousemove",function(evt){
			var moveX=evt.offsetX||evt.layerX
			var moveY=evt.offsetY||evt.layerY
			if(moveXSave==null)moveXSave=moveX
			if(moveYSave==null)moveYSave=moveY
			if(Math.abs(moveX-moveXSave)>=4 || Math.abs(moveY-moveYSave)>=4){
				var d=Navigation.isFirefox?0:16
				var dCLeft=moveX-clickX-d+(window.document.documentElement.scrollLeft||window.document.body.scrollLeft)
				var dCTop=moveY-clickY-d+(window.document.documentElement.scrollTop||window.document.body.scrollTop)
				
				var cALeft=parseInt($("frameBoxForeground").style.left)||0
				var cATop=parseInt($("frameBoxForeground").style.top)||0
				var cAWidth=parseInt($("frameBoxForeground").style.width)||0
				var cAHeight=parseInt($("frameBoxForeground").style.height)||0
				var cBWidth=$("boxContent").scrollWidth+52
				var cBHeight=$("boxContent").scrollHeight+131
	
				if(dCLeft<cALeft)dCLeft=cALeft
				if(dCTop<cATop)dCTop=cATop
				if(dCLeft+cBWidth>cALeft+cAWidth)dCLeft=cALeft+cAWidth-cBWidth
				if(dCTop+cBHeight>cATop+cAHeight)dCTop=cATop+cAHeight-cBHeight
				
				dLeft=dCLeft||0
				dTop=dCTop||0
			}
			evt.returnValue=false
			if(evt.preventDefault)evt.preventDefault()
			return false
		},true)
		$("frameBoxForeground").addEventListener("mouseup",function(evt){
			$("frameBoxForeground").hide()
			frameMove=false
			moveXSave=null
			moveYSave=null
			$("frameBox").className=""
			evt.returnValue=false
			if(evt.preventDefault)evt.preventDefault()
			return false
		},true)
		$("boxContent").addEventListener("keypress",function(evt){
			var target=eventTarget(evt)
			if(target.tagName=="INPUT" && (target.type=="text" || target.type=="password") && evt.keyCode==13){
				if(button1Save){
					doFrameButtonClick(button1Save)
				}
			}
		},true)
		$("frameBox").addEventListener("keypress",function(evt){
			if(evt.keyCode==27){
				if(button2Save){
					doFrameButtonClick(button2Save)
				}
			}
		},true)
		window.addEventListener("scroll",function(evt){
			if($("frameBox").style.display=="none") return false;
			var target=eventTarget(evt)
			if(target){
				if(Navigation.isIE6) return false
				if(target.tagName){
					return false
				}
			}
			var cLeft=parseInt($("frameBox").style.left)-(window.document.documentElement.scrollLeft||window.document.body.scrollLeft)
			var cTop=parseInt($("frameBox").style.top)-(window.document.documentElement.scrollTop||window.document.body.scrollTop)
			var dWidth=$("boxContent").scrollWidth
			var dHeight=$("boxContent").scrollHeight
			
			dLeft=Math.floor((window.document.documentElement.clientWidth-dWidth-52)/2)+(window.document.documentElement.scrollLeft||window.document.body.scrollLeft||0)+oldDLeft
			dTop=Math.floor((window.document.documentElement.clientHeight-dHeight-131)/2)+(window.document.documentElement.scrollTop||window.document.body.scrollTop||0)+oldDTop
			
			scrollLeftSave=(window.document.documentElement.scrollLeft||window.document.body.scrollLeft)
			scrollTopSave=(window.document.documentElement.scrollTop||window.document.body.scrollTop)
			
			if(frameMove){
				$("frameBoxForeground").style.width=window.document.documentElement.clientWidth+"px"
				$("frameBoxForeground").style.height=window.document.documentElement.clientHeight+"px"
				$("frameBoxForeground").style.left=(window.document.documentElement.scrollLeft||window.document.body.scrollLeft)+"px"
				$("frameBoxForeground").style.top=(window.document.documentElement.scrollTop||window.document.body.scrollTop)+"px"
			}
		},true)
		window.addEventListener("resize",function(){
			if($("frameBox").style.display=="none") return false;
			
			$("frameBoxBackground").hide()
			$("frameBox").hide()
			$("frameBoxForeground").style.width=window.document.documentElement.clientWidth+"px"
			$("frameBoxForeground").style.height=window.document.documentElement.clientHeight+"px"
			$("frameBoxForeground").style.left=(window.document.documentElement.scrollLeft||window.document.body.scrollLeft)+"px"
			$("frameBoxForeground").style.top=(window.document.documentElement.scrollTop||window.document.body.scrollTop)+"px"
			if(Navigation.isIE6 && 1==2){
				setTimeout(doResizeStep2,10)
			}else{
				doResizeStep2()
			}
		},true)
		function doResizeStep2(){
			var clientWidth=Math.max(window.document.documentElement.clientWidth, window.document.documentElement.scrollWidth)
			var clientHeight=Math.max(window.document.documentElement.clientHeight, window.document.documentElement.scrollHeight)
			$("frameBoxBackgroundIframe").width=clientWidth
			$("frameBoxBackgroundIframe").height=clientHeight
			$("frameBoxBackground").show()
			$("frameBox").show()
			var dCLeft=parseInt($("frameBox").style.left)
			var dCTop=parseInt($("frameBox").style.top)
			var cALeft=parseInt($("frameBoxForeground").style.left)
			var cATop=parseInt($("frameBoxForeground").style.top)
			var cAWidth=parseInt($("frameBoxForeground").style.width)
			var cAHeight=parseInt($("frameBoxForeground").style.height)
			var cBWidth=$("boxContent").scrollWidth+52
			var cBHeight=$("boxContent").scrollHeight+131

			if(dCLeft<cALeft)dCLeft=cALeft
			if(dCTop<cATop)dCTop=cATop
			if(dCLeft+cBWidth>cALeft+cAWidth)dCLeft=cALeft+cAWidth-cBWidth
			if(dCTop+cBHeight>cATop+cAHeight)dCTop=cATop+cAHeight-cBHeight
			
			dLeft=dCLeft
			dTop=dCTop
		}
		$("frameBtn1").addEventListener("click",function(){
			doFrameButtonClick(button1Save)
		},true)
		$("frameBtn2").addEventListener("click",function(){
			doFrameButtonClick(button2Save)
		},true)
		function doFrameButtonClick(target){
			if(target){
				if(target.callBack){
					if(target.callBack()!=false){
						flyOutFrame()
					}
				}else{
					flyOutFrame()
				}
			}else{
				flyOutFrame()
			}
		}
	}
	var clientWidth=Math.max(window.document.documentElement.clientWidth, window.document.documentElement.scrollWidth)
	var clientHeight=Math.max(window.document.documentElement.clientHeight, window.document.documentElement.scrollHeight)
	$("frameBoxBackgroundIframe").width=clientWidth
	$("frameBoxBackgroundIframe").height=clientHeight
	$("frameBoxBackground").show()
	$("frameBoxBackground").className=""
	frameDisable(false)
	if(button1){
		$("frameBtn1").value=button1.text
		$("frameBtn1").show()
	}else{
		$("frameBtn1").hide()
	}
	if(button2){
		$("frameBtn2").value=button2.text
		$("frameBtn2").show()
	}else{
		$("frameBtn2").hide()
	}
	$("frameBoxForeground").hide()
	fromObject=fromObject||$("siteLogo")
	var startX=0
	var startY=0
	var startWidth=0
	var startHeight=0
	if(fromObject){
		startX=fromObject.getAbsPosition().x
		startY=fromObject.getAbsPosition().y
		startWidth=fromObject.offsetWidth
		startHeight=fromObject.offsetHeight
	}
	button1Save=button1
	button2Save=button2
	fromObjectSave=fromObject
	
	$("frameTitle").innerHTML=contentData.title.toHTML()
	$("boxContent").innerHTML=contentData.innerHTML
	$("boxContent").style.width="1px"
	$("boxContent").style.height="1px"
	$("frameBox").style.visibility="hidden"
	$("frameBox").show()
	dWidth=$("boxContent").scrollWidth
	dHeight=$("boxContent").scrollHeight
	dLeft=Math.floor((window.document.documentElement.clientWidth-dWidth-52)/2)+(window.document.documentElement.scrollLeft||window.document.body.scrollLeft)
	dTop=Math.floor((window.document.documentElement.clientHeight-dHeight-131)/2)+(window.document.documentElement.scrollTop||window.document.body.scrollTop)
	$("boxContent").style.width=Math.max(startWidth-52,1)+"px"
	$("boxContent").style.height=Math.max(startHeight-131,1)+"px"
	$("frameBox").style.left=startX+(startWidth-$("frameBox").offsetWidth)/2+"px"
	$("frameBox").style.top=startY+(startHeight-$("frameBox").offsetHeight)/2+"px"
	
	flyInWidthSave=$("frameBox").offsetWidth
	flyInHeightSave=$("frameBox").offsetHeight
	
	
	scrollLeftSave=(window.document.documentElement.scrollLeft||window.document.body.scrollLeft)
	scrollTopSave=(window.document.documentElement.scrollTop||window.document.body.scrollTop)
	
	setTimeout(flyInFrame, 100)
	setTimeout(focusFormFrame,1000)
}
var clickX, clickY, frameMove
var scrollLeftSave, scrollTopSave
var moveXSave=null, moveYSave=null
var oldDLeft, oldDTop
function flyOutFrame(){
	if(fromObjectSave){
		dWidth=Math.max(fromObjectSave.offsetWidth-52,1)
		dHeight=Math.max(fromObjectSave.offsetHeight-131,1)
		dLeft=fromObjectSave.getAbsPosition().x+Math.floor((dWidth-flyInWidthSave)/2)+26
		dTop=fromObjectSave.getAbsPosition().y+Math.floor((dHeight-flyInHeightSave)/2)+24
	}else{
		dWidth=dHeight=dLeft=dTop=0
	}
	exiting=true
	setTimeout(hideFrameBox,200)
}
var closeFrame=flyOutFrame
function hideFrameBox(){
	$("frameBox").hide()
	$("frameBoxForeground").hide()
	$("frameBoxBackground").hide()
}
function focusFormFrame(){
	var inp=$("boxContent").$$("INPUT|TEXTAREA|SELECT")
	var inpSet=false
	for(var i=0; i<inp.length; i++){
		try{
			inp[i].focus()
			inpSet=true
			break;
		}catch(e){continue}
	}
	if(!inpSet){
		try{$("boxContent").focus()}catch(e){}
	}
	
}
function flyInFrame(innerHTML){
	if($("frameBox").style.visibility=="hidden"){
		$("frameBox").style.visibility=""
	}
	$("boxContent").style.width=dWidth+"px"
	$("boxContent").style.height=dHeight+"px"
	$("frameBox").style.left=dLeft+"px"
	$("frameBox").style.top=dTop+"px"
	if((window.document.documentElement.scrollLeft||window.document.body.scrollLeft)==scrollLeftSave && (window.document.documentElement.scrollTop||window.document.body.scrollTop)==scrollTopSave){
		oldDLeft=dLeft-(Math.floor((window.document.documentElement.clientWidth-dWidth-52)/2)+(window.document.documentElement.scrollLeft||window.document.body.scrollLeft||0))
		oldDTop=dTop-(Math.floor((window.document.documentElement.clientHeight-dHeight-131)/2)+(window.document.documentElement.scrollTop||window.document.body.scrollTop||0))
	}
	if(!exiting){
		setTimeout(flyInFrame, 10)
	}else{
		exiting=false
		$("frameBox").hide()
		$("frameBoxForeground").hide()
		$("frameBoxBackground").hide()
	}

}

function frameDisable(disabled){
	$("frameBtn1").disabled=disabled
	$("frameBtn2").disabled=disabled
}

var loginCallBack
function openLoginBox(object, callBack){
	if($("exitLogin")){
		logout()
	}
	object=object||$("loginLink")
	openFrameBox({title:"个人求职/企业招聘会员登录",innerHTML:'<div style="width: 200px; height: 100px; margin-top: 0px;" class="loginContainer">'+(callBack?"抱歉, 您需要登录才能继续刚刚的操作":"")+'<form action="http://www.hljrc.com/do/passport.asp?action=login" method="post" name="frmLogin" target="loginAjaxDo" id="frmLogin"><table border="0" cellspacing="0" cellpadding="0"><tr><td class="postHeader">用户名:</td><td><input name="txtUserName" type="text" class="input" id="txtUserName" size="25" /></td></tr><tr><td class="postHeader">密　码:</td><td><input name="txtPassword" type="password" class="input" id="txtPassword" size="25" /></td></tr><tr><td>&nbsp;</td><td><a href="http://www.hljrc.com/do/register.asp?person" class="registerLink" target="_blank">免费注册个人求职用户</a></td></tr><tr><td>&nbsp;</td><td><a href="http://www.hljrc.com/do/register.asp?company" class="registerLink registerLinkCompany" target="_blank">免费注册企业招聘用户</a></td></tr></table></form><iframe name="loginAjaxDo" style="display: none;"></iframe></div>'},{text:" 登录 ",callBack:startLogin},{text:"取消"},$(object))
	loginCallBack=callBack
}
function startLogin(){
	$("frmLogin").submit()
	frameDisable(true)
	return false
}
function processCompleteLogin(){
	if($("frameBtn1"))closeFrame()
	if($("loginInfoContainer"))$("loginInfoContainer").innerHTML=getLoginString()
	if($("indexLoginInfoContainer"))$("indexLoginInfoContainer").innerHTML=getLoginStringIndex()
	if(Navigation.isIE6){
		window.document.body.style.zoom="0.99"
		window.document.body.style.zoom="1"
	}
	if(loginCallBack)loginCallBack()
}
function errorLogin(text, errorField){
	if(errorField){
		$(errorField).focus()
		$(errorField).select()
	}
	text="很抱歉, 操作失败!\n==============================\n"+text
	alert(text)
	if($("frameBtn1"))frameDisable(false)
}
function logout(){
	var iframe=newElement("IFRAME")
	iframe.hide()
	document.body.appendChild(iframe)
	iframe.src='http://www.hljrc.com/do/passport.asp?action=exit'
}
function processLogout(){
	if($("loginInfoContainer"))$("loginInfoContainer").innerHTML=getLoginString()
	if($("indexLoginInfoContainer"))$("indexLoginInfoContainer").innerHTML=getLoginStringIndex()
	if(Navigation.isIE6){
		window.document.body.style.zoom="0.99"
		window.document.body.style.zoom="1"
	}
	var al=false
	if($("frameBox")){
		if($("frameBox").style.display=="none")al=true
	}else{
		al=true
	}
	if(al){
		if(window.location.href.match(/\/do\/(company|person)\/*/)){
			alert("您已成功退出! 点击确定将为您转到首页.")
			window.location.href="http://www.hljrc.com/"
		}else{
			alert("您已成功退出!")
		}
	}
}
function showJobTip(object, asbottom){
	if(!$("divJobTip")){
		var div=newElement("div",{className:'jobTip', id:'divJobTip'})
		document.body.insertBefore(div,document.body.childNodes[0])
		div.addEventListener("mousemove",hideJobTip,true)
	}
	$("divJobTip").innerHTML='<table border="0" cellspacing="0" cellpadding="0"><tr><td width="15" height="15" class="bgMask">&nbsp;</td><td width="154" class="bgMask">&nbsp;</td><td width="15" class="bgMask">&nbsp;</td></tr><tr><td height="49" class="bgMask">&nbsp;</td><td><a href="'+object.href+'" target="_blank" onmouseout="hideJobTip()"></a></td><td class="bgMask">&nbsp;</td></tr><tr><td class="bgMask">&nbsp;</td><td class="textShow"><span class="companyName">'+object.title.toAttribute()+'</span><div class="jobList">'+object.getAttribute("jobdata").split(String.fromCharCode(1)).join("<br />")+'</div></td><td class="bgMask">&nbsp;</td></tr><tr><td height="15" class="bgMask">&nbsp;</td><td class="bgMask">&nbsp;</td><td class="bgMask">&nbsp;</td></tr></table>'
	
	var p=$(object).getAbsPosition()
	$("divJobTip").style.top=(p.y-16)+"px"
	$("divJobTip").style.left=(p.x-16)+"px"
	$("divJobTip").show()
}
function hideJobTip(evt){
	if(evt){
		var target=eventTarget(evt)
		if(target.tagName!="A"){
			$("divJobTip").hide()
		}
	}else{
		$("divJobTip").hide()
	}
}

function initSiteNav(city){
	var tabs=document.getElementById("divTabs").getElementsByTagName("A")
	var lastTab
	for(var i=0; i<tabs.length; i++){
		tabs[i].className="a"+(i+1)
		tabs[i].innerHTML="<span><strong>"+tabs[i].innerHTML+"</span></strong>"
		tabs[i].hideFocus=true
		if((tabs[i].href.indexOf("http://"+city+".hljrc.com")!=-1 && city && tabs[i].href.indexOf("talents")==-1)||(city=="person" && tabs[i].href.indexOf("talents")!=-1)){
			tabs[i].className+='Selected selected'
		}
	}
}



function contactQQ(sigKey){
	var ifr=$("contactQQIframe")
	if(!ifr){
		ifr=newElement("IFRAME",{id:"contactQQIframe"})
		ifr.style.display="none"
		document.body.appendChild(ifr)
	}
	ifr.src="http://sighttp.qq.com/cgi-bin/check?sigkey="+sigKey
}