function resizeOuterTo(w,h) {
 if (parseInt(navigator.appVersion)>3) {
   if (navigator.appName=="Netscape") {
    top.outerWidth=w + 24;
    top.outerHeight=h + 58;
   }
   else top.resizeTo(w,h);
 }
} 

function image_popup(pic,title)
{
mywindow = window.open ("image_popup.php?gallery_path="+pic+"&image_name="+title,"product_picture","location=0,status=0,scrollbars=0,width=600,height=520");
mywindow.moveTo(0,0);
mywindow.focus();
}

function show_product_details(product_id)
	{

	if ($('product_detail_div').style.zIndex!=100) 
		new Effect.Opacity('product_detail_div',
			{ duration: 0.5, 
			  transition: Effect.Transitions.linear, 
			  from: 0.0, to: 0.90,
			  beforeStart: function(){
				  
			  	new Ajax.Updater('product_detail_div','jax_detail.php',{method:'post',parameters:'&id='+product_id});
				//alert(product_id);
			  	$('product_detail_div').style.zIndex=100;
			  Element.show('product_detail_div');
			  }
			 }
			);
	else
		new Effect.Opacity('product_detail_div',
			{ duration: 0.5, 
			  transition: Effect.Transitions.linear, 
			  from: 0.90, to: 0.0,
			  afterFinish: function(){$('product_detail_div').style.zIndex=-100;
				Element.hide('product_detail_div');			  
			  }
			 }
			);
	//alert($('product_detail_div').style.zIndex);
	}
	
function show_add_to_basket(product_id)
	{
		
	if ($('add_to_basket_'+product_id).style.zIndex!=100) 
		new Effect.Opacity('add_to_basket_'+product_id,
			{ duration: 0.5, 
			  transition: Effect.Transitions.linear, 
			  from: 0.0, to: 0.90,
			  beforeStart: function(){$('add_to_basket_'+product_id).style.zIndex=100;
			  Element.show('add_to_basket_'+product_id);
			  }
			 }
			);
	else
		new Effect.Opacity('add_to_basket_'+product_id,
			{ duration: 0.5, 
			  transition: Effect.Transitions.linear, 
			  from: 0.90, to: 0.0,
			  afterFinish: function(){$('add_to_basket_'+product_id).style.zIndex=-100;
				Element.hide('add_to_basket_'+product_id);			  
			  }
			 }
			);
	}
