function checkLogin(content,n) {
	if (n == 0 && content.value == "输入关键字-例如：销售"){
	   
		content.value="";
	}
	if (n == 1){
		if(content.value == "输入关键字-例如：销售"){content.value="";}
		
	}
	if (n == 2 && content.value == ""){content.value = "输入关键字-例如：销售";}
}
function display(num){
 document.getElementById('c'+num).className="on";
 document.getElementById('n'+num).style.display="";
 for(var i=1;i<=10;i++){
 if(i!=num){
 if(document.getElementById('c'+i)!=null&&document.getElementById('n'+i)!=null){
 document.getElementById('c'+i).className="out";
 document.getElementById('n'+i).style.display="none";
 }
 }
 }
}
function openSelectDiv(name,imgid){
	var colorSelectObj = document.getElementById(name);
	colorSelectObj.style.display = "block";
	document.getElementById(imgid).src="t1/img/top_up.gif";
        
}
function closeSelectDiv(name,imgid){
	var colorSelectObj = document.getElementById(name);
	colorSelectObj.style.display = "none";
	document.getElementById(imgid).src="t1/img/top_down.gif";
	
       
}
function cc()
{
	if(document.getElementById("changecity").style.display == "")
	{
		document.getElementById("changecity").style.display = "none";
		return;
	}
	else
	{
		document.getElementById("changecity").style.display = "";
	}
}
document.write("<div id='showpostdetail' class='dv'></div>");
function showdetail(w){
	if (w=="")return;
	var x=event.x;
	var y=event.y;
	showpostdetail.innerHTML=document.getElementById(w).innerHTML + "<br>";
	showpostdetail.style.visibility="visible";
	showpostdetail.style.display="block";
	showpostdetail.style.left=x+10;
	showpostdetail.style.pixelTop=y+document.documentElement.scrollTop+10;

}
function hidedetail(){
	showpostdetail.style.innerHTML=""
	showpostdetail.style.visibility="hidden";
	showpostdetail.style.display="None";
}

function PhotoFilter(){
	this.StartPos				= 0;
	this.CurrPos				= 0;
	this._ImgSrcList		= null;
	this._TimeList			= null;
	this._TitleList			= null;
	this._HrefList			= null;
	this._ObjAdContainer	= null;
	this._ObjText				= null;
	this._Speed					= 1000;
	this.ObjName				= null;
	this.Width					= 0;
	this.Height					= 0;
	this.AdFrame				= null;
	
	this.ArrImg					= new Array();
	this.ArrTime				= new Array();
	this.ArrTitle				= new Array();
	this.ArrLink				= new Array();
	
	this.theTimer				= null;
	
	this.arrAdFilter 		= null;
	
	this.ImgSrcList	= function(strImgSrcList){
		this._ImgSrcList = strImgSrcList;
	}
	
	
	this.Init = function(){
		var ObjTab = document.createElement("table");
		ObjTab.id = 'tabPhotoFilterMain';
		ObjTab.cellSpacing = 1;
		ObjTab.cellPadding = 1;
		ObjTab.border = 0;
		ObjTab.height = 15;
		ObjTab.bgColor = '#ffffff';
		ObjTab.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=100)';
		ObjTab.style.position = 'absolute';
		document.body.appendChild(ObjTab);
		var ObjRow = ObjTab.insertRow(0);
		
		for(var i=0; i<this.arrAdFilter.length; i++){
			this.ArrImg[i]		= this.arrAdFilter[i][0];
			this.ArrTitle[i] = this.arrAdFilter[i][1];
			this.ArrTime[i]	= this.arrAdFilter[i][2];
			this.ArrLink[i]	= this.arrAdFilter[i][3];
		}
		
		for (var i=0; i<this.ArrImg.length; i++){
			var ObjCell = ObjRow.insertCell(i);
			ObjCell.id = 'tdPhotoFilter_' + (i+1);
			ObjCell.width = 13;
			ObjCell.align = 'center';
			ObjCell.valign = 'middle';
			ObjCell.bgColor = '#999999';
			//ObjCell.fontColor = '#FFFFFF';
			ObjCell.style.cursor = 'hand';
			ObjCell.style.fontFamily = 'Arial';
			ObjCell.attachEvent('onclick', ClickPhotoTd);
			ObjCell.innerHTML = '<span style="font-size:7pt;color:#FFFFFF;">' + (i+1) + '</span>';

		}
		var strHTML = '<A id="FlashAdHref" name="FlashAdHref" Href=\'javascript:void(0);\' target=\'_blank\'><img border="0" id=\'imgPhotoFilter\' name=\'imgPhotoFilter\' src=\'\' style="FILTER: revealTrans(duration=2,transition=20)" width="' + this.Width + '" height="' + this.Height + '" style="display:none" />';
    strHTML += '<object id=\'swfPhotoFilter\' name=\'swfPhotoFilter\' style="display:none" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + this.Width + '" height="' + this.Height + '">';
    strHTML += '<param name="movie" value="pixviewer.swf">';
    strHTML += '<param name="quality" value="high">';
    strHTML += '<param name="wmode" value="transparent">';
    strHTML += '<embed src="pixviewer.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + this.Width + '" height="' + this.Height + '"></embed></object>';
    strHTML += '</A>';
    this._ObjAdContainer.innerHTML = strHTML;
		this.SetNagivatePos();
		var len = this.ArrImg.length;
		if (len > 1){
			this.StartPos = parseInt(len * Math.random());
		}
	}
	
	this.CreateImg = function(Doc, intId, strSrc){
		var ObjDiv = Doc.createElement('div');
		ObjDiv.id = 'FlashAdContainer_' + intId;
		var objImg = Doc.createElement("img");
		objImg.id = 'FlashAd_' + intId;
		objImg.src = strSrc;
		objImg.style.filter = 'revealTrans(duration=2,transition=' + Math.floor(Math.random()*28) + ')';
		
		ObjDiv.appendChild(objImg);
		return ObjDiv;
	}
	
	this.CreateFlash = function(Doc, intId, strSrc){
		var ObjDiv = Doc.createElement('div');
		ObjDiv.id = 'FlashAdContainer_' + intId;
		var objImg = Doc.createElement("div");
		objImg.id = 'FlashAd_' + intId;
		strFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + this.Width + '" height="' + this.Height + '">';
		strFlash +=	'<param name="movie" value="' + strSrc + '">';
		strFlash +=	'<param name="quality" value="high">';
		strFlash +=	'<param name="wmode" value="transparent">';
		strFlash +=	'<embed src="' + strSrc + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + this.Width + '" height="' + this.Height + '"></embed></object>';
		objImg.innerHTML = strFlash;
		ObjDiv.appendChild(objImg);
		return ObjDiv;
	}
	
	this.TimeList	= function(strTimeList){
		this._TimeList = strTimeList;
	}
	
	this.TitleList	= function(strTitleList){
		this._TitleList = strTitleList;
	}
	
	this.HrefList	= function(strHrefList){
		this._HrefList = strHrefList;
	}
	
	this.ObjAdContainer	= function(TheAdContaner){
		this._ObjAdContainer = TheAdContaner;
	}
	
	this.SetNagivatePos = function(){
		var ObjClient = GetClientRect(this._ObjAdContainer);
		var ObjTab = document.all.tabPhotoFilterMain;
		ObjTab.style.top = ObjClient.Top+ObjClient.Height-ObjTab.height;
		//ObjTab.style.left = ObjClient.Left+ObjClient.Width-ObjTab.clientWidth+1;
		ObjTab.style.left = ObjClient.Left+ObjClient.Width-ObjTab.clientWidth;
		ObjTab.style.zIndex = 100;
	}
	
	this.ObjText = function(TheText){
		this._ObjText = TheText;
	}
	
	this.Speed = function(intSpeed){
		this._Speed = parseInt(intSpeed);
	}
	
	this.SetFilter = function(Obj){
		if (Obj.tagName.toLowerCase() == 'img'){
			Obj.filters.revealTrans.Transition = Math.floor(Math.random()*28);
			Obj.filters.revealTrans.apply();
		}
	}
	
	this.PlayFilter = function(Obj){
		if (Obj.tagName.toLowerCase() == 'img'){
			Obj.filters.revealTrans.play();
		}
	}
	
	this.NextPhoto = function(){
		this.ProcessFilter();
		if(this.CurrPos < this.ArrImg.length-1){
			this.CurrPos++;
		}
		else {
			this.CurrPos = 0;
		}
	}
	
	this.ProcessFilter = function(){
			var intNP = this.CurrPos + this.StartPos;
			if (intNP >= this.ArrImg.length){
				intNP = intNP - this.ArrImg.length;
			}
			
			for (var i=0; i<this.ArrImg.length; i++){
				var tdObj = eval('document.all.tdPhotoFilter_' + (i+1));
				tdObj.bgColor = '#000000';
			}
			var tdObj = eval('document.all.tdPhotoFilter_' + (this.CurrPos+1));
			tdObj.bgColor = '#0066CC';
			
			var ObjFileName = new CFileName(this.ArrImg[intNP]);
			var ObjAdSwf = document.all.swfPhotoFilter;
			var ObjAdImg = document.all.imgPhotoFilter;
			if (ObjFileName.Extend == 'swf'){
				ObjAdSwf.movie = this.ArrImg[intNP];
				ObjAdSwf.alt = this.ArrTitle[intNP];
				ObjAdImg.style.display = 'none';
				ObjAdSwf.style.display = '';
			} else {
				this.SetFilter(ObjAdImg);
				ObjAdImg.src = this.ArrImg[intNP];
				ObjAdImg.alt = this.ArrTitle[intNP];
				ObjAdSwf.style.display = 'none';
				ObjAdImg.style.display = '';
				this.PlayFilter(ObjAdImg);
			}
			//this._ObjText.innerHTML = '<A Href="' + this.ArrLink[intNP] + '" Target="_blank">' + this.ArrTitle[intNP] + '</A>';
			document.all.FlashAdHref.href = this.ArrLink[intNP];
			this.theTimer = setTimeout(this.ObjName + '.NextPhoto()', this.ArrTime[intNP]);
	}
	
	this.GoToTarget = function(intPos, Obj){
		if (this.theTimer){
			clearTimeout(this.theTimer);
		}
		var ObjTheAd = this._ObjAdContainer.firstChild;
		if (ObjTheAd.tagName){
			if (ObjTheAd.tagName.toLowerCase() == 'img'){
				ObjTheAd.filters.revealTrans.stop();
			}
		}
		this.CurrPos = parseInt(intPos)-1;
		this.NextPhoto();
	}
}

function CFileName(strFileName){
		var arrPath = strFileName.split('\\');
		var strLast = arrPath[arrPath.length - 1];
		var arrFile = strLast.split('.');
		var strName = '';
		for (var i=0; i<arrFile.length - 1; i++)
		{
			if (i > 0)
			{
				strName += '.';
			}
			strName += arrFile[i];
		}
		
		var strExt = '';
		if (arrFile.length > 1)
		{
			strExt = arrFile[arrFile.length - 1];
		}

		return {
			FileName: strName,
			Extend: strExt
		};
}

function ClientBrowser(){
	var ClientInfo = window.clientInformation;
	var Version = ClientInfo.appVersion;
	if (Version.length>3)
	{
		var ClientVer = Version.substring(0,2);
		var intStart = Version.indexOf("(");
		var intEnd = Version.indexOf(")");
		var VerArray;
		if (intStart>-1 && intEnd>-1 && intEnd>intStart){
			var strTemp = Version.substring(intStart, intEnd);
			VerArray = strTemp.split(";");
		}
		if (VerArray.length>=3)
		{
			return{
				Client: ClientVer,
				PlatForm: VerArray[0],
				IEVersion: VerArray[1],
				OSVersion: VerArray[2]
			};
		} else {
			return{
				Client: ClientVer,
				PlatForm: null,
				IEVersion: null,
				OSVersion: null
			};
		}
	} else {
		return{
			Client: ClientVer,
			PlatForm: null,
			IEVersion: null,
			OSVersion: null
		};
	}
}

function GetAppName(strString){
	if (strString.length>4)
	{
		return strString.substring(0, strString.length-4);
	}
	else {
		return null;
	}
}

function GetVersion(strString){
	if (strString.length>4)
	{
		return parseFloat(strString.substring(strString.length-4, strString.length));
	}
	else {
		return 0;
	}
}

function GetClientRect(Obj){
	var ol;
	var ot;
	var ow;
	var oh;
	var strConstEnd = "BODY"
	
	var el = Obj;
	ol = 0;
	ot = 0;
	while(el.tagName.toUpperCase()!="BODY"){
		ot += el.offsetTop+el.clientTop;
		ol += el.offsetLeft+el.clientLeft;
		el=el.offsetParent;
	}
	ow = parseInt(Obj.offsetWidth);
	oh = parseInt(Obj.offsetHeight);
	return{
		Left: ol,
		Top: ot,
		Width: ow,
		Height: oh
	};
}

function DisplayOnlyDivByAttribute(strAttributeName, strAttributeValue, strOnlyDiv){
	var Divs = document.body.getElementsByTagName('DIV');
	for (var intFor=0; intFor<Divs.length; intFor++)
	{
		if (Divs(intFor).getAttribute(strAttributeName)==strAttributeValue)
		{
			if (Divs(intFor).getAttribute('NAME')==strOnlyDiv)
			{
				Divs(intFor).style.visibility = 'visible';
				Divs(intFor).focus();
			}
			else {
				Divs(intFor).style.visibility = 'hidden';
				Divs(intFor).style.top = 0;
				Divs(intFor).style.left = 0;
			}
		}
	}
}

function WindowEventSrcElementByAttribute(strAttributeName, strAttributeValue){
	var boolRet = false;
	if (arguments.length>0)
	{
		var Source = window.event.srcElement;
		var Split = " "
		var Filter = Split;
		var strConstEnd = "BODY"
		for (var intFor=1; intFor<arguments.length; intFor++)
		{
			Filter = Filter+arguments[intFor]+Split;
		}
		while (!boolRet && Source && (Source.tagName.toUpperCase()!="BODY"))
		{
			if (Filter.indexOf(Source.getAttribute(strAttributeName))>-1)
			{
				boolRet = true;
			} else {
				Source = Source.offsetParent;
			}
		}
	}
	return boolRet;
}
function ImportJS(Doc, JsSrc){
	var el = Doc.createElement( "script" );
	el.setAttribute( "type", "text/javascript" );
	el.setAttribute( "src", JsSrc);
	Doc.getElementsByTagName( "head" )[ 0 ].appendChild( el );	
}
var ObjPhotoFilter;
function Document_OnLoad(){
	ObjPhotoFilter = new PhotoFilter();
	ObjPhotoFilter.Width = 523;
	ObjPhotoFilter.Height	= 96;
	var AdFilter	= Array();
AdFilter[0]= new Array("t1/img/ad/flash_ad_01.gif","搜职联盟－创新的职位雷达预警服务","5000","/seeker/manager.do?m=home");
AdFilter[1]= new Array("t1/img/ad/flash_ad_02.gif","搜职联盟－为您预警500多个人才网站","5000","/seeker/vouch/person.html");
AdFilter[2]= new Array("t1/img/ad/flash_ad_03.gif","搜职联盟－职位一个不漏","5000","/seeker/manager.do?m=home");
ObjPhotoFilter.arrAdFilter = AdFilter.sort(function(){return Math.random()>0.5?-1:1;});
ObjPhotoFilter.ObjAdContainer(document.all.tdFlashAdContainer);
//ObjPhotoFilter.ObjText(document.all.divPhotoComment);
ObjPhotoFilter.ObjName = 'ObjPhotoFilter';
ObjPhotoFilter.Init();
ObjPhotoFilter.NextPhoto();
window.onresize = function(){
ObjPhotoFilter.SetNagivatePos();}}
function ClickPhotoTd(){
var ObjSrc = window.event.srcElement;
ObjPhotoFilter.GoToTarget(ObjSrc.innerText, ObjSrc)}



function onloaded(){

	Document_OnLoad();
	
}
function findbycorpname(cname){
var a=encodeURIComponent||escape;
window.open("/sou.do?cname="+a(cname));
}

