	var panelIndex = 1 ;
														
	var size  = 5 ;
	setInterval ( "slideShow()", 5000 );
	
	function slideShow()
	{
	  if( panelIndex >= size ){
		  panelIndex = 0 ;	
	  }
	  
	  if( size-1 >= panelIndex ){														  														  
		  hideAllSlidePanel(null);	
		  showDivEffect1("rpSlide:"+panelIndex+":panel");
	  }
	  panelIndex++ ;
	}
	
	function hideAllSlidePanel( index ){
		for( var i=0 ; 10 > i ; i++ ){
			 var panel = document.getElementById( "rpSlide:"+i+":panel") ;
			 if( panel != null ) hideDiv("rpSlide:"+i+":panel");
		}
	}
	
	function showDivEffect1( divId ) {
		return Richfaces.processEffect(Object.extend(Object.extend( Object.extend({type:'Appear'},{targetId:divId,attachId:divId}), Object.extend ({},{})), '{duration:1.0,from:1.0,to:0.3}'||{})); 
	};
	
	function showDivEffect( divId , index ) {
		panelIndex = index+1 ;
		return Richfaces.processEffect(Object.extend(Object.extend( Object.extend({type:'Appear'},{targetId:divId,attachId:divId}), Object.extend ({},{})), '{duration:1.0,from:1.0,to:0.3}'||{})); 
	};
// detect Browser
function detectBrowser(){
 
	if(navigator.appName == "WebTV")
	{
	   return "WebTV" ; 
	}
	
	if(navigator.appName == "Netscape")
	{
	   return "NETSCAPE" ;
	}
	
	if(navigator.appName == "Microsoft Internet Explorer")
	{
	   return "IE" ;
	}
}

// get real X position
function findPosX( idElement ){

    var obj = document.getElementById( idElement ) ;  
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
}

// get real Y position
function findPosY( idElement ){
  
    var obj = document.getElementById( idElement ) ;
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
}


function showPic( imgName, imgCaption, imgWidth, imgHeight, textColor, bgColor ) {
	if(imgWidth<=100)imgWidth=100
	if(imgHeight<=100)imgHeight=100
	winHeight=imgHeight+25;
	w = window.open('','Title','toolbar=no,location=no,directories=no,top=100,left=100,status=no,scrollbars=yes,resizable=no,copyhistory=no,width='+imgWidth+',height='+winHeight+'');
	w.document.write( "<html><head><title>"+imgCaption+"</title>" );
	w.document.write( "<STYLE TYPE='text/css'>" );
	w.document.write( "A {font-family: verdana; font-size: 10px; color: "+textColor+"; text-decoration : none;}" );
	w.document.write( "A:Visited {font-family: verdana;font-size: 10px; color: "+textColor+"; }" );
	w.document.write( "A:Active { font-family: verdana; font-size: 10px; color: "+textColor+"; }" );
	w.document.write( "A:Hover { font-family: verdana; font-size: 10px; color: "+textColor+"; }" );
	w.document.write( "IMG {border-color : "+textColor+";}" );
	w.document.write( "BODY { font-family: verdana; font-size : 10px; font-weight: normal; color : "+textColor+"; background-color : "+bgColor+"; }" );
	w.document.write( "</STYLE>" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true\n");
	w.document.write( "else if(document.layers)NN4=true\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( " if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31+25+40)\n");
	w.document.write( " else if(NN6) self.sizeToContent()\n");
	w.document.write( " else top.window.resizeTo(document.images[0].width,document.images[0].height+20)\n");
	w.document.write( " self.focus()\n");
	w.document.write( "}\n</scr");
	w.document.write( "ipt>\n");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad=" );
	w.document.write( "'javascript:autoSize();'>" );
	w.document.write( "<table cellpadding=0 cellspacing=0 border=0><tr><td colspan=3><div align='center'><img src='"+imgName+"' border=0 alt='"+imgCaption+"'></td></div></tr>" );
	w.document.write( "<tr><td align='center'>&nbsp;&nbsp;<a>yahoo.com</a></td></tr>" );
	w.document.write( "</table><br></body></html>" );
	w.document.close();
}



// hide div tag
function hideDiv(divId) {
	var elem = document.getElementById(divId);
	elem.style.display = 'none';
}

function showDiv(divId) {
	var elem = document.getElementById(divId);
	elem.style.display = '';
}

function displayDiv(divId) {
	var elem = document.getElementById(divId);
	elem.style.display = '';
}

function getObjectValue(eId) {
	var elem = document.getElementById(eId);
	return elem.value; 
}
 
 


