function ds_getel(id) {
	return document.getElementById(id);
}

// Get the left and the top of the element.
function ds_getleft(el) {
	var tmp = el.offsetLeft;
	el = el.offsetParent
	while(el) {
		tmp += el.offsetLeft;
		el = el.offsetParent;
	}
	return tmp;
}
function ds_gettop(el) {
	var tmp = el.offsetTop;
	el = el.offsetParent
	while(el) {
		tmp += el.offsetTop;
		el = el.offsetParent;
	}
	return tmp;
}

// Output Element
//var ds_oe = ds_getel('ds_calclass');
// Container
var ds_ce = ds_getel('resultt');
var element;
function ds_sh1(t,id) {
document.getElementById("nakup").style.visibility="hidden";
	jQuery('#resultt').html('<img src=images/16.gif width="26" height="26" alt="loader">');
if(id=="close"){
  //var url = "blank.php";
  document.getElementById("resultt").style.display="none";
  }
  else{
  document.getElementById("resultt").style.display="block";
	var url = "izbor.php?id="+id;
	
	jQuery('#resultt').load(url);
		the_left = ds_getleft(t);
	the_top = ds_gettop(t) + t.offsetHeight;
	ds_ce.style.left = the_left + 'px';
	ds_ce.style.top = the_top + 'px';

	element=document.getElementById("resultt")
	element.style.top=the_top-130 + 'px';
	element.style.left=the_left-135 + 'px';


// Hide the calendar.

	return false;
	}
}
