// JScript 文件
function AddMsg()
{
 alert(document.getElementById("msg").value.length);
 if(document.getElementById("msg").value.length<6)
 {
  alert("评论长度太短");
  return;
 }
 else
 {
 var obj=itemmsg_aspx.AddItemMsg(request.QueryString("id"),document.getElementById("msg").value);
 if(obj.value==1)
 {
  closeMe(1);
 }
 }
}
function closeMe(arg)
{
 switch(arg)
 {
  case 1:
   alert("评论成功");break;
  case 0:
   alert("您还未登录");break;
 }
 self.close();
}
var request = 
{ 
QueryString : function(val) 
{ 
var uri = window.location.search;
var re = new RegExp("" +val+ "=([^&?]*)", "ig"); 
return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null); 
} 
}

var oPopup = window.createPopup();
function rdl_doClick(obj){
var oMessage=document.all("oMessage");
with (oPopup.document.body) {
style.backgroundColor="lightyellow";
style.border="solid black 1px";
innerHTML="<img src='"+obj+"' width='300' height='250' />";
}
oPopup.show(event.clientX+200, event.clientY-50, 300, 250);
}