function createWindow(url,wid,hei,posx,posy,tit,type,evt,ret){var win,x,y,pos,str='';pos=(evt==null?getCenterPosition(wid,hei):getFromSrcElement(evt));posx=(posx!=null&&posx>=0?posx:pos.x);posy=(posy!=null&&posy>=0?posy:pos.y);str=(type&1?'toolbar=yes,':'toolbar=no,')+(type&2?'location=yes,':'location=no,')+(type&4?'directories=yes,':'directories=no,')+(type&8?'status=yes,':'status=no,')+(type&16?'menubar=yes,':'menubar=no,')+(type&32?'scrollbars=yes,':'scrollbars=no,')+(type&64?'resizable=yes,':'resizable=no,')+(type&128?'copyhistory=yes,':'copyhistory=no,')+'width='+wid+',height='+hei+',left='+posx+',top='+posy;if(ret==true)return window.open(url,tit,str);window.open(url,tit,str);}function getCenterPosition(w,h){var r={x:parseInt((screen.width-w)/2),y:parseInt((screen.height-h)/2)};return r;}function getFromSrcElement(evt){var result=0;var ie=document.all&&navigator.userAgent.indexOf('MSIE')!=-1;var ns=document.layers||document.getElementById;var el=evt.srcElement||evt.target;var elpos=getAbsolutePos(el);var r={x:(evt.screenX?evt.screenX-(evt.offsetX?evt.offsetX:0):window.outerWidth-window.innerWidth+elpos.x),y:(evt.screenY?evt.screenY-(evt.offsetY?evt.offsetY:0):window.outerHeight-window.innerHeight+elpos.y)};if(ie)r.x=(el.width?r.x+el.width:(el.offsetWidth?r.x+el.offsetWidth:r.x+(el.innerText.length*10)+5));else if(ns)r.x=(el.width?r.x+el.width:r.x+el.offsetWidth-5);if(ns)r.y-=10;return r;}