// JavaScript Document
function show_pic(row) { // from the row we can determine the picid ie pic_0 pic_1 etc
//document.getElementById("msg_c").innerHTML = document.getElementById("prod_"+row).innerHTML ;
document.getElementById("bigpic").innerHTML= '<img alt="" src="/shop-photos/'+document.getElementById('prod_'+row).innerHTML+'_thumb_125.jpg" / >' ;
//document.getElementById("pic_" + row).width= "125" ;
document.getElementById("bigpic").style.visibility= "visible" ;
document.getElementById("bigpic").style.display= "block" ;
//var arr = findPos(document.getElementById("pic_"+ row)) ;
//document.getElementById("msg_c").innerHTML = "X=" + arr[0] + " Y=" + arr[1] ;
var arr = YAHOO.util.Dom.getXY("pic_"+ row) ;
arr[0] = arr[0]+40;
arr[1] = (arr[1]+10);
var str = YAHOO.util.Dom.setXY("bigpic", arr);
	//var arr = YAHOO.util.Dom.getXY(this.id) ;
	//document.getElementById("mini_message").innerHTML = " id="+this.id;
    var attributes = { 
	   // height: { to: 125 }, 
        width: {from: 25, to: 125 } 
    }; 
    var anim = new YAHOO.util.Anim('bigpic', attributes); 
	anim.animate(); 
	
// YAHOO.util.Dom.setXY('foo', YAHOO.util.Event.getXY(e)); 
//document.getElementById("msg_c").innerHTML += "<br />Yahoo: X=" + arr[0] + " Y=" + arr[1] ;
//document.getElementById("bigpic").style.left= arr[0] ;//+ 50 ;
//document.getElementById("bigpic").style.top= arr[1] ;//-60 ;

}
function show_icon(row) { // from the row we can determine the picid ie pic_0 pic_1 etc
//src="images/camera.gif" width="20"
document.getElementById("pic_" + row).src= "images/camera.gif" ;
document.getElementById("pic_" + row).width= "20" ;

}

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.



function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}