function openwin(url,win,params) { 
 screenh = screen.height;
 if (screenh >= 768) { params = params + ",width=770,height=650"; } 
  else 
 { params = params + ",width=750,height=490"; } 
 
 urllen=url.length;
 urlext=url.substring(urllen-3,urllen);

 if (urlext == 'doc' || urlext == 'xls' || urlext == 'rtf') {
   actwin1=window.open(url,win,params); }
 else
{
 actwin1=window.open('',win,params); 
 actwin1.location=url;
 actwin1.focus();
}

}