
/*
	简历查看移动选择栏
	2006-11-24
*/
/*
function change_bg(num)
{
	 var GetLeftId = document.getElementById("nav_left_"+num);
	 var GetRightId = document.getElementById("nav_right_"+num);
	 GetLeftId.className = 'hover_left';
	 GetRightId.className = 'hover_right';
}
function return_bg(num)
{
	 var GetLeftId = document.getElementById("nav_left_"+num);
	 var GetRightId = document.getElementById("nav_right_"+num);
	 GetLeftId.className = 'ModuleHeaderLeft';
	 GetRightId.className = 'ModuleHeaderRight';
}
//显示或隐藏模块
function Show(strId)
{
	var objElement;
	
	objElement = document.getElementById(strId);
	
	if(objElement.style.display == 'none'){
	  objElement.style.display = 'block';
	  var isOpen=true;
	} else {
	  objElement.style.display = 'none';
	  var isOpen=false;
	}
	return isOpen;
}
//显示或隐藏模块并设置相应的交换图片
function showBlod(blodID,swapObj,openImg,closeImg,opClass,closeClass)
{
	var isOpen=Show(blodID);
	if(isOpen)
	{
		if(openImg!=""){
	    	swapObj.src=openImg;
		} else {
			swapObj.className=opClass;
		}
	} 
	else 
	{
		if(closeImg!="")
		{
	   		swapObj.src=closeImg;
		} 
		else 
		{
			swapObj.className=closeClass
		}
	}
}

//重新计算并设置树开关按钮的位置
function resetOpenLeftTreeDiv()
{
     var btn_h=50;
	 var scroll_h=document.documentElement.scrollTop;
	 var screen_h=document.documentElement.clientHeight;
	 var content_y=content.offsetTop+30
	 var content_h=content.offsetHeight;
	 if((screen_h+scroll_h)>content_h)
	 {
	 	screen_h=content_h-scroll_h;
	 }
	 if(content_h>screen_h)
	 {
	      var h2=screen_h;
	 } 
	 else 
	 {
	      var h2=content_h;
	 }
	 var step=content_y-scroll_h;
	 var h=scroll_h+h2/2-btn_h/2;
	 if(step>0)
	 {
	 	h+=step/2;
	 }
	 if(h>(content_y+content_h-btn_h))
	 {
	     h=content_y+content_h-btn_h;
	 }
	 if(h<content_y)
	 {
	     h=content_y;
	 }
	 openLeftTreeBtn.style.top=h;
}*/
//
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){
   document.MM_sr[j++]=x; 
   if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
   }
}
//将悬浮层的位置定位在屏幕中央
/*function GetCenterXY_ForLayer(objdiv)
{
	 var x=document.documentElement.scrollTop;
	 var y=document.documentElement.clientHeight;
	
	//获取屏幕宽度
	availWidth = parseInt(window.screen.availWidth);
	availHeight = parseInt(window.screen.availHeight);
	
	tblWidth = parseInt(objdiv.width);
		
	y = y + availHeight/4;
	x = (availWidth - tblWidth)/2;
	
	objdiv.style.top = y;
	objdiv.style.left = x;
}

//将悬浮层的位置定位在屏幕中央
function GetCenterXY_ForLayer(objdiv)
{
	 var y=document.documentElement.scrollTop;
	 var h=document.documentElement.clientHeight;
	
	//获取页面宽度
	availWidth = document.documentElement.scrollWidth;
	availHeight = document.documentElement.scrollHeight;
	
	tblWidth = parseInt(objdiv.width);
	tblHeight=objdiv.offsetHeight;
	
	y = y + (h-tblHeight)/2;
	x = (availWidth - tblWidth)/2;
	
	document.all.Layer2Frame.style.display="block"
	document.all.Layer2Frame.style.top=y
	document.all.Layer2Frame.style.left=x
	document.all.Layer2Frame.width=tblWidth
	document.all.Layer2Frame.height=tblHeight
	
	
	objdiv.style.top = y;
	objdiv.style.left = x;
	objdiv.style. visibility="visible"
}*/


var currentDisplayTab="tabId_1";
var currentDisplayResume="resumeId_1";
var endTab="tabId_10";
var moveTabInterval;
function moveTab(director, endTabVal)
{
    endTab = endTabVal;    
	clearInterval(moveTabInterval);
	
	var tabWidth=document.all[endTab].offsetLeft+document.all[endTab].offsetWidth;
	
	var limitWidth=document.all.more_tab_id.offsetWidth;
	var minMargin=limitWidth-tabWidth
	var step=100;
	var padding_left=document.all.fadetab_id.style.marginLeft;
	
	padding_left=padding_left.split("px")[0];
	
	if(padding_left=="")
	{
	  padding_left=0;
	} 
	else 
	{
	  padding_left=Number(padding_left);
	}
	var padding_left=padding_left+step*director;
	
	if(padding_left>0)
	{
		padding_left=0
	} 
	else if(padding_left<minMargin)
	{
		padding_left=minMargin;
	}
	moveTabInterval=window.setInterval('moveTabTo('+padding_left+')',50);
	//document.all.fadetab_id.style.marginLeft=padding_left;
}
function moveTabTo(padding_left)
{
	var tempPadding_left=document.all.fadetab_id.style.marginLeft
	tempPadding_left=Number(tempPadding_left.split("px")[0]);
	var dPadding_left=(padding_left+tempPadding_left)/2;
	document.all.fadetab_id.style.marginLeft=dPadding_left;
	if(Math.abs(dPadding_left-padding_left)<1)
	{
		document.all.fadetab_id.style.marginLeft=padding_left;
		clearInterval(moveTabInterval);
	}
}
function moveTabToEnd()
{
	clearInterval(moveTabInterval);
	var tabWidth=document.all[endTab].offsetLeft+document.all[endTab].offsetWidth;
	var limitWidth=document.all.more_tab_id.offsetWidth;
	var minMargin=limitWidth-tabWidth;
	padding_left=minMargin;
	moveTabInterval=window.setInterval('moveTabTo('+padding_left+')',50);
	//document.all.fadetab_id.style.marginLeft=minMargin;
}
function moveTabToHead(){
	clearInterval(moveTabInterval);
	//document.all.fadetab_id.style.marginLeft=0
	padding_left=0;
	moveTabInterval=window.setInterval('moveTabTo('+padding_left+')',50);
}
function showCurrentResume(resume_id,tab_id,current_class,old_class){

    if(document.all[currentDisplayTab]!=null)
    {
	    document.all[currentDisplayTab].className=old_class;
	}
	currentDisplayTab=tab_id
	document.all[currentDisplayTab].className=current_class;
	document.all[currentDisplayResume].style.display="none";
	currentDisplayResume=resume_id
	document.all[currentDisplayResume].style.display="block";
}
function initCurrentResume(){
	document.all[currentDisplayTab].className="viewCModuleHeader";
	document.all[currentDisplayResume].style.display="block";
}
/*function showCurrentSocity(current_id,old_id,currentTab_id,oldTab_id,current_class,old_class){
	document.all[current_id].className=current_class;
	document.all[old_id].className=old_class;
	document.all[currentTab_id].style.display="block";
	document.all[oldTab_id].style.display="none";
}*/
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
//将悬浮层的位置定位在屏幕中央
/*function openLayer(objdiv)
{
	 var y=document.documentElement.scrollTop;
	 var h=document.documentElement.clientHeight;
	
	//获取页面宽度
	availWidth = document.documentElement.scrollWidth;
	availHeight = document.documentElement.scrollHeight;
	
	tblWidth = parseInt(objdiv.width);
	tblHeight=objdiv.offsetHeight;
	
	y = y + (h-tblHeight)/2;
	x = (availWidth - tblWidth)/2;
	
	document.all.commandLayerFrame.style.display="block"
	document.all.commandLayerFrame.style.top=y
	document.all.commandLayerFrame.style.left=x
	document.all.commandLayerFrame.width=tblWidth
	document.all.commandLayerFrame.height=tblHeight
	
	
	objdiv.style.top = y;
	objdiv.style.left = x;
	objdiv.style.visibility="visible"
}
//关闭悬浮层
function closeLayer(objdiv)
{
	//alert("88888");
	var obj=document.getElementById(objdiv)
	obj.style.visibility="hidden";
	document.all.commandLayerFrame.style.display="none"
}
//改变BUTTON的背景
function changeButtonBkg(btnID,btnClass)
{
	btnID.className=btnClass;
}
//浮动层
var oc =true;
function layerOut(objdiv,x1,x2,imgID,pic1,pic2){
        var obj=document.getElementById(objdiv);
	var imgObj=document.getElementById(imgID);
	if(oc){
		obj.style.right=x2;
		imgObj.src=pic2;
		oc=false;
	} else {
		obj.style.right=x1;
		imgObj.src=pic1;
		oc=true;
	}
	return oc;
}
function layerT(obj,flag){
   myObj=obj;
   myFlag=flag;
   fadeStep1=8;
   fadeStep2=3;
   var alpha=obj.filters.alpha.opacity;
    if(!oc){
		if(flag){
			if(alpha<100){
			   obj.filters.alpha.opacity+=fadeStep1;
			   setTimeout('layerT(myObj,myFlag)','100');
			}
		 }else {
			 if(alpha>50){
			   obj.filters.alpha.opacity-=fadeStep2;
			   setTimeout('layerT(myObj,myFlag)','100');
			 }
		}
	}
}
function layerPositon(){
	 var obj=document.all.float_id
	 var scroll_h=document.documentElement.scrollTop;
	 obj.style.top=scroll_h+60;
}


//渐显效果
var moveSpeed=4;
var isMove=false;
var isFirst=true;
var maxh;
function menuShow(obj)
{
  isMove=true;
  if(obj.style.pixelHeight<maxh)
  {
    var step1=Math.ceil(maxh/moveSpeed);
    var step2=Math.ceil(100/moveSpeed);
    obj.style.pixelHeight+=step1;
    if(obj.style.pixelHeight>maxh){
	    obj.style.pixelHeight=maxh;
    }
    obj.filters.alpha.opacity+=step2;
    if(obj.style.pixelHeight==step1)
      obj.style.display='block';
      myObj=obj;
   setTimeout('menuShow(myObj)','5');
  } else {
    isMove=false;
  }
}
function menuHide(obj)
{
  isMove=true;
  if(obj.style.pixelHeight>0)
  {
    var step1=Math.ceil(maxh/moveSpeed);
    var step2=Math.ceil(100/moveSpeed);
    obj.style.pixelHeight-=step1;
    if(obj.style.pixelHeight<=0){
	    obj.style.pixelHeight=0;
	    obj.style.display='none';
    }
    obj.filters.alpha.opacity-=step2;
    myObj=obj;
    setTimeout('menuHide(myObj)','5');
  } else {
    isMove=false;
  }
}
function menuChange(obj,swap_obj,open_class,colse_class)
{
if(isFirst){
	maxh=obj.offsetHeight;
	obj.style.pixelHeight=maxh;
	isFirst=false;
}
if(isMove){
     return;
}
if(obj.style.pixelHeight)
  {
    swap_obj.className=colse_class;
	menuHide(obj);
  }
  else
  {
      swap_obj.className=open_class;
	  menuShow(obj);
  }
}

//显示或隐藏tip
function ShowTip(strId,local,frmID)
{
	var objElement;
	
	objElement = document.getElementById(strId);
	
	if(objElement.style.display == 'none'){
	  objElement.style.display = 'block';
	  objElement.style.right = local;
	  var isOpen=true;
	} else {
	  objElement.style.display = 'none';
	  var isOpen=false;
	}
    //alert("frmID="+frmID)
    if(frmID!="" && frmID!=undefined){
        if(isOpen){
            ShowIframe(strId,frmID)
        } else {
            HindIframe(frmID)
        }
    }
	return isOpen;
}
//
function ShowIframe(upObjID,frmID){
    //alert("upObjID="+upObjID)
    var upObj=document.getElementById(upObjID);
    var frmObj=document.getElementById(frmID);
    var upObj_w = upObj.offsetWidth;
	var upObj_h=upObj.offsetHeight;
	//alert("upObj_h="+upObj_h)
	//alert("upObj_w="+upObj_w)
	//alert("frmObj.style.width="+frmObj.style.width)
	//alert("frmObj.style.height="+frmObj.style.height)
	frmObj.style.display="block";
	frmObj.style.width=upObj_w;
	frmObj.style.height=upObj_h;
	//alert("frmObj.style.width="+frmObj.style.width)
	//alert("frmObj.style.height="+frmObj.style.height)
	frmObj.style.top=upObj.style.top;
	frmObj.style.left=upObj.style.left;
}
function HindIframe(frmID){
     var frmObj=document.getElementById(frmID);
     frmObj.style.display="none";
}*/
