﻿

document.write('<div id="divMenu" style=" background:url(images/ssd.png);z-index:1;top:160px;right:20px;width:82px;position:absolute; height: 216px;">');
document.write('<div id="apDiv2">');
document.write('  <div id="apDixa">');
document.write('    <div id="apDiao">');
document.write('    <div id="apSSD">');
document.write('      <div id="apDasi" style="margin-top:26px;"><a href="http://wpa.qq.com/msgrd?V=1&Uin=75600222&Site=www.cmyprint.com&Menu=yes target=_blank title=客服" target="_blank"><img src="images/QQ.gif" width="25" height="29"/></a></div>');
document.write('      <div id="apDsdh"><a href="http://wpa.qq.com/msgrd?V=1&Uin=75600222&Site=www.cmyprint.com&Menu=yes target=_blank title=客服" target="_blank">CMY001</a></div>');
document.write('      </div>');
document.write('      <div id="apSSD">');
document.write('      <div id="apDasi" style="margin-top:6px;"><a href="http://wpa.qq.com/msgrd?V=1&Uin=75600222&Site=www.cmyprint.com&Menu=yes target=_blank title=客服" target="_blank"><img src="images/QQ.gif" width="25" height="29"/></a></div>');
document.write('      <div id="apDsdh"><a href="http://wpa.qq.com/msgrd?V=1&Uin=75600222&Site=www.cmyprint.com&Menu=yes target=_blank title=客服" target="_blank">CMY002</a></div>');
document.write('      </div>');
document.write('      <div class="apSasj">');
document.write('      <div id="apSSD">');
document.write('      <div id="apDasi" style="margin-top:40px;"><a href="http://wpa.qq.com/msgrd?V=1&Uin=958625373&Site=www.cmyprint.com&Menu=yes target=_blank title=技术" target="_blank"><img src="images/QQ.gif" width="25" height="29"/></a></div>');
document.write('      <div id="apDsdh"><a href="http://wpa.qq.com/msgrd?V=1&Uin=958625373&Site=www.cmyprint.com&Menu=yes target=_blank title=技术" target="_blank">CMY003</a></div>');
document.write('      </div>');
document.write('      </div>');
document.write('    </div>');
document.write('  </div>');
document.write('</div>');
document.write('</div>');




var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
      var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

      if ( bNetscape4plus ) {
              yMenuFrom   = document["divMenu"].top;
              yMenuTo     = top.pageYOffset + 295;
      }
      else if ( bExplorer4plus ) {
              yMenuFrom   = parseInt (divMenu.style.top, 10);
              yMenuTo     = document.documentElement.scrollTop + 160; //距页面顶部的距离
      }

      timeoutNextCheck = 500;

      if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
              setTimeout ("CheckUIElements()", timeoutNextCheck);
              return;
      }

      if ( yButtonFrom != yButtonTo ) {
              yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
              if ( yButtonTo < yButtonFrom )
                      yOffset = -yOffset;

              if ( bNetscape4plus )
                      document["divLinkButton"].top += yOffset;
              else if ( bExplorer4plus )
                      divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

              timeoutNextCheck = 10;
      }
      if ( yMenuFrom != yMenuTo ) {
              yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
              if ( yMenuTo < yMenuFrom )
                      yOffset = -yOffset;

              if ( bNetscape4plus )
                      document["divMenu"].top += yOffset;
              else if ( bExplorer4plus )
                      divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

              timeoutNextCheck = 10;
      }

      setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad()
{
      var y;
      if ( top.frames.length )
      if ( bNetscape4plus ) {
              document["divMenu"].top = top.pageYOffset + 135;
              document["divMenu"].visibility = "visible";
      }
      else if ( bExplorer4plus ) {
              divMenu.style.top = document.documentElement.scrollTop + 235;
              divMenu.style.visibility = "visible";
      }
      CheckUIElements();
      return true;
}
OnLoad();