function closeDiv(buttonObj)
{
   var node = buttonObj;
   do
   {
      node = node.parentNode;
   }
   while
      (node.nodeType != 1 && node.nodeName != 'div');
   node.parentNode.removeChild(node);
}


function getrecords(url){

var y = document.createElement('div');
y.id = 'pdetails';  
y.style.display='block';
y.style.position = 'absolute';  
y.style.top ='100px';
y.style.left ='200px';
y.style.width = '740px';  
y.style.height = '800px';  
y.style.backgroundColor = '#575759'; 
y.style.color = '#fff'; 
y.style.zIndex = 3;
y.innerHTML = "<span onclick='closeDiv(this)' class='searchpg' style='cursor:pointer; padding-left:550px;'>Close</span>";
y.style.opacity = '10';
y.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=100)';

var defaultIframe = y.appendChild(document.createElement("iframe"));
defaultIframe.id = "ddajaxtabsiframe";
defaultIframe.name = "ddajaxtabsiframe";
defaultIframe.frameborder = "0";
defaultIframe.style.top = "25px";
defaultIframe.style.left = "10px";
defaultIframe.width = "720px";
defaultIframe.height = "750px";
defaultIframe.style.position = "absolute";
defaultIframe.style.display = "block";
defaultIframe.scrolling = "yes";
y.style.zIndex = 4;
defaultIframe.src = url

window.document.body.appendChild(y);
JSFX_FloatDiv("pdetails",300,0).flt();

}


function example_ajax_request() {
  $('#pdetails').asp('<p><img src="/images/ajax-loader.gif" width="220" height="19" /></p>');
  //$('#pdetails').load("/examples/ajax-loaded.html");
}


var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
function JSFX_FoatDiv(id, sx, sy)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
	el.flt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.flt()", 40);
	}
	return el;
}

//var d=document.getElementById('pdetails');
function getPosition(obj){
    var topValue= 0,leftValue= 0;
    while(obj){
	leftValue+= obj.offsetLeft;
	topValue+= obj.offsetTop;
	obj= obj.offsetParent;
    }
    //finalvalue = leftValue + "," + topValue;
	//return finalvalue;

}