function expandingWindow(website, wdth, hght) { var windowprops='width=100,height=100,scrollbars=no,status=no,resizable=no' var heightspeed = 2; var widthspeed = 7; var leftdist = 300; var topdist = 150; if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) { //var winwidth = window.screen.availWidth - leftdist; //var winheight = window.screen.availHeight - topdist; var winwidth = wdth; var winheight = hght; var sizer = window.open("","Tank","left=" + leftdist + ",top=" + topdist +","+ windowprops); for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) sizer.resizeTo("1", sizeheight); for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) sizer.resizeTo(sizewidth, sizeheight); sizer.location = website; sizer.focus(); } else window.open(website,'mpwindow'+Math.floor(Math.random()*99)); } function copyToClipboard(text2copy) { if (window.clipboardData) { window.clipboardData.setData("Text",text2copy); } else { var flashcopier = 'flashcopier'; if(!document.getElementById(flashcopier)) { var divholder = document.createElement('div'); divholder.id = flashcopier; document.body.appendChild(divholder); } document.getElementById(flashcopier).innerHTML = ''; var divinfo = ''; document.getElementById(flashcopier).innerHTML = divinfo; } } function readClipboardData() { if (window.clipboardData) { return(window.clipboardData.getData('Text')); } else if (window.netscape) { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); if (!clip) return; var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); if (!trans) return; trans.addDataFlavor('text/unicode'); clip.getData(trans,clip.kGlobalClipboard); var str = new Object(); var len = new Object(); try { trans.getTransferData('text/unicode',str,len); } catch(error) { return null; } if (str) { if (Components.interfaces.nsISupportsWString) str=str.value.QueryInterface(Components.interfaces.nsISupportsWString); else if (Components.interfaces.nsISupportsString) str=str.value.QueryInterface(Components.interfaces.nsISupportsString); else str = null; } if (str) { return(str.data.substring(0,len.value / 2)); } } return null; } function trim(str) { str = this != window? this : str; return str.replace(/^\s+/g, '').replace(/\s+$/g, ''); } function pasteFromClipboard() { function parseURL(data) { var URLs var rxObj = /(ftp|http|https|www):\/\/([a-zA-Z0-9\/\._\[\]\-\+\?\=~;]*)/i; var matched = rxObj.exec(data); if (matched != null) { URLs = parseURL(data.replace(rxObj, '')) ; if (URLs) URLs = matched[0]+'\n'+URLs; else URLs = matched[0]+'\n'; } else return ''; return URLs; } var URLs = parseURL(' '+readClipboardData()+' '); return trim(URLs); } function copyLinkArrayToClipboard(linkArray, linkID, key) { var linkText = ''; for (i=0; i= ((startChr-1)*2)) uec = parseInt(hex,16) ^ key; else uec = parseInt(hex,16); res += String.fromCharCode(uec); i++; } return res; } function refreshLinkCount(container) { text = document.getElementById('lnk').value; text = trim(text); lines = text.split('\n'); linesCount = lines.length; if (text == '') linesCount = 0; document.getElementById(container).innerHTML = '['+linesCount+']'; }