function startFixed(){
    fixedLAYER('Layer1','leftTop',155,100)
    fixedLAYER('Layer2','leftTop',311,100)
    fixedLAYER('Layer3','leftTop',623,100)
}
  var ie= !!document.all
  var n4= !!document.layers
  var w3c=!!document.getElementById
  var mac45 
    = navigator.userAgent.indexOf('MSIE 4.5; Mac_PowerPC')
  if(document.layers)window.onresize=resizeFunc
  function resizeFunc(e){location.reload()}
  var tid=new Array()
  function fixedLAYER(layName,posString,offSetX,offSetY){
    offSetX = parseInt(offSetX,10)
    offSetY = parseInt(offSetY,10)
    if( posString == 'rightTop' ){
     
      if(ie) offLeft = document.body.clientWidth   + offSetX
      else   offLeft = window.innerWidth           + offSetX
      if(ie) offTop  =                               offSetY
      else   offTop  =                               offSetY
    }
    else if( posString == 'rightBottom' ){
      if(ie) offLeft = document.body.clientWidth   + offSetX
      else   offLeft = window.innerWidth           + offSetX
      if(ie) offTop  = document.body.clientHeight  + offSetY
      else   offTop  = window.innerHeight          + offSetY
    }
    else if( posString == 'leftBottom' ){
      if(ie) offLeft =                               offSetX
      else   offLeft =                               offSetX
      if(ie) offTop  = document.body.clientHeight  + offSetY
      else   offTop  = window.innerHeight          + offSetY
    }
    else if( posString == 'center' ){
      if(ie) offLeft = document.body.clientWidth/2 + offSetX
      else   offLeft = window.innerWidth/2         + offSetX
      if(ie) offTop  = document.body.clientHeight/2+ offSetY
      else   offTop  = window.innerHeight/2        + offSetY
    }
    else {
      if(ie) offLeft =                               offSetX
      else   offLeft =                               offSetX
      if(ie) offTop  =                               offSetY
      else   offTop  =                               offSetY
    }
    offLeft = parseInt(offLeft)
    offTop  = parseInt(offTop)

    if(document.all){
			if(getWindowWidth()<780){
				var mx = offLeft;
			}else{
				var mx = getWindowWidth() / 2 - 390 + offLeft;
			}
			var my = offTop;
    }
	
    moveLAYER(layName,mx,my)
    //WinIE以外 opera n4用
    if(!(ie&&!mac45) || opr){
      clearTimeout(fixedLAYER[layName])
      fixedLAYER[layName]=setTimeout("fixedLAYER('"+layName+"','"+posString
                   +"','" +offSetX+"','"+offSetY+"')",100)
    }
  }

function getDivLeft(div){
  if(typeof window.crypto!="undefined" &&
     typeof window.getComputedStyle!="undefined"){ // Mozilla
    return parseInt(div.style.left);
  }
  else // IE, (Mozilla), Opera, NN4
   return document.layers?div.left:(div.offsetLeft||div.style.pixelLeft||0);
}

  function moveLAYER(layName,x,y){
      
      if(document.getElementById){         //Moz,NN6,IE5用
        document.getElementById(layName).style.left=x;
        document.getElementById(layName).style.top=y;
      }
      else if(document.all){
        document.all(layName).style.pixelLeft=x;    //IE4用
        document.all(layName).style.pixelTop=y;
      }
      else if(document.layers)
        document.layers[layName].moveTo(x,y);
                                                   //NN4用
  }

function getWindowWidth(){
  if(window.innerWidth) return window.innerWidth; // Mozilla, Opera, NN4
  else if(document.documentElement && document.documentElement.clientWidth){ // 以下 IE
   return document.documentElement.clientWidth;
  }
  else if(document.body && document.body.clientWidth){
   return document.body.clientWidth;
  }
  return 0;
}
  
  function iniFunc(){
    if(ie&&!(mac45!=-1))window.onscroll = startFixed
    startFixed()
  }
