function MakeCode(form){
var theurl = form.url.value;
var thewidth = form.width.value;
var theheight = form.height.value;
var thename = form.name.value;
var thetpos = form.tpos.value;
var thelpos = form.lpos.value;
if (theurl != "") {
theurl = theurl;
}
else {
theurl = "yourwindow.html";
}
if (thewidth != "") {
thewidth = thewidth;
}
else {
thewidth = "450";
}
if (theheight != "") {
theheight = theheight;
}
else {
theheight = "275";
}
if (thename != "") {
thename = thename;
}
else {
thename = "MyWindow";
}
if (thetpos != "") {
thetpos = thetpos;
}
else {
thetpos = "0";
}
if (thelpos != "") {
thelpos = thelpos;
}
else {
thelpos = "0";
}
if (form.scrollbars.options.selectedIndex == 0) {
xscrollbars = "yes";
}
else {
xscrollbars = "no";
}
if (form.toolbar.options.selectedIndex == 0) {
xtoolbar = "yes";
}
else {
xtoolbar = "no";
}
if (form.location.options.selectedIndex == 0) {
xlocation = "yes";
}
else {
xlocation = "no";
}
if (form.directories.options.selectedIndex == 0) {
xdirectories = "yes";
}
else {
xdirectories = "no";
}
if (form.resizable.options.selectedIndex == 0) {
xresizable = "yes";
}
else {
xresizable = "no";
}
if (form.status.options.selectedIndex == 0) {
xstatus = "yes";
}
else {
xstatus = "no";
}
if (form.menubar.options.selectedIndex == 0) {
xmenubar = "yes";
}
else {
xmenubar = "no";
}
if (form.openType.options.selectedIndex == 0) {
xopentype = "<form><input type=\"button\" value=\"Open Window\" onClick=\"JavaScript:PopWindow()\"></form>";
}
else
if (form.openType.options.selectedIndex == 1) {
xopentype = "<a href=\"JavaScript:PopWindow()\">Open Window</a>";
}
else
if (form.openType.options.selectedIndex == 2) {
xopentype = "<body onLoad=\"JavaScript:PopWindow()\">";
}
else {
xopentype = "<body onUnLoad=\"JavaScript:PopWindow()\">";
}
var headText = "";
headText += "<script language=\"JavaScript\" type=\"text/javascript\">\r\n";
headText += "<!--\r\n";
headText += "function PopWindow()\r\n";
headText += "{\r\n";
headText += "window.open('"+theurl+"','"+thename+"','";
headText += "width="+thewidth+",height="+theheight+",";
headText += "menubar="+xmenubar+",scrollbars="+xscrollbars+",toolbar="+xtoolbar+",";
headText += "location="+xlocation+",directories="+xdirectories+",resizable="+xresizable+",";
headText += "top="+thetpos+",left="+thelpos+"');\r\n";
headText += "}\r\n";
headText += "//-->\r\n";
headText += "</script>";
var bodyText = xopentype;
form.source1.value = headText;
form.source2.value = bodyText;
}
function ResetPage(){
document.popupForm.reset();
}