function show(d_id,img_id,pos)
{
 var ob_pos=document.getElementById(pos);
 var ob_top=document.getElementById(d_id);
 var curTop  =0;
 var curleft =0;
  if(ob_pos.offsetParent)
        while(1) 
        {
          curTop  += ob_pos.offsetTop;
          curleft += ob_pos.offsetLeft;
          if(!ob_pos.offsetParent)
            break;
          ob_pos = ob_pos.offsetParent;
        }
    else if(ob_pos.x)
        curleft += ob_pos.x;
 
 curleft=curleft-10;
 curTop=curTop-110;		
 var obj=document.getElementById(d_id);
 var obj1=document.getElementById('img1');
 obj.style.display="block";
 obj1.src="images/product1/" + img_id + ".gif";
 obj.style.left=curleft + 'px';
 obj.style.top =curTop  + 'px';
}

function out()
{
  var obj=document.getElementById("dd");
  obj.style.display="none";
}

 
 //---end of colored chart----
 
 
 
 function put_color(pid)
 {
 	texts=document.getElementById('text').innerHTML;
	texts=texts.split('-');
	texts=texts[0];
 	document.getElementById('sel_col').value=texts;
	window.location="product_details.php?cid=" + texts;
 }
 
 function set_color(col_id)
 {
 	document.getElementById().value=col_id;
 }


function show_image(id)
	{
	var img=document.getElementById(id).src;
	document.getElementById('big_image').src=img;
	}
	
function next_page()
{
  document.getElementById('btnaddtocart').style.display='none';
  var qty=document.getElementById('sel_countity').value;
  var product_id=document.getElementById('pid').value;
  var cid=document.getElementById('cid').value;
  window.location="product_view_process.php?action=details&product_id=" + product_id + "&qty=" + qty + "&cid=" + cid;
}

function showTab(tab,sel)
{
	for(var i=1;i<=4;i++)
	{
		document.getElementById('step'+i).style.display='none';
		document.getElementById('tab'+i).className = "tabs";
	}
		document.getElementById(tab).style.display='';
		document.getElementById(sel).className = "tabs1";
}
