var Obj;
var mkit;
mkit="<div style=\"cursor:default;padding-bottom:6px;filter:alpha(opacity=100);display:none;position:absolute;z-index:10;background-color:#3B5999;\" id=\"qd1\">"
mkit+="<table onselectstart=\"return false\" width=310 border=0 style=\"margin:1px\" cellspacing=0 cellpadding=0><tr>"
mkit+="<td width=288 height=22 style=\"color:#ffffff;font-family: Arial;font-size:12px;padding-left:12px;background-color:#3B5999;\"><b>Enquiry form of Metall Rare Earth Limited<b></td>"
mkit+="<td width=22 height=22 valign=middle align=center onmousedown=\"this.style.cursor=\'default\'\">"
mkit+="<input type=button value=X style=\"width:20; background-color:#3B5999;font-weight:bold;font-family:arial;font-size:12px;border-width: 1;border-style:ridge;border-color:#99ccff;color:#ffffff\" align=center title=\'hide it\' onclick=\"qf.location.replace(\'about:blank\');qd1.style.display=\'none\'\">"
mkit+="</td><tr><td colspan=2>"
mkit+="<iframe name=qf id=qf width=310 height=353 scrolling=no src=about:blank frameborder=0>"
mkit+="</iframe></td></tr></table></div>"
document.write(mkit)

function popquery(productname,productcode)
{
qf.location.replace('about:blank')
productname=escape(productname)
url="enquiry.asp?productname="+productname+"&productcode="+productcode
qf.location.replace (url)
qd1.style.display=""
//qd1.style.left=(document.body.clientWidth-qd1.offsetWidth)/2+document.body.scrollLeft
//qd1.style.top=(document.body.clientHeight-qd1.offsetHeight)/2+document.body.scrollTop
qd1.style.top=196
qd1.style.left=38
//ht=(screen.availHeight-580)/2
//wd=(screen.availWidth-400)/2
//cd="left="+wd+",top="+ht+",resizable=no,height=580,width=400,status=no,toolbar=no,menubar=no"
//window.open(url,null,cd)
}

function drag(o){
 o.onmousedown=function(a){
  var d=document;
  if(!a)a=window.event;
  var x,y
  if(o.setCapture){
   o.setCapture();
   x=event.x-o.style.pixelLeft
   y=event.y-o.style.pixelTop;
   }
  else if(window.captureEvents){
   window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
   x=a.layerX?a.layerX:a.offsetX
   y=a.layerY?a.layerY:a.offsetY;
   }
   o.style.cursor="move"

  d.onmousemove=function(a){
   if(!a)a=window.event;
   if(!a.pageX)a.pageX=a.clientX;
   if(!a.pageY)a.pageY=a.clientY;
   var tx=a.pageX-x,ty=a.pageY-y;
   o.style.left=tx;
   o.style.top=ty;
  };

  d.onmouseup=function(){
  o.style.cursor="default"
   if(o.releaseCapture)
    {o.releaseCapture();
    }
   else if(window.captureEvents)
    window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
   d.onmousemove=null;
   d.onmouseup=null;
  };
 };
}


drag(document.getElementById('qd1'));
