var idPhotos = null;

var base_url='http://www.alexander-francis.co.uk/';

function ajax_change_image(product_id,catalogue,current_image)
{
		
				
						dataString = 'product_id='+product_id+'&catalogue='+catalogue+'&current_image='+current_image;
					
						$$.ajax({
						type: "POST",
						url: base_url+"slider_change.php",
						data: dataString,
						success: function(html)
						{
								
								document.getElementById('gallery_first').innerHTML=html;
								 $$('#gallery_first a').lightBox();
						}

						});
						
						
						$$.ajax({
						type: "POST",
						url: base_url+"slider_change2.php",
						data: dataString,
						success: function(html)
						{
								
								document.getElementById('small_slider_images').innerHTML=html;
								 $$('#small_slider_images a').lightBox();
						}

						});
					
					
				
				
					
		
		
}



function swapImg(url, a, id, zoom_url) {
	idPhotos = id;


	document.images['big'].src = url;
	
	
	 
	// document.getElementById('large_image').href=zoom_url;
	 
	 // $$('#gallery_first a').lightBox();
	 
	 
	//document.getElementById('zoom_in').href=zoom_url;
	//
	
	//document.images['big'].alt = a;
	
		

	/*$("a.gl").fancybox({
		'type'				: 'iframe',
		'scrolling'         : 'no'
		//'overlayShow'         : 'true'

});*/
	//document.getElementById('bubbly').href = h; 

}



function setIdPhotos(id) {

	idPhotos = id;

}

function popup(url, x, y) {

	url = url + '&idPhotos=' + idPhotos;

	var w = open(url,"spycameracctv", "scrollbars=0,resizable=0,border=0,width=x,height=y,location=0,menubar=0,toolbar=0" );

	w.focus();

	w.resizeTo(x,y);

	if ( w.opener == null )

		 w.opener = window;

}




function popup2(url, x, y) {

	url = url ;

	var w = open(url,"spycameracctv", "scrollbars=0,resizable=0,border=0,width=x,height=y,location=0,menubar=0,toolbar=0" );

	w.focus();

	w.resizeTo(x,y);

	if ( w.opener == null )

		 w.opener = window;

}

