function flow(srcDoc,objPiao,fileName,URL,position,type,title,content,stylewidth,styleheight,imgDesc){
	//<!-- Begin
	 
	 if(srcDoc==null){
	 	
	   	this.doc=document;
	
	 	}else{
	     this.doc=srcDoc;
	 		
		}
    
   this.objectPiao;
  
	 this.xPos = 20;	
	
	 this.yPos = this.doc.body.clientHeight;	 
	
	 this.step = 1;
	 this.delay = 30; 
	 this.height = 0;
	 this.Hoffset = 0;
	 this.Woffset = 0;
	 this.yon = 0;
	 this.xon = 0;
	 this.pause = true;
	 this.interval;
 
	this.changePos = function() {
    
		var width = this.doc.body.clientWidth;
	
		var height = this.doc.body.clientHeight;
	
		var Hoffset = this.objectPiao.offsetHeight;
	
		var Woffset = this.objectPiao.offsetWidth;
	 
		
	
		this.objectPiao.style.left = this.xPos + this.doc.body.scrollLeft;
		this.objectPiao.style.top = this.yPos + this.doc.body.scrollTop;
		
	

		if (this.yon) {
		  this.yPos = this.yPos + this.step;
		}
		else {
		  this.yPos = this.yPos - this.step;
		}
		
		
		if (this.yPos < 0) {
		  this.yon = 1;
		  this.yPos = 0;
		}
	
		
		if (this.yPos >= (height - Hoffset)) {
		  this.yon = 0;
		  this.yPos = (height - Hoffset);
		}
		
		if (this.xon) {
		  this.xPos = this.xPos + this.step;
		}
		else {
		  this.xPos = this.xPos - this.step;
		}
		if (this.xPos < 0) {
		  this.xon = 1;
		  this.xPos = 0;
		}
		if (this.xPos >= (width - Woffset)) {
		  this.xon = 0;
		  this.xPos = (width - Woffset);
		}

	}
	
	this.draw = function(){
		document.write("<div id=" + objPiao + " style='POSITION: absolute; HEIGHT: " + styleheight + "px; width: " + stylewidth + "px; left:" +  position + "px;'>");//HEIGHT: 200px; width: 102px;
    
	  if(type=="1"){//pic
	  	 if(URL!=""&&URL!=null){ 
	  	 	  //alert("rul = " + URL);
	  	    document.write("<a href='" + URL + "' target='_blank' title='open in new window' ><img src=" + fileName + " alt='" + imgDesc + "' width='" + stylewidth +"px' height='" + styleheight + "px' border='0'></a></div>");//width='118px' height='108px'
	  	  }
	  	  else{
	  	  	document.write("<img src=" + fileName + " alt='" + imgDesc+ "' width=' " + stylewidth+"px' height='" + styleheight + "px' border='0'></div>");
	  	  
	  	  }
    
	  }
	  else if(type=="2"){//Flash
	  	
	  	  if(URL!=""&&URL!=null){ 
	  	    document.write("<a href ='" + URL  + "' target='_blank' title='open in new window' >  \r\n" +
								"<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' >  \r\n "
								 + " <param name='movie' value='" + fileName + "'>   \r\n  <param name='quality' value='high'>  \r\n "
								 + " <embed src='" +  fileName
									+  "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' > object\r\n</embed> \r\n"
								+ " </object>  \r\n" + "</a></div>");
	  	  }
	  	  else{
	  	  	 document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' >  \r\n "
								 + " <param name='movie' value='" + fileName + "'>   \r\n  <param name='quality' value='high'>  \r\n "
								 + " <embed src='" +  fileName
									+  "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' > object \r\n</embed> \r\n"
								+ " </object>  \r\n" + "</div>");
	  	  }
	  	
	  }
	  else if(type=="3"){//text
	  	  if(URL!=""&&URL!=null){ 
	  	    document.write("<a href=" + URL + " target='_blank' title='open in new window' >" + content + "</a></div>");
	  	  }
	  	  else{
	  	  	document.write(content + "</div>");
	  	  }
	  }
		document.close();
    this.objectPiao=this.doc.getElementById(objPiao);
    this.objectPiao.style.top = this.yPos;		 
	  this.objectPiao.visibility = "visible";
	  

	}
	
	
//  End -->
}

