function Nothing() { } function OpenDialog(url,name,w,h) { if(dialogWindow) { dialogWindow.close(); dialogWindow = null; } var b = document.body; var l = b.clientWidth/2+b.clientLeft-w/2; var t = b.clientHeight/2+b.clientTop-h/2; dialogWindow = window.open(url,name,'width='+w+',height='+h+',left='+l+',top='+t+',resizable=yes,status=no,scrollbars=no'); return dialogWindow; } function OpenModalDialog(url,args,w,h) { return showModalDialog(url,args,'dialogWidth:'+w+'px;dialogHeight:'+h+'px;help:no;status:no;scroll:no;resizable:yes;'); } function OpenModelessDialog(url,args,w,h) { return showModelessDialog(url,args,'dialogWidth:'+w+'px;dialogHeight:'+h+'px;help:no;status:no;scroll:no;resizable:yes;'); } function getE(id) { return document.getElementById(id); } function paste(t1,t2, textBox) { if (document.selection) { textBox.focus(); var txt = textBox.value; var str = document.selection.createRange(); if (str.text == '') { str.text = t1 + t2; } else if (txt.indexOf(str.text)>=0) { str.text = t1 + str.text + t2; } else { textBox.value = txt + t1 + t2; } } } function SetCookie(cookieName, cookieValue, expires, path, domain, secure) { document.cookie = escape(cookieName) + '=' + escape(cookieValue) + (expires ? '; expires=' + expires.toGMTString() : '') + (path ? '; path=' + path : '') + (domain ? '; domain=' + domain : '') + (secure ? '; secure' : ''); } function GetCookie(cookieName) { var cookieValue = ''; var posName = document.cookie.indexOf(escape(cookieName) + '='); if (posName != -1) { var posValue = posName + (escape(cookieName) + '=').length; var endPos = document.cookie.indexOf(';', posValue); if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos)); else cookieValue = unescape(document.cookie.substring(posValue)); } return (cookieValue); } function RemoveCookie(cookieName) { var now = new Date(); var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24); SetCookie(cookieName, 'deleted', yesterday); }