
function createAlertFrame(id,pic,wi,he)
{
if (!document.getElementById(id)) {
                createBackground();
   		var frame = new AlertFrame(id,pic);
		frame.h = he;
		frame.w = wi;
		frame.staticframe = true;
		frame.create();
	}
}
function AlertFrame(idd,pic) 
{ 
        this.base = LowInframe;
        this.base(idd);
        var position;
        this.create = create_frame;	
       
        function  create_frame()
  	{ 

      	var div = document.createElement('div'); 

                div.setAttribute('id', this.id);

               if (!this.staticframe) ;
                     else position = getStaticPosition(this.w,this.h);

                div.className = "framediv";
                div.style.top = ""+(position[1]-50)+"px";
                div.style.left = ""+position[0]+"px"; 
                div.style.width = ""+this.w+"px";
                div.style.height = ""+this.h+"px";
               
var head = this.createTitleBar(DETAILMAP,this.id);
div.appendChild(head);

var im = this.createImage(pic);
div.appendChild(im);

var bdiv = document.createElement('div');
bdiv.className = "framebottomdiv";
//var okBut = this.createButton(OK,function(){location.href='empty_cart.php';});
var closeBut = this.createButton(CLOSE,function(){hideFrame(idd);});
//bdiv.appendChild(okBut);
//bdiv.appendChild(document.createTextNode("  "));
bdiv.appendChild(closeBut);
div.appendChild(bdiv);

   document.body.appendChild(div);
}

}
AlertFrame.prototype = new LowInframe;
///////////////////////////////////////////////
function createBackground()
{
var div = document.createElement('div');
div.setAttribute('id','backdiv');
var center = getWindowCenter();
div.className = "backdiv";
//div.style.zIndex = "999";
div.style.top = "0px";
div.style.left = "0px";
div.style.width = ""+center[0]*2+"px";
div.style.height = ""+center[1]*2+"px";

document.body.appendChild(div);
}