			
			
	function addslashes(str) {
		str=str.replace(/\\/g,'\\\\');
		str=str.replace(/\'/g,'\\\'');
		str=str.replace(/\"/g,'\\"');
		str=str.replace(/\0/g,'\\0');
		return str;
	}
	function stripslashes(str) {
		str=str.replace(/\\'/g,'\'');
		str=str.replace(/\\"/g,'"');
		str=str.replace(/\\0/g,'\0');
		str=str.replace(/\\\\/g,'\\');
		return str;
	}
	
	window.addEvent('domready', function()
		{
			
			if($chk($('home_slideshow')))
				{
			
/*					var current_image = 0;
					
var images = 
[
'0.jpg': { caption: '' },'1.jpg': { caption: '' },'2.jpg': { caption: '' },'3.jpg': { caption: '' },'4.jpg': { caption: '' } 
];


var captions =
[
'','','','','' 
];*/
						
		var slideshow_images = {'0.jpg': { caption: '' },'1.jpg': { caption: '' },'2.jpg': { caption: '' },'3.jpg': { caption: '' },'4.jpg': { caption: '' } };		
		var slideshow_captions = ['','','','','' ];		
		var header_slideshow = new Slideshow('slideshow_pic', slideshow_images, {controller: true, hu: 'images/slideshow/', linked: false, width: 832, height: 300, duration: 2000, delay: 3000, captions: true});


					/*var img_folder = 'images/';
					var ss_container = $('slideshow_pic');
					var ss_caption = $('slideshow_caption');
					var ss_caption_fx = new Fx.Tween(ss_caption,{duration: 200});
					
					ss_caption.fade('hide');
					
					var num_images = images.length;
					
					ss_container.set('class','loading');
					
					var loader = new Asset.images(images, {  
							
							onComplete: function() {  
								var img_count = 0;
								
								ss_container.set('text','');
								ss_caption.set('text','');
								
								images.each(function(im) {  
									var img_panel = 'img' + img_count ;
									var new_img = new Element('img', {
										'id': img_panel,
										'src': img_folder + im,
										'alt': captions[img_count],
										'class': 'slideshow_image'
									}).inject(ss_container);
									
									new_img.fade('hide');
									img_count++;
								});
								
								var cur_img_fx = new Fx.Tween($('img' + current_image),{duration: 1000});
								
								cur_img_fx.start('opacity',0,1).chain(function(){ ss_container.set('class',''); });
								ss_caption.set('text',captions[current_image]);
								ss_caption_fx.start('opacity',0,1)
							}																		
						});
					
					var ss_previous = $('slideshow_previous');
					var ss_next = $('slideshow_next');
					
					ss_next.addEvent('click',function(event) {
						event = new Event(event).stop();
																					 
						$('img' + current_image).fade('out');
						
						if(current_image < (num_images - 1))
							{
								$('img' + (current_image + 1)).fade('in');
								current_image = (current_image + 1);
							}
						else
							{
								$('img0').fade('in');
								current_image = 0;
							}
							
						ss_caption.set('text',stripslashes(captions[current_image]));
					});
					
					ss_previous.addEvent('click',function(event) {
						event = new Event(event).stop();
																					 
						$('img' + current_image).fade('out');
						
						if(current_image == 0)
							{
								$('img' + (num_images - 1)).fade('in');
								current_image = (num_images - 1);
							}
						else
							{
								$('img' + (current_image - 1)).fade('in');
								current_image = (current_image - 1);
							}
						
						ss_caption.set('text',captions[current_image]);
					});*/
					
					
					
			}
			
		
		
		});
			
