<!--
    
    
    //FLASH檔總高度
    var specflash_totalHeight = 555 ; 
    //FLASH檔縮小的高度
    var specflash_normalHeight = 250 ; 
    //FLASH檔寬度
    var specflash_totalWidth = 300 ; 
    //預設的絕對位置高度
    var specflash_thisTop = 103 ;//213 ; 
    
    
    function bigtosmall(  )
    {
        myStr = document.getElementById("specflash").style.height
        if ( myStr.indexOf("px") >= 0 )
        {
            myStr = 'px' ;
        }
        
        document.getElementById('specflash').style.width = specflash_totalWidth + myStr ; //300 + myStr ;
        document.getElementById('specflash').style.height = specflash_normalHeight + myStr ; //250 + myStr ;
        
        document.getElementById('specflash').style.top = specflash_thisTop + ( specflash_totalHeight - specflash_normalHeight ) + myStr ; //213 + 305 + myStr ;

        
        document.getElementById('specflashmainbody').style.marginTop = 0 - ( specflash_totalHeight - specflash_normalHeight ) + myStr ; //-305 + myStr ;
        
    }

    function smalltobig(  )
    {
        myStr = document.getElementById("specflash").style.height
        if ( myStr.indexOf("px") >= 0 )
        {
            myStr = 'px' ;
        }
        
        document.getElementById('specflash').style.width = specflash_totalWidth + myStr ; //300 + myStr ;
        document.getElementById('specflash').style.height = specflash_totalHeight + myStr ; //555 + myStr ;
        
        document.getElementById('specflash').style.top = specflash_thisTop + myStr ; //213 + myStr ;
        
        document.getElementById('specflashmainbody').style.marginTop = 0 + myStr ;
        
    }
    
    
function SuperBar(strTAG, iLoop, iWidth, iHeight)
{
	this.Play = function (oSrc, oWidth, oHeight) 	{

	}

	this.PositionTop = function (objElement)	{

		var p = objElement.offsetTop;

		while (objElement=objElement.offsetParent)
			p += objElement.offsetTop;

		return p;  
	}  

	var rnd;
	var aryLayer = new Array();
	var strIframe = "<iframe src='http://ad.cnyes.com/cnyesAD/showad.asp?TAG=" + strTAG + "' frameborder='no' vspace='0' hspace='0' width='" + iWidth + "' height='" + iHeight + "' marginheight='0' marginwidth='0' scrolling='no'></iframe>";

	if (iLoop >= 1)
	{
		rnd = Math.floor(Math.random() * iLoop);

		aryLayer[0] = "<div align='left' id='SuperBarDiv'>";
		aryLayer[0] += "<iframe frameborder='no' vspace='0' hspace='0' width='" + iWidth + "' height='" + iHeight + "' marginheight='0' marginwidth='0' scrolling='no'></iframe>";
		aryLayer[0] += "</div>";

		for (var i=1; i<iLoop; i++)
			aryLayer[i] = strIframe;

		switch (rnd)
		{
			case 0:

				this.Play = function (oSrc, oWidth, oHeight) 	{

    
					var objElement = document.getElementById("SuperBarDiv");
					
                    var strHTML = "<div style='position:absolute; top:" + (this.PositionTop(objElement) - oHeight + iHeight) + "px; overflow:hidden; width:" + oWidth + "px; height:" + oHeight + "px;' id='specflash'>";
                    strHTML += "<div style='width:300px; height:555px;' id='specflashmainbody'>";

                    strHTML += "<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='" + oWidth + "' height='" + oHeight + "'>";
                    strHTML += "<param name='movie' value='" + oSrc + "'>";
                    strHTML += "<param name='wmode' value='transparent'>";
                    strHTML += "<embed wmode='transparent' src='" + oSrc + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + oWidth + "' height='" + oHeight + "'></embed>";
                    strHTML += "</object>";
                                        
                                        
                    strHTML += "</div>";
                    strHTML += "</div>";

                    objElement.innerHTML = strHTML;
					
					
					
				}

				break;
		}
	}
	else
	{
		rnd = 0;

		aryLayer[0] = strIframe;
	}

	document.writeln(aryLayer[rnd]);
}
//-->
