<?xml version="1.0" encoding="GB2312" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<img src="{Advertisements/Ad[position()=1]/ImageUrl}" id="imgAd" style="cursor:hand;FILTER: revealTrans(Duration=3.0,Transition=1)"/>
<xsl:value-of select="document('')/*/node()[@name='ScriptData']/node()" disable-output-escaping="yes"/>
<script language="JavaScript">
<xsl:apply-templates/>
</script>
</xsl:template>
<xsl:template match="Advertisements">
<xsl:variable name="ads" select="Ad[Disabled = 'false']"/>
<xsl:variable name="ads_count" select="count($ads)"/>
var oAD = new Array(<xsl:value-of select="$ads_count"/>);
var iADCount = <xsl:value-of select="$ads_count"/>
<xsl:for-each select="$ads">
<xsl:if test="Type='image'">
oAD[<xsl:value-of select="position()-1"/>] = new Object();
oAD[<xsl:value-of select="position()-1"/>].Type = "image";
oAD[<xsl:value-of select="position()-1"/>].Image = new Image();
oAD[<xsl:value-of select="position()-1"/>].Image.src = "<xsl:value-of select="ImageUrl"/>"
oAD[<xsl:value-of select="position()-1"/>].onclick = function(){
if('<xsl:value-of select="NavigateUrl"/>' == ''){
return false;
}
<xsl:variable name ="WinHeight" select="WinHeight"/>
<xsl:variable name ="WinWidth" select="WinWidth"/>
<xsl:if test="$WinHeight != '' and $WinWidth != '' ">
window.open('<xsl:value-of select="NavigateUrl"/>','','left=0,top=0,height=<xsl:value-of select="$WinHeight"/>,width=<xsl:value-of select="$WinWidth"/>');
</xsl:if>
<xsl:if test="$WinHeight = '' or $WinWidth = '' ">
window.open('<xsl:value-of select="NavigateUrl"/>');
</xsl:if>
}
</xsl:if>
<xsl:if test="Type='swf'">
oAD[<xsl:value-of select="position()-1"/>] = new Object();
oAD[<xsl:value-of select="position()-1"/>].Type = "swf";
oAD[<xsl:value-of select="position()-1"/>].FileName = "<xsl:value-of select="ImageUrl"/>"
</xsl:if>
</xsl:for-each>
setScrollPic(<xsl:value-of select="Common/TimeLog"/>);
</xsl:template>
<xsl:template name="ScriptData">
<![CDATA[
<script language="JavaScript">
transeffect = 0;
theeffects = new Array(24);
theeffects[0] = "盒状收缩";
theeffects[1] = "盒状向外";
theeffects[2] = "圆形收缩";
theeffects[3] = "圆形向内";
theeffects[4] = "从下向上";
theeffects[5] = "从上向下";
theeffects[6] = "从左向右";
theeffects[7] = "从右向左";
theeffects[8] = "百页窗形向右";
theeffects[9] = "百页窗形向下";
theeffects[10] = "棋盘形交叉向右";
theeffects[11] = "棋盘形交叉向下";
theeffects[12] = "随意溶解形";
theeffects[13] = "左右向内";
theeffects[14] = "左右向外";
theeffects[15] = "上下向内";
theeffects[16] = "上下向外";
theeffects[17] = "条纹状向左下";
theeffects[18] = "条纹状向左上";
theeffects[19] = "条纹状向右下";
theeffects[20] = "条纹状向右上";
theeffects[21] = "溶解水平状";
theeffects[22] = "溶解上下状";
theeffects[23] = "随着溶解";
lastImageNum = 0 ;
function setScrollPic(timelag){
if(oAD.length > 0)
{
if(lastImageNum == iADCount)
{
lastImageNum = 0 ;
}
if(oAD[lastImageNum].Type == "image")
{
DeleteSwf();
document.getElementById("imgAd").style.display = "";
document.getElementById("imgAd").filters.item(0).Apply();
document.getElementById("imgAd").filters.item(0).Transition = transeffect++;
document.getElementById("imgAd").filters.item(0).Play(2.0);
document.getElementById("imgAd").src= oAD[lastImageNum].Image.src;
document.getElementById("imgAd").onclick = oAD[lastImageNum].onclick;
if (transeffect == 24)
{
transeffect = 0;
}
}
else
{
document.getElementById("imgAd").style.display = "none";
CreateSwf(oAD[lastImageNum].FileName);
}
lastImageNum++;
}
window.setTimeout("setScrollPic("+timelag+")",timelag);
}
function DeleteSwf(){
var oSWF = document.getElementById('swfAd');
if(oSWF != null){
document.body.removeChild(oSWF);
}
}
function CreateSwf(strSwfPath){
DeleteSwf();
var oSWF = document.createElement('<embed id="swfAd" src="'+strSwfPath+'" Quality="high" width="274" height="60" Type="application/x-shockwave-flash"></embed>');
document.body.appendChild(oSWF);
}
</script>
]]>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="gb2312"?>
<Advertisements>
<Common>
<TimeLog>180000</TimeLog>
</Common>
<Ad id="1">
<Disabled>false</Disabled>
<Descript>东宇药业晶</Descript>
<ImageUrl>/img/BQQAd/worldcup01.gif</ImageUrl>
<NavigateUrl>/index.aspx</NavigateUrl>
<WinHeight>
</WinHeight>
<WinWidth>
</WinWidth>
<Type>image</Type>
<Title>东宇药业</Title>
<CreateTime>2006-7-14 13:19:13</CreateTime>
</Ad>
<Ad id="-1502415828">
<Disabled>true</Disabled>
<Descript>test</Descript>
<ImageUrl>/img/BQQAd/111.swf</ImageUrl>
<NavigateUrl>
</NavigateUrl>
<CreateTime>2006-7-14 13:18:00</CreateTime>
<WinWidth>
</WinWidth>
<WinHeight>
</WinHeight>
<Type>swf</Type>
</Ad>
</Advertisements>
南来地,北往的,上班的,下岗的,走过路过不要错过!
======================个性签名=====================
之前认为Apple 的iOS 设计的要比 Android 稳定,我错了吗?
下载的许多客户端程序/游戏程序,经常会Crash,是程序写的不好(内存泄漏?刚启动也会吗?)还是iOS本身的不稳定!!!
如果在Android手机中可以简单联接到ddms,就可以查看系统log,很容易看到程序为什么出错,在iPhone中如何得知呢?试试Organizer吧,分析一下Device logs,也许有用.
对于博客园里的网友,不敢称为叫"程序员"的人,你们攻击性太强,看来你们是不会想到我的用意的.园子里有不少人都非常喜欢Jeffrey,是因为它的第一版 框架设计 CLR via C#.
可是从第一版到现在的第三版,没有看到真正底层的东西,内容仅仅是比MSDN文档更丰富一些,可能是我的要求太高了吧.
也就是因为它很多时候会接触到微软开发人员,会经常聊聊某些问题而已,而它又将这些问题反应到书中.也许它就像一个小记者.
它的年龄大我们不多,我的孩子与它小儿子一般大,如果我能向它那样出入微软与它们开发人员长时间交流,不仅仅会牛成它这样.....
可是微软的开发人员不会扔太多时间在它这儿的.所以它会整天追着这个,赶它那个..屁颠个不停吧...
而它的另一版被称为好书的 Windows核心编程,更是没有什么深度可言,仅仅是将windows提供的api,以及内核功能再重申了一遍.
这些书对晋及编程知识是有些贡献的,再说一遍我不是在匾低谁,说说想法而已.