<!-- The following creates the prompt and displays the image -->

<SCRIPT LANGUAGE="javascript">

var path = prompt("Where will I find the image? Put in full URL or Hard Drive Path and Image Name For example: C:/directory/image.jpg","Only image name required if in same directory")

if(path == "Only image name required if in same directory")
{
alert('Come on, put in an image name')
javascript:location.reload()
}

if(path == null)
{
alert('Do not click Cancel')
javascript:location.reload()
}

else
{document.write("<IMG NAME=thepic SRC=" +path+ ">");}

</SCRIPT>


<!-- The following contains the two resize functions and two new window functions -->

<SCRIPT LANGUAGE="javascript">

var high = document.thepic.height;
var wide = document.thepic.width;

function newW()
{
    a = high;
    b = wide;
    c = document.calc.h2.value;
    d = (b*c)/a;
    document.calc.width2.value = Math.round(d)
}

function newH()
{
a = high;
b = wide;
e = document.calc.wb2.value;
f = (a*e)/b;
document.calc.height2.value = Math.round(f)
}


function newWin()
{
var OpenWindow=window.open("", "newwin", "height=500,width=500");
OpenWindow.document.write("<HTML>")
OpenWindow.document.write("<TITLE>Image</TITLE>")
OpenWindow.document.write("<BODY BGCOLOR='000000'>")
OpenWindow.document.write("<CENTER>")
OpenWindow.document.write("<IMG SRC=" +path+ " HEIGHT=" +c+ " WIDTH=" +d+ ">")
OpenWindow.document.write("</CENTER>")
OpenWindow.document.write("</HTML>")
}

function newWin2()
{
var OpenWindow=window.open("", "newwin2", "height=500,width=500");
OpenWindow.document.write("<HTML>")
OpenWindow.document.write("<TITLE>Image</TITLE>")
OpenWindow.document.write("<BODY BGCOLOR='000000'>")
OpenWindow.document.write("<CENTER>")
OpenWindow.document.write("<IMG SRC=" +path+ " HEIGHT=" +f+ " WIDTH=" +e+ ">")
OpenWindow.document.write("</CENTER>")
OpenWindow.document.write("</HTML>")
}

</SCRIPT>

<!-- The following contains the two tables that appear on the page -->

<h2>Resize It</h2>

<FORM NAME="calc">

<TABLE border="12" cellspacing="0" cellpadding="4" bgcolor="#fdf99d">
<TR>
    <TD align="center">Height:<BR><SCRIPT LANGUAGE="javascript">document.write("<B>"+high+"</B>")</SCRIPT></TD>
    <TD align="center">Width:<BR><SCRIPT LANGUAGE="javascript">document.write("<B>"+wide+"</B>")</SCRIPT></TD>
    <TD align="center">Enter New Height:<BR><INPUT TYPE="text" SIZE=5 NAME="h2"></TD>
    <TD align="center"><INPUT TYPE="button" VALUE="Solve" onClick="newW()"></TD>
    <TD align="center">New Width Equals<BR><INPUT TYPE="text" NAME="width2" SIZE=10></TD>
    <TD align="center"><INPUT TYPE="button" onClick="newWin()" VALUE="Let Me See It"></TD>
</TR>

</TABLE>

<TABLE border="12" cellspacing="0" cellpadding="4" bgcolor="#fdf99d">
<TR>
    <TD align="center">Height:<BR><SCRIPT LANGUAGE="javascript">document.write("<B>"+high+"</B>")</SCRIPT></TD>
    <TD align="center">Width:<BR><SCRIPT LANGUAGE="javascript">document.write("<B>"+wide+"</B>")</SCRIPT></TD>
    <TD align="center">Enter New Width:<BR><INPUT TYPE="text" SIZE=5 NAME="wb2"></TD>
    <TD align="center"><INPUT TYPE="button" VALUE="Solve" onClick="newH()"></TD>
    <TD align="center">New Height Equals<BR><INPUT TYPE="text" NAME="height2" SIZE=10>
    <TD align="center"><INPUT TYPE="button" onClick="newWin2()" VALUE="Let Me See It">
</TD>
</TR>

</TABLE>

</FORM>