// JavaScript Document

function editWin(URL, HEIGHT) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=" + HEIGHT + "');");
}

function calPop(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=175,height=150');");
}

function popWin(URL, WIDTH, HEIGHT) {
eval("MusicPlayer" + " = window.open(URL, 'MusicPlayer', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=" + WIDTH + ",height=" + HEIGHT + "');");
}

function confirmSubmit(MESSAGE) {
var answer = confirm (MESSAGE)
//alert(n);
	if (answer){
		document.form0.submit();
		}
}

function addurl()
{
OK=1
  var theurl = window.prompt("Enter the full url (e.g., http://google.com):","http://")
  var linktext = window.prompt("Enter a name for the url (e.g., Google Search Engine):","")
//  var upperurl=theurl.toUpperCase()
  var thetext="HTTP://"
    if(theurl =='')
	{
	OK=0
	alert("You must enter a url");
NOTEXT()
	}
	bigurl=theurl.toUpperCase()
	if (bigurl.indexOf(thetext)==-1)
	{
	OK=0
	alert("You must provide a full url (e.g., http://google.com)")
NOTEXT()
	}
    if(linktext =='')
	{
	OK=0
	alert("You must provide a name for the url")
NOTEXT()
	}
    if (OK==1)
	{
document.form0.text.value += ("<A HREF=" + theurl + " target=_blank>" + linktext + "</A> ")
	}
}
