var win, newwin, preview, mailWindow, textWindow;
function dw(c){return (c)?document.writeln(c):false;}
function ow(u,w,h,t,s,r,c){var d=document,n="",nw,f;t=t?"yes":"no"; s=s?"yes":"no";f="toolbar="+t+",menubar="+t+",location="+t+",status="+t+",scrollbars="+s+",resizable="+r;if(w){f+=",width="+w;}else{if(d.body.clientWidth)f+=",width="+d.body.clientWidth;else f+=",width="+window.innerWidth;}if(h){f+=",height="+h;}else{if(d.body.clientHeight)f+=",height="+d.body.clientHeight;else f+=",height="+window.innerHeight;}if(c){if(w&&window.screen.availWidth)f+=",left="+Math.round((window.screen.availWidth-parseInt(w))/2);if(h&&window.screen.availHeight)f+=",top="+Math.round((window.screen.availHeight-parseInt(h))/2);}nw=window.open(u,n,f);nw.focus();return nw;}
newwin=function(u,w,h){ow(u,w,h,true,true,true,true);}
preview=function(u,w,h){ow(u,w,h,false,false,false,true);}
mailWindow=function(u,w,h){if(!win||win.closed){win=ow(u,w,h,false,true,false,true);}else{win.focus();}}
textWindow=function(u,w,h){ow(u,w,h,false,false,false,true);}