function createslide(con,iwidth,iheight,ipics,ilinks,ititles)
{

	var imgdiv,textdiv,buttondiv,sign;
	var JsStr="";
	var pics,links,titles;
	sign=parseInt(Math.random()*1000,10)+1;
	imgdiv="f_imgDiv"+sign;
	textdiv="f_text"+sign;
	buttondiv="f_buttonDiv"+sign;
	
	JsStr=getcss(textdiv);
 
	JsStr=JsStr+"<div id=\"f_div\" style=\"width:"+ iwidth+"px; height:"+iheight+"px; overflow:hidden; float:left;position:relative;\">";
	pics=ipics.split("|");
	links=ilinks.split("|");
	titles=ititles.split("|");
	

	JsStr=JsStr+"<div id=\""+imgdiv+"\" style=\"width:"+iwidth+"px; height:"+iheight+"px; overflow:hidden;filter:progid:DXImageTransform.Microsoft.Fade(Overlap=1.00);\">";
	for (var i = 0; i < (pics.length); i++) {
		JsStr=JsStr+"<a href=\""+ links[i] +"\" target=\"_blank\"><img src=\""+ pics[i] +"\" height="+ iheight +" width="+ iwidth +" border=\"0\"/><\/a>";
	}

	JsStr=JsStr+"<\/div>";
	
	JsStr=JsStr+"<div id=\"f_infoDiv\">";
		JsStr=JsStr+"<div id=\"f_textbg\" style=\"width:"+iwidth+"px; height:24px; float:left;background:#000; filter:Alpha(Opacity=50);  top:"+(iheight-24)+"px;position:absolute; z-index:2;\"><\/div>";
		JsStr=JsStr+"<div id=\""+ textdiv +"\" style=\" float:left;  text-align:center;     width:"+(iwidth-19*pics.length*0)+"px;height:24px; line-height:24px; overflow:hidden;top:"+(iheight-24)+"px;position:absolute; z-index:3;\">";
		for (var i = 0; i < (pics.length); i++) {
			JsStr=JsStr+"<label><a href=\""+ links[i] +"\" target=\"_blank\" title=\""+ titles[i] +"\" style=\"color:#fff;text-decoration: none;filter:Alpha(Opacity=100);font-size:12px;\"><span >"+ (i+1)+"."+ titles[i] +"<\/span><\/a><\/label>";
		}	
		JsStr=JsStr+"<\/div>";
		JsStr=JsStr+"<\/div>";
		//"+(iwidth-pics.length*24)+"
		JsStr=JsStr+"<div id=\""+buttondiv+"\" style=\"float:right;height:20px;width:"+(19*pics.length)+"px;top:"+(iheight-20)+"px; right:0px; position:absolute; z-index:3;\">";
		for (var i = 0; i < (pics.length); i++) {
			JsStr=JsStr+"<div class=\"bg\" style=\"display:none; width:16px;height:16px; float:left; font-size:14px;    line-height:16px; overflow:hidden;text-decoration:none;\"><a href=\"javascript:void(0)\" class=\"\" focusclass=\"on\" normalclass=\"\" style=\"color:#ffffff;  \">"+(i+1)+"<\/a><\/div>";
		}
		JsStr=JsStr+"<\/div>";
	JsStr=JsStr+"<\/div>";
	//alert(JsStr);
	//return;

	
	//document.writeln(JsStr);
	//if (con){
		con.innerHTML=JsStr;
		var asfawctwae=new PicFocus(imgdiv,textdiv,buttondiv);
		asfawctwae.init();
		asfawctwae.play();
	//}
						
}		

 
 
//////////////////////////////////////////////////////////////////////////////////////
function getcss(textdiv){
var JsStr="";
return "";
JsStr=JsStr+" <style type=\"text\/css\">\n";
JsStr=JsStr+"  .bg{ width:16px; float:left; text-align:center; margin-left:2px;}\n";
JsStr=JsStr+"  .bg a{width:16px;height:16px; float:left; font-size:14px; color:#fff; background:#000; filter:Alpha(Opacity=60); line-height:16px; overflow:hidden;text-decoration:none;}\/* 按钮定义 *\/\n";
JsStr=JsStr+"  .bg a:link, a:visited, a:active{}\/* 初始按钮效果 *\/\n";
JsStr=JsStr+"  .bg a:hover{background:#ff6600; color:#fff; filter:Alpha(Opacity=100);}\/* 初始按钮鼠标经过效果 *\/\n";
JsStr=JsStr+"  .bg a.on:link, a.on:visited, a.on:active, a.on:hover{background:#2b79cb; color:#fff; filter:Alpha(Opacity=100);}\n";
JsStr=JsStr+" #"+textdiv+",#"+textdiv+" a{color:#fff;text-decoration: none;filter:Alpha(Opacity=100);}\n";
JsStr=JsStr+" #"+textdiv+" a:hover{color:#ddd;text-decoration: none;}\n";
JsStr=JsStr+" .atext{font-size:12px;}\n";
JsStr=JsStr+" <\/style>\n";
return JsStr;
}
//////////////////////////////////////////////////////////////////////////////////////

/**
	last modify:2008-01-03 解决图片移至button区域，图片播放下一个的情形
**/
<!--

if(typeof PicFocusManager == "undefined")
	{
		PicFocusManager =[];
	}
//	if(typeof Event != 'undefined'){
//		Event.prototype.__defineGetter__("toElement",function(){   
//		  var node;
//		  alert(this.type)
//		  if(this.type == "mouseout")
//			node = this.relatedTarget;   
//		  else if(this.type == "mouseover")   
//			node = this.target;   
//		  if(!node) return;
//		  while(node.nodeType != 1) node = node.parentNode;   
//		  return node;
//	  });
//	}
	function PicFocus(imageContainerID,textContainerID,buttonContainerID,intervarTime){
		this.$ = function (id){return document.getElementById(id)}
		this.index = PicFocusManager.length;
		PicFocusManager[PicFocusManager.length] = this;
		this.imageContainer = this.$(imageContainerID);
		this.textContainer = this.$(textContainerID);
		this.buttonContainer = this.$(buttonContainerID);
		this.firstShow = 0; //默认显示项
		this.interval = (isNaN(intervarTime)?0:intervarTime) || 5000;
		 //切换时间
		this.canAutoPlay = true; //是否可以自动切换
		this.currentPosition = this.firstShow;
		this.timer;
		this.images = [];
		this.texts = [];
		this.buttons = [];
		this.bindEvent = function(){
			var _self = this;
			for(var i=0;i<this.images.length;i++){
				this.images[i].onmouseover = function(){
					_self.stop();
				}
				this.images[i].onmouseout = function(event){
					var willPlay=true;
					if(!event)event=window.event;
					for(var i=0;i<_self.buttons.length;i++){
						if(typeof event.toElement != 'undefined' && event.toElement == _self.buttons[i]){
							willPlay=false;
						}
						
						if(typeof event.relatedTarget != 'undefined' && event.relatedTarget==_self.buttons[i]){
							willPlay=false;
						}
					}
					if(willPlay)
						_self.play();
				}
			}
			for(var i=0;i<this.buttons.length;i++){
				this.buttons[i].onclick = function(){
					_self.focus(this);
				}
			}
		}
		this.play = function(){
			if(this.canAutoPlay){
				this.setFocus(this.currentPosition ++ )
				if(this.currentPosition >= this.images.length)this.currentPosition =0 ;
				this.timer = setTimeout('PicFocusManager[' + this.index + '].play()' , this.interval )
			}
		}
		this.stop = function(){
			clearTimeout( this.timer );
		}
		this.focus = function(button){
			for(var i=0;i<this.buttons.length;i++){
				if(this.buttons[i] == button){
					this.currentPosition = i;
					this.setFocus(this.currentPosition);
					break;
				}
			}
		}
		this.setFocus = function(i){
			try{
				this.imageContainer.filters[0].apply();
				this.imageContainer.filters[0].play();
			}catch(e){}
			for(var j=0;j<this.images.length;j++){
				this.images[j].style.display = (i==j)?"":"none";
			}
			for(var j=0;j<this.texts.length;j++){
				this.texts[j].style.display = (i==j)?"":"none";
			}
			for(var j=0;j<this.buttons.length;j++){
				this.buttons[j].className = (i==j)? this.buttons[j].getAttribute("focusClass") :this.buttons[j].getAttribute("normalClass");
			}
			try{  //滤镜版本
				new ActiveXObject("DXImageTransform.Microsoft.Fade");
				this.imageContainer.filters[0].play();
			}catch(e){}
		}
		this.init = function(){
			if(this.imageContainer && this.imageContainer && this.imageContainer){
				//init
				this.images=this.imageContainer.getElementsByTagName("img");
				if(this.textContainer) this.texts=this.textContainer.getElementsByTagName("label");
				this.buttons=this.buttonContainer.getElementsByTagName("a");
				this.bindEvent();
				for(var i=0;i<this.images.length;i++){
					this.images[i].style.display = "none";
					if(i<this.texts.length) this.texts[i].style.display = "none";
					this.buttons[i].className = this.buttons[i].getAttribute("normalClass");
				}
				this.images[this.firstShow].style.display = "";
				if(this.firstShow<this.texts.length) this.texts[this.firstShow].style.display = "";
				this.buttons[this.firstShow].className = this.buttons[this.firstShow].getAttribute("focusClass");
			}else{
				alert("未提供正确的参数")
			}
		}
	}
//-->
// alert(bbbb);
//createjs(250,200,"/LadyshUpLoad/2008/06/06/2008y06m06d13h11m11s8437.jpg|/LadyshUpLoad/2008/06/04/2008y06m04d11h31m24s9687.jpg|/LadyshUpLoad/2008/06/04/2008y06m04d11h25m28s8593.jpg|/LadyshUpLoad/2008/06/04/2008y06m04d11h21m17s2343.gif","viewphotograph.aspx?photographid=893|viewphotograph.aspx?photographid=885|viewphotograph.aspx?photographid=883|viewphotograph.aspx?photographid=882|viewphotograph.aspx?photographid=881","大家捐款|我们来捐款|欢乐的使者|市妇联主席张丽丽与灾区儿童共度六一|上海母亲关爱震区孤儿行动");
//alert("aa");
 
