var xx=yy=0;
var oid=ot="";
var dflag=0;
function showsize(sid){if(oid==sid&&ot=="s"&&dflag==1){cleargenerate();}else{requestxmlhttp(sid,"size");setpos();oid=sid;ot="s";}}
function showcolor(sid){if(oid==sid&&ot=="c"&&dflag==1){cleargenerate();}else{requestxmlhttp(sid,"color");setpos();oid=sid;ot="c";}}
function setpos(){xx=document.body.scrollLeft+event.clientX;yy=document.body.scrollTop+event.clientY;var bH=document.body.clientHeight;if(bH-yy<=134&&bH>134){yy=yy-134};}
function requestxmlhttp(sid,t){var url="requestxmlhttp.asp?act="+t+"&id="+sid;if(window.XMLHttpRequest){xObj=new XMLHttpRequest();xObj.open("get",url,true);xObj.onreadystatechange=RQ;xObj.send(null);}else if(window.ActiveXObject){xObj=new ActiveXObject("microsoft.XMLHTTP");xObj.open("GET",url,false);xObj.send();if(xObj.status==200){generate(xObj.responseText);}}}
function RQ(){if(xObj.readyState==4){if(xObj.status==200){generate(xObj.responseText);}}}
function generate(info){cleargenerate();var myarr=info.split(",");var str="";for(i=0;i<myarr.length;i++){str=str+"<option>"+myarr[i]+"</option>"};str="<select size=6 style='width:100px;height:120px;'>"+str+"</select>";var sdiv=document.createElement("div");sdiv.id="showsc";with(sdiv.style){position="absolute";zIndex="3";width="100px";height="100px";top=yy;left=xx;};sdiv.innerHTML=str;document.body.appendChild(sdiv);dflag=1;}
function cleargenerate(){if(document.getElementById("showsc")){document.getElementById("showsc").removeNode(true);};dflag=0;}