    function openWindow(filename)
    {    
    window.open("solos/" + filename,"new","toolbar=0, menubar=0, height=" + (screen.availHeight - 40) + ", width=" + (screen.availWidth - 10) + " target=new, scrollbars=1, top=0, left=0" );
    }
    
    function addToFav()
    {
    	var bookmarkurl = "http://www.JazzTrumpetSolos.com";  //window.location.href;
    	var bookmarktitle = "JazzTrumpetSolos.com";   //document.title;
    	if (document.all) window.external.AddFavorite(bookmarkurl, bookmarktitle);
    }
    
    function tellAFriend()
    {
    var hei=440;
    var wid=550;
    window.open("TellAFriend.htm","new","toolbar=0, menubar=0, height=" + hei + ", width=" + wid + " target=new, scrollbars=0, top=" + (screen.availHeight - hei)/2 + ", left=" + (screen.availWidth - wid)/2 );
    }
    
    function openLink(url)
    {
    window.open(url,"new","toolbar=0, menubar=0, height=310, width=540 target=new, scrollbars=0, top=0, left=0");
    }

    function openKKJZ()
    {
    window.open("http://www.kkjz.org","test","top=0, left=0, height=600, width=800, scrollbars=1, toolbar=1, menubar=1, resizable, location=1");
    }


    function openRadio3()
    {
      window.open('http://www.bbc.co.uk/radio/aod/radio3.shtml','test','top=0, left=0, height=350, width=600, toolbar=0, scrollbars=0');
    }

    function openRealNetRadio()
    {
      window.open('http://www.realnetradio.com/LiveContent/Player/Top.asp?C=wgmc','test','top=0, left=0, height=80, width=265, toolbar=0, scrollbars=0');
    }
    
    function validateTellAFriend()
    {
    var senderEmail, friendEmail, atPos, dotPos, message, wid, hei, x, y, sUrl;
    //validate all required text fields have data
    if (document.forms[0].txtSenderName.value=='')
      {
        alert("Please enter your name.");
        return false;
      }
    if (document.forms[0].txtSenderEmail.value=='')
      {
        alert("Please enter your email address.");
        return false;
      }
    if (document.forms[0].txtFriendName.value=='')
      {
        alert("Please enter your friend's name.");
        return false;
      }
    if (document.forms[0].txtFriendEmail.value=='')
      {
        alert("Please enter your friend's email address.");
        return false;
      }
    //validate sender email
    senderEmail = document.forms[0].txtSenderEmail.value;
    //look for @
    atPos = senderEmail.indexOf('@');
    if(atPos<=0)
      {
      alert("Your email address does not contain the required '@' character.");
      document.forms[0].txtSenderEmail.focus();
      return false;
      }
    //look for .
    dotPos = senderEmail.lastIndexOf('.');
    if(dotPos<=0)
      {
      alert("Your email address does not contain the required '.' character.  (as in .com)");
      document.forms[0].txtSenderEmail.focus();
      return false;
      }
    //validate that @ occurs before .
    if (atPos>dotPos)
      {
      alert("Your email address does not look right.");
      document.forms[0].txtSenderEmail.focus();
      return false;
      }
    //validate Friend's email address
    friendEmail = document.forms[0].txtFriendEmail.value;
    //look for @
    atPos = friendEmail.indexOf('@');
    if(atPos<=0)
      {
      alert("Your friend's email address does not contain the required '@' character.");
      document.forms[0].txtFriendEmail.focus();
      return false;
      }
    //look for .
    dotPos = friendEmail.lastIndexOf('.');
    if(dotPos<=0)
      {
      alert("Your friend's email address does not contain the required '.' character.  (as in .com)");
      document.forms[0].txtFriendEmail.focus();
      return false;
      }
    //validate that @ occurs before .
    if (atPos>dotPos)
      {
      alert("Your friend's email address does not look right.");
      document.forms[0].txtFriendEmail.focus();
      return false;
      }
    message = document.forms[0].Textarea1.value;
    message = message.toLowerCase();
    atPos = message.indexOf("<" + "script>");

    if (atPos>=0)
      {
      while(1==1)
        alert("Your attempts at script insertion are not welcome here!");
      return false;
      }      
  	wid = 420;
	  hei = 300;
  	x = (screen.width - wid) / 2;
	  y = (screen.height - hei) / 2;
	  sUrl = "sendtofriend.asp?FN=" + document.forms[0].txtFriendName.value + "&FE=" + document.forms[0].txtFriendEmail.value + "&SN=" + document.forms[0].txtSenderName.value + "&SE=" + document.forms[0].txtSenderEmail.value + "&sUrl=" + document.forms[0].txtUrl.value + "&Note=" + message + "&Source=TellAFriend";
		window.open(sUrl,  TARGET="_blank", "resize=0, menu=0, toolbar=0, width = " + wid + " height = " + hei + " top = " + y + " left = " + x);
    return true;
    }

    function SubmitLink()
    {
    var wid, hei, x, y, sUrl;
  	wid = 420;
	  hei = 300;
  	x = (screen.width - wid) / 2;
	  y = (screen.height - hei) / 2;
	  sUrl = "sendtofriend.asp?FN=Link Submittal&FE=webmaster@JazzTrumpetSolos.com&SN=Link Submitter&SE=webmaster@JazzTrumpetSolos.com&sUrl=" + document.forms[0].txtLink.value + "&Note=This is a recommended link.&Source=Links";
		window.open(sUrl,  TARGET="_blank", "resize=0, menu=0, toolbar=0, width = " + wid + " height = " + hei + " top = " + y + " left = " + x);    
    }

    function SubmitJazzRadio()
    {
    var wid, hei, x, y, sUrl;
  	wid = 420;
	  hei = 300;
  	x = (screen.width - wid) / 2;
	  y = (screen.height - hei) / 2;
	  sUrl = "sendtofriend.asp?FN=Jazz Radio Submittal&FE=webmaster@JazzTrumpetSolos.com&SN=Link Submitter&SE=webmaster@JazzTrumpetSolos.com&sUrl=" + document.forms[0].txtLink.value + "&Note=This is a recommended Jazz Radio link.&Source=Radio";
		window.open(sUrl,  TARGET="_blank", "resize=0, menu=0, toolbar=0, width = " + wid + " height = " + hei + " top = " + y + " left = " + x);    
    }

    function Newsletter()
    {
    var wid, hei, x, y, sUrl, eMail, atPos, dotPos;

    //validate Friend's email address
    eMail = document.forms[0].txtEmail.value;
    //look for @
    atPos = eMail.indexOf('@');
    if(atPos<=0)
      {
      alert("Your email address does not contain the required '@' character.\nPlease Try Again.");
      document.forms[0].txtEmail.focus();
      return false;
      }
    //look for .
    dotPos = eMail.lastIndexOf('.');
    if(dotPos<=0)
      {
      alert("Your email address does not contain the required '.' character.  (as in .com)\nPlease Try Again.");
      document.forms[0].txtEmail.focus();
      return false;
      }
    //See if last char is .
    dotPos = eMail.lastIndexOf('.') + 1;
    if(dotPos==eMail.length)
      {
      alert("A valid email address must include a valid extension as in com, net, org...\nPlease Try Again.");
      document.forms[0].txtEmail.focus();
      return false;
      }
    //See if last char is .
    dotPos = eMail.lastIndexOf('@') + 1;
    if(dotPos==eMail.length)
      {
      alert("A valid email address must include a valid extension as in com, net, org...\nPlease Try Again.");
      document.forms[0].txtEmail.focus();
      return false;
      }

    //validate that @ occurs before .
    if (atPos>dotPos)
      {
      alert("Your email address does not look right.\nPlease Try Again.");
      document.forms[0].txtEmail.focus();
      return false;
      }
    eMail = eMail.toLowerCase();
    atPos = eMail.indexOf("<" + "script>");

    if (atPos>=0)
      {
      while(1==1)
        alert("Your attempts at script insertion are not welcome here!");
      return false;
      }      
  	wid = 420;
	  hei = 300;
  	x = (screen.width - wid) / 2;
	  y = (screen.height - hei) / 2;
	  sUrl = "sendtofriend.asp?FN=SignUp&FE=" + document.forms[0].txtEmail.value + "&SN=SignUp&SE=webmaster@JazzTrumpetSolos.com&sUrl=SignUp&Note=SignUp&Source=SignUp";
		window.open(sUrl,  TARGET="_blank", "resize=0, menu=0, toolbar=0, width = " + wid + " height = " + hei + " top = " + y + " left = " + x);    
    }


    function validateSendEmail()
    {
    var senderEmail, atPos, dotPos;
    //validate all required text fields have data
    if (document.forms[0].txtSenderName.value=='')
      {
        alert("Please enter your name.");
        return false;
      }
    if (document.forms[0].txtSenderEmail.value=='')
      {
        alert("Please enter your email address.");
        return false;
      }
    //validate sender email
    senderEmail = document.forms[0].txtSenderEmail.value;
    //look for @
    atPos = senderEmail.indexOf('@');
    if(atPos<=0)
      {
      alert("Your email address does not contain the required '@' character.");
      document.forms[0].txtSenderEmail.focus();
      return false;
      }
    //look for .
    dotPos = senderEmail.lastIndexOf('.');
    if(dotPos<=0)
      {
      alert("Your email address does not contain the required '.' character.  (as in .com)");
      document.forms[0].txtSenderEmail.focus();
      return false;
      }
    //validate that @ occurs before .
    if (atPos>dotPos)
      {
      alert("Your email address does not look right.");
      document.forms[0].txtSenderEmail.focus();
      return false;
      }
    message = document.forms[0].Textarea1.value;
    message = message.toLowerCase();
    atPos = message.indexOf("<" + "script>");

    if (atPos>=0)
      {
      while(1==1)
        alert("Your attempts at script insertion are not welcome here!");
      return false;
      }      
    return true;
    }



