﻿document.write("<div id='advpiao3' style='Z-INDEX:100; LEFT:2px; WIDTH:130px; POSITION:absolute; TOP:43px; HEIGHT:130px; visibility: visible;' onmouseover='pause_resume();' onmouseout='pause_resume();'>");
document.write("<a onclick=\"javascript:window.open('../qt/birthday.htm','','height=420,width=450,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no,top=100,left=300')\" target='_blank'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='120' height='110'><param name='movie' value='../img/birthday.swf' /><param name='quality' value='high' /><param name='wmode' value='transparent'><embed src='../img/birthday.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='120' height='110'></embed></object></a>");
document.write("<div onclick=\"turnit('advpiao3');\" style='cursor:pointer;float:right' align='right'></div></div>");

var xPos = 800;
var yPos = 800; 
var step = 1;
var delay = 150; 
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
$('advpiao3').style.top = yPos+"px";
function changePos() 
{
	width = document.documentElement.clientWidth;
	height = document.documentElement.clientHeight;
	Hoffset = $('advpiao3').offsetHeight;
	Woffset = $('advpiao3').offsetWidth;
$('advpiao3').style.left = xPos + document.documentElement.scrollLeft+"px";
$('advpiao3').style.top = yPos + document.documentElement.scrollTop+"px";
	if (yon) 
		{yPos = yPos + step;}
	else 
		{yPos = yPos - step;}
	if (yPos < 0) 
		{yon = 1;yPos = 0;}
	if (yPos >= (height - Hoffset)) 
		{yon = 0;yPos = (height - Hoffset);}
	if (xon) 
		{xPos = xPos + step;}
	else 
		{xPos = xPos - step;}
	if (xPos < 0) 
		{xon = 1;xPos = 0;}
	if (xPos >= (width - Woffset)) 
		{xon = 0;xPos = (width - Woffset);   }
	}
	
	function $(obj)
{
    return document.getElementById(obj);
}
function ShowMore(obj,val)
{
    if(val==1)
        $(obj).style.visibility='visible';
    else
        $(obj).style.visibility='hidden';
}
function turnit(obj)   //紧缩表格
{$(obj).style.display="none";}
	
	function start()
	 {
	 $('advpiao3').visibility = "visible";
		interval = setInterval('changePos()', delay);
	}
	function pause_resume() 
	{
		if(pause) 
		{
			clearInterval(interval);
			pause = false;}
		else 
		{
			interval = setInterval('changePos()',delay);
			pause = true; 
			}
		}
	start();