<!-- // 

 var box;

 function openwin(type){

  if (box && box.open && !box.closed) {

   box.focus();

  } 

  else 

  {  



   if (type == "prop")

    {

    bgcolorName = document.compose.bcolor.options[document.compose.bcolor.selectedIndex].value; 

    fontcolorName = document.compose.fcolor.options[document.compose.fcolor.selectedIndex].value; 


    if (!bgcolorName) bgcolorName = "white";

    if (!fontcolorName) fontcolorName = "black";



    box=window.open('','preview','toolbar=no,location=no,directories=no,status=yrd,menubar=no,scrollbars=no,resizable=yes,width=400,height=200,screenX=' + left + ',screenY=' +top + ',top=' + top + ',left=' + left);

	box.document.write('<html><head><title>Preview Page</title></head>\n');

	box.document.write('<body bgcolor=' + bgcolorName + ' text=' + fontcolorName +  ' link=' + fontcolorName + ' vlink=' + fontcolorName + '>\n');

	box.document.write('<table align=center width=300 border=0 bgcolor=' + bgcolorName  + '><tr><td><h2 align=center>This is sample postcard text</font></h2></td></tr></table>\n');

	box.document.write('<p align=center><a href=javascript:self.close()>close window</a></font></p>\n');

	box.document.write('</body></html>\n');

   }

   if (type == "poem")

   {

    poemName = document.compose.poem.options[document.compose.poem.selectedIndex].value; 

    if (poemName && (poemName != "none")) 

	{

	  url = "poem-preview.html?" + poemName;

      var left=(screen.availWidth/2);

      var top=(screen.availHeight/2)-300;

	  

      box=window.open(url,'poem','toolbar=no,location=no,directories=no,status=yrd,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600,screenX=' + left + ',screenY=' +top + ',top=' + top + ',left=' + left);

	}

    else alert("Select the poem to read");

   } 

	

   if (type == "music")

   {

    midName = document.compose.sound.options[document.compose.sound.selectedIndex].value; 

    if (midName && (midName != "none"))	window.location= "./music/files/" + midName;

    else alert("Select the music to preview");

   } 

  }

  }



function vrfyM() 

{

  if (document.compose.multi.checked )

  {

    if (confirm('Addresses for multiple recipients are filled in AFTER Preview'))

      document.compose.pa.value="preview";

	else 

	  return false;

  }

  else

  {

 	if (

	!document.compose.SENDEREMAIL.value || 

	!document.compose.SENDER.value || 

	!document.compose.email.value || 

	!document.compose.recipient.value

	)

	{

      document.compose.next.value="email";

      document.compose.pa.value="preview";	

    }

    else 

      document.compose.pa.value="send";	

  }

	

  document.compose.submit();

  return true;  

}  



// -->





