che dichi ti può picere???
codice:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="text/javascript">
<!-- Begin
// Created and Copyrighted by Benjamin Leow
// Please go to http://www.surf7.net for latest version and more freeware
function copy() {
textRange = document.extractor.output.createTextRange();
textRange.execCommand("RemoveFormat");
textRange.execCommand("Copy");
}
function paste() {
textRange = document.extractor.input.createTextRange();
textRange.execCommand("RemoveFormat");
textRange.execCommand("Paste");
}
function help(){
var imgwid = 450;
var imghgt = 335;
content = ('<html><head><title>Email Extractor Lite : Help</title>');
content += ('<STYLE TYPE="text/css">');
content += ('BODY,td,th,ul,p { font: normal normal normal 8pt/1em Verdana; color: #000; }');
content += ('</STYLE>');
content += ('</head><body onload="window.focus();">');
content += ('Quick and dirty');
content += ('- ');
content += ('<LI>Copy all text from any webpages, documents, files, etc...');
content += ('<LI>Paste it into Input Window.');
content += ('<LI>Click "Extract" button.');
content += ('<LI>Copy the result from Output Window to somewhere and save it.');
content += ('<LI>Click "Reset" button to start all over again.');
content += ('
');
content += ('
More Controls');
content += ('- ');
content += ('<LI>Click "Paste Input" link to paste any text you copied elsewhere into Input Window.');
content += ('<LI>Click "Copy Output" link to copy whatever text inside Output Window.');
content += ('<LI>Choose different separator from the dropdown menu or specify your own. Default is comma.');
content += ('<LI>You can group a number of emails together. Each group is separated by a new line. Please enter number only.');
content += ('<LI>Check "Sort Alphabetically" checkbox to arrange extracted emails well... alphabetically.');
content += ('<LI>You can extract emails containing only certain string (text). Useful if you only want to get email from a particular domain.');
content += ('
');
content += ('<DIV ALIGN="CENTER"><INPUT TYPE="button" VALUE="Close" onClick="javascript:window.close();"></DIV>');
content += ('</body></html>');
var winl = (screen.width - imgwid) / 2;
var wint = (screen.height - imghgt) / 2;
helpwindow = window.open('','help','width=' + imgwid + ',height=' + imghgt + ',resizable=0,scrollbars=0,top=' + wint + ',left=' + winl + ',toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0');
helpwindow.document.write(content);
helpwindow.document.close();
}
function checksep(value){
if (value) document.extractor.sep.value = "other";
}
function numonly(value){
if (isNaN(value)) {
window.alert("Please enter a number or else \nleave blank for no grouping.");
document.extractor.groupby.focus();
}
}
function findEmail() {
var email = "No email address detected";
var a = 0;
var ingroup = 0;
var separator = document.extractor.sep.value;
var string = document.extractor.string.value;
var groupby = Math.round(document.extractor.groupby.value);
if (separator == "new") separator = "\n";
if (separator == "other") separator = document.extractor.othersep.value;
var rawemail = document.extractor.input.value.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
var norepeat = new Array();
var filtermail = new Array();
if (rawemail) {
if (string){
x = 0;
for (var y=0; y<rawemail.length; y++) {
if (rawemail[y].search(string) >= 0) {
filtermail[x] = rawemail[y];
x++;
}
}
rawemail = filtermail;
}
for (var i=0; i<rawemail.length; i++) {
var repeat = 0;
// Check for repeated emails routine
for (var j=i+1; j<rawemail.length; j++) {
if (rawemail[i] == rawemail[j]) {
repeat++;
}
}
// Create new array for non-repeated emails
if (repeat == 0) {
norepeat[a] = rawemail[i];
a++;
}
}
if (document.extractor.sort.checked) norepeat = norepeat.sort(); // Sort the array
email = "";
// Join emails together with separator
for (var k = 0; k < norepeat.length; k++) {
if (ingroup != 0) email += separator;
email += norepeat[k];
ingroup++;
// Group emails if a number is specified in form. Each group will be separate by new line.
if (groupby) {
if (ingroup == groupby) {
email += '\n\n';
ingroup = 0;
}
}
}
}
// Return array length
var count = norepeat.length;
// Print results
document.extractor.count.value = count;
document.extractor.output.value = email;
}
// End -->
</SCRIPT>
<STYLE TYPE="text/css">
BODY { background:#FFF }
BODY,td,th,ul,p { font: normal normal normal 8pt/1em Verdana; color: #000; }
textarea,input,select { font: normal normal normal 8pt/1em Verdana; color: #000; }
A:link, A:visited { text-decoration: none; color: #059; }
A:active, A:hover { text-decoration: underline; color: #D14; }
.bordercolor { background:#666 }
.maincolor { background:#CCC }
.button { background:#CCC }
.titlebarcolor { background:#007 }
.titlefont { font: normal normal bold 9pt/1em Arial; color: #FFF; }
.copyrightfont { font: normal normal normal 7.5pt/1.5em Verdana; color: #666; }
</STYLE>
<TITLE>Email Extractor Lite 1.5</TITLE>
</HEAD>
<BODY>
<DIV ALIGN="CENTER">
<FORM NAME="extractor">
<TABLE CLASS="bordercolor" CELLPADDING=1 CELLSPACING=0 BORDER=0><TR><TD>
<TABLE CLASS="maincolor" CELLPADDING=4 CELLSPACING=0 BORDER=0>
<TR CLASS="titlebarcolor" VALIGN="MIDDLE">
<TD><FONT CLASS="titlefont">Email Extractor Lite 1.5</FONT></TD>
<TD ALIGN="RIGHT" NOWRAP></TD>
</TR>
<TR>
<TD VALIGN="TOP" ALIGN="CENTER" WIDTH="50%">
Input Window
<TEXTAREA NAME="input" rows=8 cols=50></TEXTAREA>
</TD>
<TD VALIGN="TOP" ALIGN="CENTER" WIDTH="50%">
Output Window
<TEXTAREA NAME="output" rows=8 cols=50></TEXTAREA>
</TD></TR>
<TR>
<TD VALIGN="TOP" ALIGN="CENTER">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
if ((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)) document.write('Paste Input');
else document.write('Paste Input');
// -->
</SCRIPT>
</TD>
<TD VALIGN="TOP" ALIGN="CENTER">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
if ((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)) document.write('Copy Output');
else document.write('Copy Output');
// -->
</SCRIPT>
</TD></TR>
<TR>
<TD VALIGN="TOP" ALIGN="LEFT" COLSPAN=2>
Separator:
<SELECT NAME="sep">
<OPTION VALUE=", ">Comma</OPTION>
<OPTION VALUE="|">Pipe</OPTION>
<OPTION VALUE=" : ">Colon</OPTION>
<OPTION VALUE="new">New Line</OPTION>
<OPTION VALUE="other">Other</OPTION>
</SELECT>
<INPUT TYPE="TEXT" NAME="othersep" SIZE=3 onBlur="checksep(this.value)">
Group: <INPUT TYPE="TEXT" SIZE=3 NAME="groupby" onBlur="numonly(this.value)"> Emails
<LABEL FOR="sortbox"><INPUT TYPE="CHECKBOX" NAME="sort" id="sortbox">Sort Alphabetically</LABEL>
</TD></TR>
<TR>
<TD VALIGN="TOP" ALIGN="LEFT" COLSPAN=2>
Only extract email containing this string: <INPUT TYPE="TEXT" SIZE=20 NAME="string">
</TD></TR>
<TR>
<TD VALIGN="TOP" ALIGN="LEFT">
<INPUT TYPE="BUTTON" CLASS="button" VALUE="Extract" onClick="findEmail()">
<INPUT TYPE="RESET" CLASS="button" VALUE="Reset">
Need help?
</TD>
<TD VALIGN="TOP" ALIGN="RIGHT" NOWRAP>
Email count: <INPUT NAME="count" SIZE=5 READONLY>
</TD></TR>
</TABLE>
</TD></TR></TABLE>
</FORM>
<FONT CLASS="copyrightfont">© 2002, 2003 Benjamin Leow - All Right Reserved
Go to Surf7 Network for latest version and more freeware.</FONT>
</DIV>
</BODY>
</HTML>