
<!--  Begin
function generate(form){
page = document.inputForm.page.value;
toolbars = document.inputForm.toolbars.checked;
scrollprops = document.inputForm.scrollit.checked;
locations = document.inputForm.locations.checked;
statusbars = document.inputForm.statusbars.checked;
menubars = document.inputForm.menubars.checked;
resizeable = document.inputForm.resizeable.checked;
width = document.inputForm.width.value;
if (!width) width = screen.width;
height = document.inputForm.height.value;
if (!height) height = screen.height;
howto = document.inputForm.howtoopen.options[document.inputForm.howtoopen.selectedIndex].value;
center = document.inputForm.center.checked;

start = "<";

if(howto == 'body') {
otherOutput = start + "!-- STEP TWO: Paste this onLoad event handler into the BODY tag -->\n\n" + start + "BODY onLoad=\"javascript:popUp('" + page + "')\">";
}
if(howto == 'link') {
otherOutput = start + "!-- STEP TWO: Use this link to open the Popup window in the body section -->\n\n" + start + "A HREF=\"javascript:popUp('" + page + "')\"> Popup a Window" + start + "/A>";
}
if(howto == 'button') {
otherOutput = start + "!-- STEP TWO: Use this button code for the Popup window in the body section -->\n\n" + start + "form>\n" + start + "input type=button value=\"Popup a Window\" onClick=\"javascript:popUp('" + page + "')\">\n" + start + "/form>";
}

scriptOutput = start + '!-- TWO STEPS TO INSTALL THE POPUP WINDOW:\r\n\r\n'
+ '<!-- STEP ONE: Copy this code into the HEAD of your HTML document  -->\r\n\r\n'
+ '\r\n\r\n' + start + 'SCRIPT LANGUAGE="JavaScript">\r\n' 
+ '<!-- Begin\r\n'
+ 'function pop' + 'Up(URL) {\nday = new Date();\nid = day.getTime();\n';

scriptOutput += "eval(\"page\" + id + \" = window.open(URL, '\" + id + \"', '" +

((toolbars) ? "toolbar=1," : "toolbar=0,") + 
((scrollprops) ? "scrollbars=1," : "scrollbars=0,") +
((locations) ? "location=1," : "location=0,") +
((statusbars) ? "statusbar=1," : "statusbar=0,") +
((menubars) ? "menubar=1," : "menubar=0,") +
((resizeable) ? "resizable=1" : "resizable=0") +
((width) ? ",width=" + width : "") +
((height) ? ",height=" + height : "") +
((center) ? ",left = " + ((screen.width - width) / 2) : "") +
((center) ? ",top = " + ((screen.height - height) / 2) : "") +
"');\");\n}\n// End -->\n" + start + "/sc" + "ript>\n";

output = scriptOutput + "\n\n" + otherOutput + '\n\n' + start +'!-- Script Size:  0.60 KB  --'+'>';

document.mail.source.value = output;
document.mail.source2.value = output;

uncode();
}
// End -->

