function showDate()
{
	var d = new Date();
	document.write(d.getYear()+"年"+(d.getMonth()+1)+"月"+d.getDate()+"日");
	switch(d.getDay())
	{
		 case 0:
		  document.write("  星期日");
		  break;
		 case 1:
		  document.write("  星期一");
		  break;
		 case 2:
		  document.write("  星期二");
		  break;
		 case 3:
		  document.write("  星期三");
		  break;
		 case 4:
		  document.write("  星期四");
		  break;
		 case 5:
		  document.write("  星期五");
		  break;
		 case 6:
		  document.write("  星期六");
		  break;
	}
}
function showImage(imageStr,width,height){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="'+height+'" width="'+width+'">');
	document.write('<param name="allowScriptAccess" value="sameDomain">');
	document.write('<param name="movie" value="./images/pixviewer.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="bgcolor" value="#6EB9E1">');
	document.write('<param name="menu" value="false">');
	document.write('<param name="wmode" value="opaque">');
	document.write('<param name="FlashVars" value="'+imageStr+'&amp;borderwidth='+width+'&amp;borderheight='+height+'&amp;textheight=0">');
	document.write('<embed src="./images/pixviewer.swf" wmode="opaque" flashvars="'+imageStr+'&amp;borderwidth=176&amp;borderheight=146&amp;textheight=0" menu="false" bgcolor="#DADADA" quality="high" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" height="'+height+'" width="'+width+'">');
	document.write('</object>');
}

var imgUrl   = new Array();
var imgLink  = new Array();
var strSplit = new Array();
var picNum   = new Array();

function NextPic(str,objId){
	
    if(picNum[objId]==null) picNum[objId]=0;

	strSplit[objId] = str.split(";");

    imgUrl[objId] = new Array();
	imgLink[objId]= new Array();
	
	
	for(i=0;i<strSplit[objId].length;i++)
	{
		var imgInfo = strSplit[objId][i].split(",");		
		imgUrl[objId][i]  = imgInfo[0];
		imgLink[objId][i]  = imgInfo[1];
	}

	if(picNum[objId]>=strSplit[objId].length)
    {
     	picNum[objId]=0;
     }
	 
    if (document.all){
		alert($("#"+objId)[0].parentNode.parentNode.parentNode.getElementsByTagName("td").length);
		var td=$("#"+objId)[0].parentNode.parentNode.parentNode.getElementsByTagName("td")[0];
		td.filters.revealTrans.Transition=Math.floor(Math.random()*23);
		td.filters.revealTrans.apply();
		td.filters.revealTrans.play();
        //$("#"+objId)[0].filters.revealTrans.Transition=Math.floor(Math.random()*23);
        //$("#"+objId)[0].filters.revealTrans.apply();
        //$("#"+objId)[0].filters.revealTrans.play();
    }
    $("#"+objId)[0].src=imgUrl[objId][picNum[objId]];

    //focustext.innerHTML='<a href="/blog/+imgLink[picNum]+" target=_blank>'+imgText[picNum]+'</a>';
    //设置翻页时间
	if(picNum[objId]<strSplit[objId].length)
    {
     	picNum[objId]++ ;
     }

    theTimer=setTimeout("NextPic('"+str+"','"+objId+"')", 4000);
}

/*function goUrl(objId){
//alert(picNum[objId]-1);
   $(document)[0].location = imgLink[objId][picNum[objId]-1];
}*/
